LLVM  8.0.1
Macros | Typedefs | Functions
HexagonDisassembler.cpp File Reference
#include "MCTargetDesc/HexagonBaseInfo.h"
#include "MCTargetDesc/HexagonMCChecker.h"
#include "MCTargetDesc/HexagonMCInstrInfo.h"
#include "MCTargetDesc/HexagonMCTargetDesc.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDisassembler/MCDisassembler.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCFixedLenDisassembler.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <memory>
#include "HexagonDepDecoders.h"
#include "HexagonGenDisassemblerTables.inc"
Include dependency graph for HexagonDisassembler.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "hexagon-disassembler"
 

Typedefs

using DecodeStatus = MCDisassembler::DecodeStatus
 

Functions

static DecodeStatus DecodeIntRegsRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeGeneralSubRegsRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeIntRegsLow8RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeHvxVRRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeDoubleRegsRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeGeneralDoubleLow8RegsRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeHvxWRRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeHvxVQRRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodePredRegsRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeHvxQRRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeCtrRegsRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeGuestRegsRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeModRegsRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeCtrRegs64RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeGuestRegs64RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus unsignedImmDecoder (MCInst &MI, unsigned tmp, uint64_t Address, const void *Decoder)
 
static DecodeStatus s32_0ImmDecoder (MCInst &MI, unsigned tmp, uint64_t, const void *Decoder)
 
static DecodeStatus brtargetDecoder (MCInst &MI, unsigned tmp, uint64_t Address, const void *Decoder)
 
static MCDisassemblercreateHexagonDisassembler (const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx)
 
void LLVMInitializeHexagonDisassembler ()
 
static void adjustDuplex (MCInst &MI, MCContext &Context)
 
static DecodeStatus DecodeRegisterClass (MCInst &Inst, unsigned RegNo, ArrayRef< MCPhysReg > Table)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "hexagon-disassembler"

Definition at line 10 of file HexagonDisassembler.cpp.

Typedef Documentation

◆ DecodeStatus

Definition at line 38 of file HexagonDisassembler.cpp.

Function Documentation

◆ adjustDuplex()

static void adjustDuplex ( MCInst MI,
MCContext Context 
)
static

Definition at line 278 of file HexagonDisassembler.cpp.

References llvm::MCInst::addOperand(), llvm::Address, assert(), llvm::MCInst::begin(), llvm::HexagonMCInstrInfo::bundleInstructions(), llvm::HexagonMCInstrInfo::bundleSize(), llvm::MCConstantExpr::create(), llvm::MCOperand::createExpr(), llvm::MCOperand::createInst(), llvm::ArrayRef< T >::data(), llvm::X86Disassembler::decodeInstruction(), llvm::HexagonMCInstrInfo::extenderForIndex(), llvm::MCDisassembler::Fail, Fail, llvm::MCOperand::getInst(), llvm::HexagonMCInstrInfo::getNewValueOp(), llvm::HexagonMCInstrInfo::getNewValueOperand(), llvm::HexagonMCInstrInfo::getNewValueOperand2(), llvm::MCInst::getOpcode(), llvm::MCInst::getOperand(), llvm::MCOperand::getReg(), llvm::HexagonMCInstrInfo::hasNewValue(), llvm::HexagonMCInstrInfo::hasNewValue2(), HEXAGON_INSTR_SIZE, llvm::MCInst::insert(), llvm::HexagonII::INST_PARSE_DUPLEX, llvm::HexagonII::INST_PARSE_LOOP_END, llvm::HexagonII::INST_PARSE_MASK, llvm::HexagonII::INST_PARSE_PACKET_END, llvm::HexagonMCInstrInfo::isDuplex(), llvm::HexagonMCInstrInfo::isExtendable(), llvm::HexagonMCInstrInfo::isExtended(), llvm::HexagonMCInstrInfo::isImmext(), llvm::HexagonMCInstrInfo::isNewValue(), llvm::MCOperand::isReg(), llvm::HexagonMCInstrInfo::isVector(), MI, llvm::support::endian::read32le(), Register, llvm::HexagonMCInstrInfo::setInnerLoop(), llvm::MCInst::setOpcode(), llvm::HexagonMCInstrInfo::setOuterLoop(), llvm::MCOperand::setReg(), llvm::ArrayRef< T >::size(), llvm::MCDisassembler::Success, and Success.

