[LLVMbugs] [Bug 10676] New: [x86 disassembler] L bit in VEX prefix is not ignored properly

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Aug 16 15:16:45 PDT 2011


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

           Summary: [x86 disassembler] L bit in VEX prefix is not ignored
                    properly
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: kkhoo at perfwizard.com
                CC: llvmbugs at cs.uiuc.edu


According to the "Intel® 64 and IA-32 Architectures Software Developer’s Manual
Volume 2 (2A & 2B): Instruction Set Reference, A-Z", p. 3-42:

ADDSD—Add Scalar Double-Precision Floating-Point Values
VEX.NDS.LIG.F2.0F.WIG 58 /r

"LIG" in the above spec is defined on p. 3-5:
If VEX.LIG is present in the opcode column: The VEX.L value is ignored.

With llvm-mc trunk revision 135913:
$ echo '0xc5 0xf3 0x58 0xc0'| ./llvm-mc -disassemble -triple="x86_64"
        vaddsd  %xmm0, %xmm1, %xmm0
$ echo '0xc5 0xf7 0x58 0xc0'| ./llvm-mc -disassemble -triple="x86_64"
        vaddps  %ymm0, %ymm1, %ymm0

Setting the 'L' bit changed the disassembly from vaddsd to vaddps, but it
shouldn't have affected anything according to the docs.

Using the 3-byte VEX prefix has the same behavior:
$ echo '0xc4 0xc1 0x73 0x58 0xc0'| ./llvm-mc -disassemble -triple="x86_64"
        vaddsd  %xmm8, %xmm1, %xmm0
$ echo '0xc4 0xc1 0x77 0x58 0xc0'| ./llvm-mc -disassemble -triple="x86_64"
        vaddps  %ymm8, %ymm1, %ymm0

-- 
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