From 3bb43a829e03ed8ea671f5bc331772ef7afc3313 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 14 Sep 2011 05:55:28 +0000 Subject: [PATCH] Make disassembling of VBLEND* print immediate as a XMM/YMM register name. Fixes PR10917. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139690 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/Disassembler/X86Disassembler.cpp | 6 ++++++ test/MC/Disassembler/X86/simple-tests.txt | 3 +++ 2 files changed, 9 insertions(+) diff --git a/lib/Target/X86/Disassembler/X86Disassembler.cpp b/lib/Target/X86/Disassembler/X86Disassembler.cpp index 1f1c1dcd162..e5774bfd160 100644 --- a/lib/Target/X86/Disassembler/X86Disassembler.cpp +++ b/lib/Target/X86/Disassembler/X86Disassembler.cpp @@ -221,6 +221,12 @@ static void translateImmediate(MCInst &mcInst, uint64_t immediate, } switch (type) { + case TYPE_XMM128: + mcInst.addOperand(MCOperand::CreateReg(X86::XMM0 + (immediate >> 4))); + return; + case TYPE_XMM256: + mcInst.addOperand(MCOperand::CreateReg(X86::YMM0 + (immediate >> 4))); + return; case TYPE_MOFFS8: case TYPE_REL8: if(immediate & 0x80) diff --git a/test/MC/Disassembler/X86/simple-tests.txt b/test/MC/Disassembler/X86/simple-tests.txt index f431324f9d3..67a1c44d021 100644 --- a/test/MC/Disassembler/X86/simple-tests.txt +++ b/test/MC/Disassembler/X86/simple-tests.txt @@ -269,3 +269,6 @@ # CHECK: vmovdqu %ymm0, %ymm1 0xc5 0xfe 0x7f 0xc1 + +# CHECK: vblendvps %xmm4, %xmm1, %xmm2, %xmm3 +0xc4 0xe3 0x69 0x4a 0xd9 0x41