LLVM  13.0.0git
Macros | Typedefs | Functions
HexagonDisassembler.cpp File Reference
#include "MCTargetDesc/HexagonBaseInfo.h"
#include "MCTargetDesc/HexagonMCChecker.h"
#include "MCTargetDesc/HexagonMCInstrInfo.h"
#include "MCTargetDesc/HexagonMCTargetDesc.h"
#include "TargetInfo/HexagonTargetInfo.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.inc"
#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)
 
LLVM_EXTERNAL_VISIBILITY 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 33 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

◆ 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

Definition at line 153 of file HexagonDisassembler.cpp.

References T.

Referenced by LLVMInitializeHexagonDisassembler().

◆ 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 588 of file HexagonDisassembler.cpp.

References DecodeRegisterClass().

◆ DecodeGeneralDoubleLow8RegsRegisterClass()

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

Definition at line 600 of file HexagonDisassembler.cpp.

References DecodeRegisterClass().

◆ DecodeGeneralSubRegsRegisterClass()

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

Definition at line 559 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 646 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 626 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 609 of file HexagonDisassembler.cpp.

References DecodeRegisterClass().

◆ DecodeIntRegsLow8RegisterClass()

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

Definition at line 538 of file HexagonDisassembler.cpp.

References llvm::Address, and DecodeIntRegsRegisterClass().

◆ DecodeIntRegsRegisterClass()

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

Definition at line 544 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 637 of file HexagonDisassembler.cpp.

References DecodeRegisterClass(), and P2.

◆ DecodeRegisterClass()

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

◆ LLVMInitializeHexagonDisassembler()

LLVM_EXTERNAL_VISIBILITY 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