[LLVMbugs] [Bug 10851] New: [x86 disassembler] vmovmskpd disassembled when reserved bits not set

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Sep 2 16:41:22 PDT 2011


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

           Summary: [x86 disassembler] vmovmskpd disassembled when
                    reserved bits not set
           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


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

VEX.128.66.0F.WIG 50 /r
VMOVMSKPD reg, xmm2
VEX.256.66.0F.WIG 50 /r
VMOVMSKPD reg, ymm2

Note: In VEX-encoded versions, VEX.vvvv is reserved and must be 1111b,
otherwise
instructions will #UD.

Clang on OSX assembles the following:
vmovmskpd %xmm0, %eax

to these bytes:
C5 F9 50 C0 

But using llvm-mc built from trunk r139013, this byte sequence disassembles
even though the VEX.vvvv field is not 1111b (it's 0000b):
$ echo '0xc5 0x81 0x50 0xc0'| ./llvm-mc -disassemble -triple="x86_64" 
    vmovmskpd    %xmm0, %eax

The 3-byte VEX prefix form is also incorrect:
$ echo '0xc4 0xe1 0x81 0x50 0xc0'| ./llvm-mc -disassemble -triple="x86_64"
        vmovmskpd  %xmm0, %eax

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