bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/22871] Encode instructions of 64-bit operand without the REX_W


From: address@hidden
Subject: [Bug gas/22871] Encode instructions of 64-bit operand without the REX_W bit
Date: Thu, 22 Feb 2018 23:19:10 +0000

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

--- Comment #12 from Linus Torvalds <address@hidden> ---
(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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]