https://sourceware.org/bugzilla/show_bug.cgi?id=22871

--- Comment #12 from Linus Torvalds <torva...@linux-foundation.org> ---
(In reply to H.J. Lu from comment #11)
> 
> imm8 isn't sign-extended.  8 bits should work.

No, it's not sign-extended to the full size, but it doesn't work because you
change the sign bit in the flags in the _small_ size.

So you can't change

    testq $255,%rdx

into

    testb $255,%dl

because the flag end result is different.

The first instruction always has a positive result (since the resulting sign
bit in 64 bits is always zero). But the shortened version would be negative if
bit#7 in %dl is set.

Or am I missing something else?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to