Bug 5080 - Error: Incorrect register `eax' used with `q' suffix
Summary: Error: Incorrect register `eax' used with `q' suffix
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.19
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-30 12:10 UTC by Rask Ingemann Lambertsen
Modified: 2007-09-30 21:27 UTC (History)
1 user (show)

See Also:
Host:
Target: x86_64-unknown-linux-gnu
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rask Ingemann Lambertsen 2007-09-30 12:10:32 UTC
The following input causes gas to complain:

.intel_syntax noprefix
 cvttsd2si eax, QWORD PTR [rsp]

{standard input}: Assembler messages:
{standard input}:2: Error: Incorrect register `eax' used with `q' suffix

GAS wants a DWORD PTR operand, but that's not correct because the memory operand
is 64-bit floating point operand.
Comment 1 Rask Ingemann Lambertsen 2007-09-30 12:28:57 UTC
There's a similar bug with this input:

.intel_syntax noprefix
 cvttss2si rax, DWORD PTR fv2.1843[rip]

{standard input}: Assembler messages:
{standard input}:2: Error: Incorrect register `rax' used with `l' suffix
Comment 2 H.J. Lu 2007-09-30 21:27:51 UTC
Fixed by

http://sourceware.org/ml/binutils/2007-09/msg00443.html