[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/15504] New: incorrect error message when using LTR opcode with
From: |
joel.nider at gmail dot com |
Subject: |
[Bug gas/15504] New: incorrect error message when using LTR opcode with a register operand |
Date: |
Mon, 20 May 2013 19:14:25 +0000 |
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: address@hidden
ReportedBy: address@hidden
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 gas/15504] New: incorrect error message when using LTR opcode with a register operand,
joel.nider at gmail dot com <=