LLVM
8.0.1
|
#include "MSP430.h"
#include "MCTargetDesc/MSP430MCTargetDesc.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDisassembler/MCDisassembler.h"
#include "llvm/MC/MCFixedLenDisassembler.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/TargetRegistry.h"
#include "MSP430GenDisassemblerTables.inc"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "msp430-disassembler" |
Typedefs | |
typedef MCDisassembler::DecodeStatus | DecodeStatus |
Enumerations | |
enum | AddrMode { amInvalid = 0, amRegister, amIndexed, amIndirect, amIndirectPost, amSymbolic, amImmediate, amAbsolute, amConstant } |
Functions | |
static MCDisassembler * | createMSP430Disassembler (const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx) |
void | LLVMInitializeMSP430Disassembler () |
static DecodeStatus | DecodeGR8RegisterClass (MCInst &MI, uint64_t RegNo, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeGR16RegisterClass (MCInst &MI, uint64_t RegNo, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeCGImm (MCInst &MI, uint64_t Bits, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeMemOperand (MCInst &MI, uint64_t Bits, uint64_t Address, const void *Decoder) |
static AddrMode | DecodeSrcAddrMode (unsigned Rs, unsigned As) |
static AddrMode | DecodeSrcAddrModeI (unsigned Insn) |
static AddrMode | DecodeSrcAddrModeII (unsigned Insn) |
static AddrMode | DecodeDstAddrMode (unsigned Insn) |
static const uint8_t * | getDecoderTable (AddrMode SrcAM, unsigned Words) |
static MSP430CC::CondCodes | getCondCode (unsigned Cond) |
Variables | |
static const unsigned | GR8DecoderTable [] |
static const unsigned | GR16DecoderTable [] |
#define DEBUG_TYPE "msp430-disassembler" |
Definition at line 27 of file MSP430Disassembler.cpp.
Definition at line 29 of file MSP430Disassembler.cpp.
enum AddrMode |
Enumerator | |
---|---|
amInvalid | |
amRegister | |
amIndexed | |
amIndirect | |
amIndirectPost | |
amSymbolic | |
amImmediate | |
amAbsolute | |
amConstant |
Definition at line 146 of file MSP430Disassembler.cpp.
|
static |
Definition at line 59 of file MSP430Disassembler.cpp.
Referenced by LLVMInitializeMSP430Disassembler().
|
static |
Definition at line 115 of file MSP430Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), llvm_unreachable, and llvm::MCDisassembler::Success.
Referenced by DecodeGR16RegisterClass().
Definition at line 197 of file MSP430Disassembler.cpp.
References amAbsolute, amIndexed, amRegister, and amSymbolic.
Referenced by getDecoderTable().
|
static |
Definition at line 95 of file MSP430Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::Address, llvm::tgtok::Bits, llvm::MCOperand::createReg(), DecodeCGImm(), DecodeMemOperand(), llvm::MCDisassembler::Fail, MI, Reg, and llvm::MCDisassembler::Success.
Referenced by DecodeMemOperand().
|
static |
Definition at line 77 of file MSP430Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), llvm::MCDisassembler::Fail, Reg, and llvm::MCDisassembler::Success.
|
static |
Definition at line 132 of file MSP430Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), DecodeGR16RegisterClass(), llvm::MCDisassembler::Fail, Reg, and llvm::MCDisassembler::Success.
Referenced by DecodeGR16RegisterClass().
Definition at line 158 of file MSP430Disassembler.cpp.
References amAbsolute, amConstant, amImmediate, amIndexed, amIndirect, amIndirectPost, amInvalid, amRegister, amSymbolic, and llvm_unreachable.
Referenced by DecodeSrcAddrModeI(), and DecodeSrcAddrModeII().
Definition at line 185 of file MSP430Disassembler.cpp.
References DecodeSrcAddrMode().
Referenced by getDecoderTable().
Definition at line 191 of file MSP430Disassembler.cpp.
References DecodeSrcAddrMode().
Referenced by getDecoderTable().
|
static |
Definition at line 330 of file MSP430Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::Address, MSP430CC::COND_E, MSP430CC::COND_GE, MSP430CC::COND_HS, MSP430CC::COND_L, MSP430CC::COND_LO, MSP430CC::COND_N, MSP430CC::COND_NE, MSP430CC::COND_NONE, llvm::MCOperand::createImm(), llvm::ArrayRef< T >::data(), llvm::MCDisassembler::Fail, llvm_unreachable, llvm::support::endian::read16le(), llvm::MCInst::setOpcode(), llvm::SignExtend32(), Size, llvm::ArrayRef< T >::size(), and Success.
Referenced by llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getSelectCC(), and llvm::SelectionDAG::getSetCC().
Definition at line 209 of file MSP430Disassembler.cpp.
References llvm::Address, amAbsolute, amConstant, amImmediate, amIndexed, amIndirect, amIndirectPost, amInvalid, amRegister, amSymbolic, assert(), llvm::ArrayRef< T >::data(), DecodeDstAddrMode(), llvm::X86Disassembler::decodeInstruction(), DecodeSrcAddrModeI(), DecodeSrcAddrModeII(), llvm::MCDisassembler::Fail, Fail, llvm_unreachable, llvm::support::endian::read16le(), Size, and llvm::ArrayRef< T >::size().
void LLVMInitializeMSP430Disassembler | ( | ) |
Definition at line 65 of file MSP430Disassembler.cpp.
References createMSP430Disassembler(), llvm::getTheMSP430Target(), and llvm::TargetRegistry::RegisterMCDisassembler().
Definition at line 88 of file MSP430Disassembler.cpp.
Definition at line 70 of file MSP430Disassembler.cpp.