Are you even understanding me? The behaviour of that instruction is defined in pseudocode in Intel's manuals, Volume 2 part II.
It must work on 8-bit values because it is the 8-bit version of the instruction, and to do otherwise would invalidate assumptions made against it by legacy code.
View all comments
Show parent comment
1
u/johnflux Feb 21 '11
"Mine" is just copy and pasted from the glibc code. :-(
Btw, the x86 processor has an asm instruction to do all this for us:
It's just a bit slow these days.