[LLVMbugs] [Bug 10134] New: MC has movq and movd wrong

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jun 13 18:32:49 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=10134

           Summary: MC has movq and movd wrong
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nlewycky at google.com
                CC: llvmbugs at cs.uiuc.edu


Binutils doesn't care about the difference between movd and movq, in that
these:

  movq %rdi,%xmm0
  movd %rdi,%xmm0

both assemble to "66 48 0f 6e c7". However, MC rejects the former and accepts
the latter. It's great that it's distinguishing between the two ...

... but it's got it backwards. According to
http://support.amd.com/us/Processor_TechDocs/26568.pdf (book #26568—Rev.
3.12—May 2011) movd is for moving between XMM and 32-bit while movq is for
moving between XMM and 64-bit:

"Mnemonic Opcode Description
MOVD xmm, reg32/mem32 66 (W0) 0F 6E /r Move a 32-bit value from reg32/mem32 to
xmm.
MOVQ xmm, reg64/mem64 66 (W1) 0F 6E /r Move a 64-bit value from reg64/mem64 to
xmm.
MOVD reg32/mem32, xmm 66 (W0) 0F 7E /r Move a 32-bit value from xmm to
reg32/mem32
MOVQ reg64/mem64, xmm 66 (W1) 0F 7E /r Move a 64-bit value from xmm to
reg64/mem64."

%rdi is 64-bit and thusly should really be a movq, not a movd. This is breaking
current versions of OpenSSL.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list