From 113061d39b32ac2652d237abff7ee5a2a45d45c9 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 25 Aug 2011 07:42:00 +0000 Subject: [PATCH] Give ATTR_VEX higher priority when generating the disassembler context table. Fixes disassembling of VEX instructions with 'pp'=00. Fixes subset of PR10678. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138552 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/MC/Disassembler/X86/simple-tests.txt | 3 +++ utils/TableGen/X86DisassemblerTables.cpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test/MC/Disassembler/X86/simple-tests.txt b/test/MC/Disassembler/X86/simple-tests.txt index b1442315d1d..4e1bedd3cba 100644 --- a/test/MC/Disassembler/X86/simple-tests.txt +++ b/test/MC/Disassembler/X86/simple-tests.txt @@ -84,3 +84,6 @@ # CHECK: vcvtps2pd %xmm0, %ymm0 0xc5 0xfc 0x5a 0xc0 + +# CHECK: vandps (%rdx), %xmm1, %xmm7 +0xc5 0xf0 0x54 0x3a diff --git a/utils/TableGen/X86DisassemblerTables.cpp b/utils/TableGen/X86DisassemblerTables.cpp index 74310593d29..3e48c0b6f32 100644 --- a/utils/TableGen/X86DisassemblerTables.cpp +++ b/utils/TableGen/X86DisassemblerTables.cpp @@ -515,6 +515,8 @@ void DisassemblerTables::emitContextTable(raw_ostream &o, uint32_t &i) const { o << "IC_VEX_XD"; else if ((index & ATTR_VEX) && (index & ATTR_XS)) o << "IC_VEX_XS"; + else if (index & ATTR_VEX) + o << "IC_VEX"; else if ((index & ATTR_64BIT) && (index & ATTR_REXW) && (index & ATTR_XS)) o << "IC_64BIT_REXW_XS"; else if ((index & ATTR_64BIT) && (index & ATTR_REXW) && (index & ATTR_XD)) @@ -538,8 +540,6 @@ void DisassemblerTables::emitContextTable(raw_ostream &o, uint32_t &i) const { o << "IC_XD"; else if (index & ATTR_OPSIZE) o << "IC_OPSIZE"; - else if (index & ATTR_VEX) - o << "IC_VEX"; else o << "IC"; -- 2.34.1