LLVM  9.0.0svn
Macros | Typedefs | Enumerations | Functions | Variables
MSP430Disassembler.cpp File Reference
#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"
Include dependency graph for MSP430Disassembler.cpp:

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 MCDisassemblercreateMSP430Disassembler (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 []
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "msp430-disassembler"

Definition at line 26 of file MSP430Disassembler.cpp.

Typedef Documentation

◆ DecodeStatus

Definition at line 28 of file MSP430Disassembler.cpp.

Enumeration Type Documentation

◆ AddrMode

enum AddrMode
Enumerator
amInvalid 
amRegister 
amIndexed 
amIndirect 
amIndirectPost 
amSymbolic 
amImmediate 
amAbsolute 
amConstant 

Definition at line 145 of file MSP430Disassembler.cpp.

Function Documentation

◆ createMSP430Disassembler()

static MCDisassembler* createMSP430Disassembler ( const Target T,
const MCSubtargetInfo STI,
MCContext Ctx 
)
static

Definition at line 58 of file MSP430Disassembler.cpp.

Referenced by LLVMInitializeMSP430Disassembler().

◆ DecodeCGImm()

static DecodeStatus DecodeCGImm ( MCInst MI,
uint64_t  Bits,
uint64_t  Address,
const void *  Decoder 
)
static

◆ DecodeDstAddrMode()

static AddrMode DecodeDstAddrMode ( unsigned  Insn)
static

Definition at line 196 of file MSP430Disassembler.cpp.

References amAbsolute, amIndexed, amRegister, and amSymbolic.

Referenced by getDecoderTable().

◆ DecodeGR16RegisterClass()

static DecodeStatus DecodeGR16RegisterClass ( MCInst MI,
uint64_t  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

◆ DecodeGR8RegisterClass()

static DecodeStatus DecodeGR8RegisterClass ( MCInst MI,
uint64_t  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

◆ DecodeMemOperand()

static DecodeStatus DecodeMemOperand ( MCInst MI,
uint64_t  Bits,
uint64_t  Address,
const void *  Decoder 
)
static

◆ DecodeSrcAddrMode()

static AddrMode DecodeSrcAddrMode ( unsigned  Rs,
unsigned  As 
)
static

◆ DecodeSrcAddrModeI()

static AddrMode DecodeSrcAddrModeI ( unsigned  Insn)
static

Definition at line 184 of file MSP430Disassembler.cpp.

References DecodeSrcAddrMode().

Referenced by getDecoderTable().

◆ DecodeSrcAddrModeII()

static AddrMode DecodeSrcAddrModeII ( unsigned  Insn)
static

Definition at line 190 of file MSP430Disassembler.cpp.

References DecodeSrcAddrMode().

Referenced by getDecoderTable().

◆ getCondCode()

static MSP430CC::CondCodes getCondCode ( unsigned  Cond)
static

◆ getDecoderTable()

static const uint8_t* getDecoderTable ( AddrMode  SrcAM,
unsigned  Words 
)
static

◆ LLVMInitializeMSP430Disassembler()

void LLVMInitializeMSP430Disassembler ( )

Variable Documentation

◆ GR16DecoderTable

const unsigned GR16DecoderTable[]
static
Initial value:
= {
MSP430::PC, MSP430::SP, MSP430::SR, MSP430::CG,
MSP430::FP, MSP430::R5, MSP430::R6, MSP430::R7,
MSP430::R8, MSP430::R9, MSP430::R10, MSP430::R11,
MSP430::R12, MSP430::R13, MSP430::R14, MSP430::R15
}
#define R6(n)

Definition at line 87 of file MSP430Disassembler.cpp.

◆ GR8DecoderTable

const unsigned GR8DecoderTable[]
static
Initial value:
= {
MSP430::PCB, MSP430::SPB, MSP430::SRB, MSP430::CGB,
MSP430::FPB, MSP430::R5B, MSP430::R6B, MSP430::R7B,
MSP430::R8B, MSP430::R9B, MSP430::R10B, MSP430::R11B,
MSP430::R12B, MSP430::R13B, MSP430::R14B, MSP430::R15B
}

Definition at line 69 of file MSP430Disassembler.cpp.