News for hackers. Stuff that matters.
Re:XOR'ing a register with itself is the idiom for zeroing i... by drob518 on Wednesday April 22, 2026 @12:58PM (#47866224)
Gotcha, thanks for clarifying. I was reacting to the word “waste” I guess. Surely, as you say, it consumes that opcode encoding space. Whether that’s a waste or not depends on a lot of other things, I suppose. I wasn’t necessarily thinking x86-specific in my original comment. But yea, if you try to zero every possible register and half-word register you would definitely consume lots of encoding space.

There are no comments on this comment yet.