[LLVMbugs] [Bug 10724] New: [x86 disassembler] vcvtsd2si disassembled incorrectly
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Aug 23 14:12:44 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10724
Summary: [x86 disassembler] vcvtsd2si disassembled incorrectly
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-264:
VEX.LIG.F2.0F.W0 2D /r
VCVTSD2SI r32, xmm1/m64
VEX.LIG.F2.0F.W1 2D /r
VCVTSD2SI r64, xmm1/m64
'VCVTSD2SI' can be specified with either the 2- or 3-byte VEX prefix (clang on
OSX
correctly assembles the following):
vcvtsd2si %xmm0, %eax
vcvtsd2si %xmm0, %rax
The object file shows:
C5 FB 2D C0
C4 E1 FB 2D C0
But using llvm-mc built from trunk r138250 produces the wrong output
for these byte sequences:
$ echo '0xc5 0xfb 0x2d 0xc0'| ./llvm-mc -disassemble -triple="x86_64"
-x86-asm-syntax=intel
cvtsd2si EAX, XMM0
$ echo '0xc5 0xff 0x2d 0xc0'| ./llvm-mc -disassemble -triple="x86_64"
-x86-asm-syntax=intel
cvtsd2si EAX, XMM0
$ echo '0xc4 0xe1 0xf7 0x2d 0xc0'| ./llvm-mc -disassemble -triple="x86_64"
-x86-asm-syntax=intel
cvtsd2si RAX, XMM0
The mnemonic is missing the leading 'v' in all of these cases. The mnemonic is
correct for the 3-byte VEX prefix with the 'L' bit set:
$ echo '0xc4 0xe1 0xfb 0x2d 0xc0'| ./llvm-mc -disassemble -triple="x86_64"
-x86-asm-syntax=intel
vcvtsd2si RAX, XMM0
--
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