This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
reg = (reg >> 8) ^ table[reg & 0xFF];
It produced:
mov edx, eax movzx eax, al shr dx, 8 xor dx, WORD PTR [ebx+eax*2]
I was wondering why there was that extra mov on the first line. So I ended up to write it all as:
reg = table[reg & 0xFF] ^ (reg >> 8);
And it produced:
movzx edx, al shr ax, 8 xor ax, WORD PTR [ebx+edx*2]
I do not know if this is a feature or bug but which ever it is, it would be nice to know.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |