http://sourceware.org/bugzilla/show_bug.cgi?id=15504
Bug #: 15504
Summary: incorrect error message when using LTR opcode with a
register operand
Product: binutils
Version: 2.22
Status: NEW
Severity: normal
Priority: P2
Component: gas
AssignedTo: unassig...@sourceware.org
ReportedBy: joel.ni...@gmail.com
Classification: Unclassified
When assembling the 'ltr' opcode with a register (%eax) as an operand, gas
gives the following error:
Error: operand type mismatch for 'ltr'
This was discovered by compiling the following inline assembler in GCC:
asm("ltr %0\n" :: am(index) );
When compiled with O0, it was compiled to:
ltr -16(%ebp)
Which assembles correctly. However, when using O1 (or O2) the compiler knows
to save this value in a register rather than on the stack, producing:
ltr %eax
According to the Intel software manual (document 325462.pdf) it is valid to
give either a register name or memory location as an operand. Therefore I must
conclude that the compiler behaved correctly, and the assembler is incorrectly
rejecting a register as an operand to this instruction.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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