diff options
Diffstat (limited to 'llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h')
-rw-r--r-- | llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h b/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h index a1e036ca7ba..df4085edb81 100644 --- a/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h +++ b/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h @@ -19,6 +19,9 @@ #include "llvm/Support/X86DisassemblerDecoderCommon.h" namespace llvm { + +class MCInstrInfo; + namespace X86Disassembler { // Accessor functions for various fields of an Intel instruction @@ -530,7 +533,7 @@ struct InstructionSpecifier { /// The x86 internal instruction, which is produced by the decoder. struct InternalInstruction { // Opaque value passed to the reader - const void* readerArg; + llvm::ArrayRef<uint8_t> bytes; // The address of the next byte to read via the reader uint64_t readerCursor; @@ -652,19 +655,8 @@ struct InternalInstruction { /// Decode one instruction and store the decoding results in /// a buffer provided by the consumer. -/// \param insn The buffer to store the instruction in. Allocated by the -/// consumer. -/// \param readerArg An argument to pass to the reader for storing context -/// specific to the consumer. May be NULL. -/// \param startLoc The address (in the reader's address space) of the first -/// byte in the instruction. -/// \param mode The mode (16-bit, 32-bit, 64-bit) to decode in. /// \return Nonzero if there was an error during decode, 0 otherwise. -int decodeInstruction(InternalInstruction *insn, - const void *readerArg, - const void *miiArg, - uint64_t startLoc, - DisassemblerMode mode); +int decodeInstruction(InternalInstruction *insn, const MCInstrInfo *mii); /// Print a message to debugs() /// \param file The name of the file printing the debug message. |