diff options
Diffstat (limited to 'contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp')
-rw-r--r-- | contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp b/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp index 040143b..b0a150a 100644 --- a/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp +++ b/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp @@ -53,7 +53,6 @@ struct ContextDecision { #define debug(s) do { } while (0) #endif - /* * contextForAttrs - Client for the instruction context table. Takes a set of * attributes and returns the appropriate decode context. @@ -276,8 +275,6 @@ static void dbgprintf(struct InternalInstruction* insn, va_end(ap); insn->dlog(insn->dlogArg, buffer); - - return; } /* @@ -1453,10 +1450,10 @@ static int readModRM(struct InternalInstruction* insn) { } #define GENERIC_FIXUP_FUNC(name, base, prefix) \ - static uint8_t name(struct InternalInstruction *insn, \ - OperandType type, \ - uint8_t index, \ - uint8_t *valid) { \ + static uint16_t name(struct InternalInstruction *insn, \ + OperandType type, \ + uint8_t index, \ + uint8_t *valid) { \ *valid = 1; \ switch (type) { \ default: \ @@ -1485,7 +1482,6 @@ static int readModRM(struct InternalInstruction* insn) { case TYPE_XMM128: \ case TYPE_XMM64: \ case TYPE_XMM32: \ - case TYPE_XMM: \ return prefix##_XMM0 + index; \ case TYPE_VK1: \ case TYPE_VK2: \ @@ -1507,6 +1503,10 @@ static int readModRM(struct InternalInstruction* insn) { return prefix##_DR0 + index; \ case TYPE_CONTROLREG: \ return prefix##_CR0 + index; \ + case TYPE_BNDR: \ + if (index > 3) \ + *valid = 0; \ + return prefix##_BND0 + index; \ } \ } @@ -1763,14 +1763,6 @@ static int readOperands(struct InternalInstruction* insn) { if (Op.encoding != ENCODING_REG && insn->eaDisplacement == EA_DISP_8) insn->displacement *= 1 << (Op.encoding - ENCODING_RM); break; - case ENCODING_CB: - case ENCODING_CW: - case ENCODING_CD: - case ENCODING_CP: - case ENCODING_CO: - case ENCODING_CT: - dbgprintf(insn, "We currently don't hande code-offset encodings"); - return -1; case ENCODING_IB: if (sawRegImm) { /* Saw a register immediate so don't read again and instead split the |