◆ brtargetDecoder()

static DecodeStatus brtargetDecoder ( MCInst MI,
unsigned  tmp,
uint64_t  Address,
const void *  Decoder 
)
static

◆ createHexagonDisassembler()

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

◆ DecodeCtrRegs64RegisterClass()

static DecodeStatus DecodeCtrRegs64RegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

◆ DecodeCtrRegsRegisterClass()

static DecodeStatus DecodeCtrRegsRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

◆ DecodeDoubleRegsRegisterClass()

static DecodeStatus DecodeDoubleRegsRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

Definition at line 582 of file HexagonDisassembler.cpp.

References DecodeRegisterClass().

◆ DecodeGeneralDoubleLow8RegsRegisterClass()

static DecodeStatus DecodeGeneralDoubleLow8RegsRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

Definition at line 594 of file HexagonDisassembler.cpp.

References DecodeRegisterClass().

◆ DecodeGeneralSubRegsRegisterClass()

static DecodeStatus DecodeGeneralSubRegsRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

Definition at line 553 of file HexagonDisassembler.cpp.

References DecodeRegisterClass(), R2, R4, and R6.

◆ DecodeGuestRegs64RegisterClass()

static DecodeStatus DecodeGuestRegs64RegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

◆ DecodeGuestRegsRegisterClass()

static DecodeStatus DecodeGuestRegsRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

◆ DecodeHvxQRRegisterClass()

static DecodeStatus DecodeHvxQRRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

Definition at line 636 of file HexagonDisassembler.cpp.

References DecodeRegisterClass().

◆ DecodeHvxVQRRegisterClass()

static LLVM_ATTRIBUTE_UNUSED DecodeStatus DecodeHvxVQRRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

Definition at line 616 of file HexagonDisassembler.cpp.

References DecodeRegisterClass().

◆ DecodeHvxVRRegisterClass()

static DecodeStatus DecodeHvxVRRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

◆ DecodeHvxWRRegisterClass()

static DecodeStatus DecodeHvxWRRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

Definition at line 603 of file HexagonDisassembler.cpp.

References DecodeRegisterClass(), and LLVM_ATTRIBUTE_UNUSED.

◆ DecodeIntRegsLow8RegisterClass()

static DecodeStatus DecodeIntRegsLow8RegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

Definition at line 532 of file HexagonDisassembler.cpp.

References DecodeIntRegsRegisterClass().

◆ DecodeIntRegsRegisterClass()

static DecodeStatus DecodeIntRegsRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

Definition at line 538 of file HexagonDisassembler.cpp.

References DecodeRegisterClass(), IntRegDecoderTable, R2, R4, and R6.

Referenced by DecodeIntRegsLow8RegisterClass().

◆ DecodeModRegsRegisterClass()

static DecodeStatus DecodeModRegsRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

◆ DecodePredRegsRegisterClass()

static DecodeStatus DecodePredRegsRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

Definition at line 627 of file HexagonDisassembler.cpp.

References DecodeRegisterClass().

◆ DecodeRegisterClass()

static DecodeStatus DecodeRegisterClass ( MCInst Inst,
unsigned  RegNo,
ArrayRef< MCPhysReg >  Table 
)
static

◆ LLVMInitializeHexagonDisassembler()

void LLVMInitializeHexagonDisassembler ( )

◆ s32_0ImmDecoder()

static DecodeStatus s32_0ImmDecoder ( MCInst MI,
unsigned  tmp,
uint64_t  ,
const void *  Decoder 
)
static

◆ unsignedImmDecoder()

static DecodeStatus unsignedImmDecoder ( MCInst MI,
unsigned  tmp,
uint64_t  Address,
const void *  Decoder 
)
static