diff options
-rw-r--r-- | test/MC/Disassembler/X86/simple-tests.txt | 3 | ||||
-rw-r--r-- | utils/TableGen/X86DisassemblerTables.cpp | 6 | ||||
-rw-r--r-- | utils/TableGen/X86RecognizableInstr.cpp | 3 |
3 files changed, 9 insertions, 3 deletions
diff --git a/test/MC/Disassembler/X86/simple-tests.txt b/test/MC/Disassembler/X86/simple-tests.txt index ef36a6b..62f3464 100644 --- a/test/MC/Disassembler/X86/simple-tests.txt +++ b/test/MC/Disassembler/X86/simple-tests.txt @@ -158,3 +158,6 @@ # CHECK: vinsertps $129, %xmm3, %xmm2, %xmm1 0xc4 0xe3 0x69 0x21 0xcb 0x81 + +# CHECK: pause +0xf3 0x90 diff --git a/utils/TableGen/X86DisassemblerTables.cpp b/utils/TableGen/X86DisassemblerTables.cpp index e0cbb18..aed2727 100644 --- a/utils/TableGen/X86DisassemblerTables.cpp +++ b/utils/TableGen/X86DisassemblerTables.cpp @@ -613,8 +613,10 @@ void DisassemblerTables::setTableFields(ModRMDecision &decision, if(newInfo.filtered) continue; // filtered instructions get lowest priority - if(previousInfo.name == "NOOP") - continue; // special case for XCHG32ar and NOOP + if(previousInfo.name == "NOOP" && (newInfo.name == "XCHG16ar" || + newInfo.name == "XCHG32ar" || + newInfo.name == "XCHG64ar")) + continue; // special case for XCHG*ar and NOOP if (outranks(previousInfo.insnContext, newInfo.insnContext)) continue; diff --git a/utils/TableGen/X86RecognizableInstr.cpp b/utils/TableGen/X86RecognizableInstr.cpp index 5f8fe6e..f43a939 100644 --- a/utils/TableGen/X86RecognizableInstr.cpp +++ b/utils/TableGen/X86RecognizableInstr.cpp @@ -325,7 +325,7 @@ InstructionContext RecognizableInstr::insnContext() const { insnContext = IC_OPSIZE; else if (Prefix == X86Local::XD) insnContext = IC_XD; - else if (Prefix == X86Local::XS) + else if (Prefix == X86Local::XS || Prefix == X86Local::REP) insnContext = IC_XS; else insnContext = IC; @@ -882,6 +882,7 @@ void RecognizableInstr::emitDecodePath(DisassemblerTables &tables) const { } opcodeToSet = 0xd8 + (Prefix - X86Local::D8); break; + case X86Local::REP: default: opcodeType = ONEBYTE; switch (Opcode) { |