This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug in operands to IA32 cvtps2dq instruction in gnu as


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]