2 ms·
I have no particular reason at the moment to care about any of this, but your posts are always very interesting reading. I was actually surprised to see the ze
by tarlinian 7y ago
I have no particular reason at the moment to care about any of this, but your posts are always very interesting reading.
I was actually surprised to see the zeroing idioms not being recognized. I sort of assumed those were cheap to implement. I suppose they may not actually have much value since you would never actually want to use a zero mask register as an actual mask?
- BeeOnRope 7y agoYeah, I would think most mask registers values just "pop into existence" as already nonzero based on a full write to the register, e.g., from a comparison, a load from memory, move from GP reg, etc. I can't see all that many scenarios where you want a zeroed register to begin with. Many of the cases that happens in the GP world (e.g., zeroing out some accumulator or pointer or whatever) just don't come up in mask registers. I am not sure about the cost to implement it. I don't think it's all that complicated to describe how it would work, but it does occur in the renamer, which is a critical path on modern chips, so probably the less complication there, the better. We already know that not all zeroing idioms are recognized (like sub same, same) on some chips, so that is some indication that it's not super cheap (or else you'd think they'd have just implemented all the idioms the first time around).