This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Bug in operands to IA32 cvtps2dq instruction in gnu as
- To: hjl at lucon dot org
- Subject: Bug in operands to IA32 cvtps2dq instruction in gnu as
- From: Phil Karn <karn at ka9q dot net>
- Date: Fri, 11 May 2001 17:55:02 -0700
- Cc: binutils at sourceware dot cygnus dot com
- Reply-to: karn at ka9q dot net
Hi. I found another bug in gas version 2.11.90.0.7 in the handling of
the operands to an IA32 SSE/SSE2 instruction.
The IA32 SSE2 "cvtps2dq" instruction converts four 32-bit floats to four
32-bit ints. It therefore requires that its operands be one of the
128-bit SSE registers %xmm0-7 or a 128-bit memory locations. However,
GNU as emits an error if you give xmm registers as operands. It
allows only MMX registers, which is incorrect.
A quick programmer workaround is to specify the corresponding MMX
register, i.e., if you want "cvtps2dq %xmm0,%xmm1" you can say
"cvtps2dq %mm0,%mm1". I verified that this produces the intended code.
The operand table for this instruction probably needs fixing.
Phil