LLVM  3.7.0
Public Member Functions | List of all members
llvm::X86Disassembler::X86GenericDisassembler Class Reference

Generic disassembler for all X86 platforms. More...

#include <X86Disassembler.h>

Inheritance diagram for llvm::X86Disassembler::X86GenericDisassembler:
[legend]
Collaboration diagram for llvm::X86Disassembler::X86GenericDisassembler:
[legend]

Public Member Functions

 X86GenericDisassembler (const MCSubtargetInfo &STI, MCContext &Ctx, std::unique_ptr< const MCInstrInfo > MII)
 
DecodeStatus getInstruction (MCInst &instr, uint64_t &size, ArrayRef< uint8_t > Bytes, uint64_t Address, raw_ostream &vStream, raw_ostream &cStream) const override
 Returns the disassembly of a single instruction. More...
 
- Public Member Functions inherited from llvm::MCDisassembler
 MCDisassembler (const MCSubtargetInfo &STI, MCContext &Ctx)
 
virtual ~MCDisassembler ()
 
bool tryAddingSymbolicOperand (MCInst &Inst, int64_t Value, uint64_t Address, bool IsBranch, uint64_t Offset, uint64_t InstSize) const
 
void tryAddingPcLoadReferenceComment (int64_t Value, uint64_t Address) const
 
void setSymbolizer (std::unique_ptr< MCSymbolizer > Symzer)
 Set Symzer as the current symbolizer. More...
 
MCContextgetContext () const
 
const MCSubtargetInfogetSubtargetInfo () const
 

Additional Inherited Members

- Public Types inherited from llvm::MCDisassembler
enum  DecodeStatus { Fail = 0, SoftFail = 1, Success = 3 }
 Ternary decode status. More...
 
- Public Attributes inherited from llvm::MCDisassembler
raw_ostreamCommentStream
 
- Protected Attributes inherited from llvm::MCDisassembler
const MCSubtargetInfoSTI
 
std::unique_ptr< MCSymbolizerSymbolizer
 

Detailed Description

Generic disassembler for all X86 platforms.

All each platform class should have to do is subclass the constructor, and provide a different disassemblerMode value.

Definition at line 93 of file X86Disassembler.h.

Constructor & Destructor Documentation

X86GenericDisassembler::X86GenericDisassembler ( const MCSubtargetInfo STI,
MCContext Ctx,
std::unique_ptr< const MCInstrInfo MII 
)

Member Function Documentation

MCDisassembler::DecodeStatus X86GenericDisassembler::getInstruction ( MCInst Instr,
uint64_t &  Size,
ArrayRef< uint8_t >  Bytes,
uint64_t  Address,
raw_ostream VStream,
raw_ostream CStream 
) const
overridevirtual

Returns the disassembly of a single instruction.

Parameters
Instr- An MCInst to populate with the contents of the instruction.
Size- A value to populate with the size of the instruction, or the number of bytes consumed while attempting to decode an invalid instruction.
Address- The address, in the memory space of region, of the first byte of the instruction.
VStream- The stream to print warnings and diagnostic messages on.
CStream- The stream to print comments and annotations on.
Returns
- MCDisassembler::Success if the instruction is valid, MCDisassembler::SoftFail if the instruction was disassemblable but invalid, MCDisassembler::Fail if the instruction was invalid.

Implements llvm::MCDisassembler.

Definition at line 138 of file X86Disassembler.cpp.

References llvm::dwarf::syntax::Address, llvm::MCDisassembler::CommentStream, llvm::X86Disassembler::decodeInstruction(), llvm::MCDisassembler::Fail, llvm::X86Disassembler::InternalInstruction::length, logger(), llvm::nulls(), llvm::X86Disassembler::InternalInstruction::readerCursor, regionReader(), llvm::MipsISD::Ret, llvm::MCDisassembler::Success, and translateInstruction().


The documentation for this class was generated from the following files: