LLVM 19.0.0git
Macros | Typedefs | Functions
PPCDisassembler.cpp File Reference
#include "MCTargetDesc/PPCMCTargetDesc.h"
#include "TargetInfo/PowerPCTargetInfo.h"
#include "llvm/MC/MCDecoderOps.h"
#include "llvm/MC/MCDisassembler/MCDisassembler.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/Endian.h"
#include "PPCGenDisassemblerTables.inc"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "ppc-disassembler"
 
#define DecodePointerLikeRegClass0   DecodeGPRCRegisterClass
 
#define DecodePointerLikeRegClass1   DecodeGPRC_NOR0RegisterClass
 
#define DecodeQSRCRegisterClass   DecodeQFRCRegisterClass
 
#define DecodeQBRCRegisterClass   DecodeQFRCRegisterClass
 

Typedefs

typedef MCDisassembler::DecodeStatus DecodeStatus
 

Functions

static MCDisassemblercreatePPCDisassembler (const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx)
 
static MCDisassemblercreatePPCLEDisassembler (const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx)
 
LLVM_EXTERNAL_VISIBILITY void LLVMInitializePowerPCDisassembler ()
 
static DecodeStatus decodeCondBrTarget (MCInst &Inst, unsigned Imm, uint64_t, const MCDisassembler *)
 
static DecodeStatus decodeDirectBrTarget (MCInst &Inst, unsigned Imm, uint64_t, const MCDisassembler *)
 
template<std::size_t N>
static DecodeStatus decodeRegisterClass (MCInst &Inst, uint64_t RegNo, const MCPhysReg(&Regs)[N])
 
static DecodeStatus DecodeCRRCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeCRBITRCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeF4RCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeF8RCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeFpRCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeVFRCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeVRRCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeVSRCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeVSFRCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeVSSRCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeGPRCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeGPRC_NOR0RegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeG8RCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeG8pRCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeG8RC_NOX0RegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeSPERCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeACCRCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeWACCRCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeWACC_HIRCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder)
 
DecodeStatus DecodeDMRROWRCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeDMRROWpRCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeDMRRCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder)
 
DecodeStatus DecodeDMRpRCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeVSRpRCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
template<unsigned N>
static DecodeStatus decodeUImmOperand (MCInst &Inst, uint64_t Imm, int64_t Address, const MCDisassembler *Decoder)
 
template<unsigned N>
static DecodeStatus decodeSImmOperand (MCInst &Inst, uint64_t Imm, int64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeImmZeroOperand (MCInst &Inst, uint64_t Imm, int64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeVSRpEvenOperands (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeDispRIXOperand (MCInst &Inst, uint64_t Imm, int64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeDispRIHashOperand (MCInst &Inst, uint64_t Imm, int64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeDispRIX16Operand (MCInst &Inst, uint64_t Imm, int64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeDispSPE8Operand (MCInst &Inst, uint64_t Imm, int64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeDispSPE4Operand (MCInst &Inst, uint64_t Imm, int64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeDispSPE2Operand (MCInst &Inst, uint64_t Imm, int64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeCRBitMOperand (MCInst &Inst, uint64_t Imm, int64_t Address, const MCDisassembler *Decoder)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "ppc-disassembler"

Definition at line 22 of file PPCDisassembler.cpp.

◆ DecodePointerLikeRegClass0

#define DecodePointerLikeRegClass0   DecodeGPRCRegisterClass

Definition at line 184 of file PPCDisassembler.cpp.

◆ DecodePointerLikeRegClass1

#define DecodePointerLikeRegClass1   DecodeGPRC_NOR0RegisterClass

Definition at line 185 of file PPCDisassembler.cpp.

◆ DecodeQBRCRegisterClass

#define DecodeQBRCRegisterClass   DecodeQFRCRegisterClass

Definition at line 245 of file PPCDisassembler.cpp.

◆ DecodeQSRCRegisterClass

#define DecodeQSRCRegisterClass   DecodeQFRCRegisterClass

Definition at line 244 of file PPCDisassembler.cpp.

Typedef Documentation

◆ DecodeStatus

Definition at line 24 of file PPCDisassembler.cpp.

Function Documentation

◆ createPPCDisassembler()

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

Definition at line 41 of file PPCDisassembler.cpp.

Referenced by LLVMInitializePowerPCDisassembler().

◆ createPPCLEDisassembler()

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

Definition at line 47 of file PPCDisassembler.cpp.

Referenced by LLVMInitializePowerPCDisassembler().

◆ DecodeACCRCRegisterClass()

static DecodeStatus DecodeACCRCRegisterClass ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 193 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ decodeCondBrTarget()

static DecodeStatus decodeCondBrTarget ( MCInst Inst,
unsigned  Imm,
uint64_t  ,
const MCDisassembler  
)
static

◆ decodeCRBitMOperand()

static DecodeStatus decodeCRBitMOperand ( MCInst Inst,
uint64_t  Imm,
int64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeCRBITRCRegisterClass()

static DecodeStatus DecodeCRBITRCRegisterClass ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 98 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ DecodeCRRCRegisterClass()

static DecodeStatus DecodeCRRCRegisterClass ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 92 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ decodeDirectBrTarget()

static DecodeStatus decodeDirectBrTarget ( MCInst Inst,
unsigned  Imm,
uint64_t  ,
const MCDisassembler  
)
static

◆ decodeDispRIHashOperand()

static DecodeStatus decodeDispRIHashOperand ( MCInst Inst,
uint64_t  Imm,
int64_t  Address,
const MCDisassembler Decoder 
)
static

◆ decodeDispRIX16Operand()

static DecodeStatus decodeDispRIX16Operand ( MCInst Inst,
uint64_t  Imm,
int64_t  Address,
const MCDisassembler Decoder 
)
static

◆ decodeDispRIXOperand()

static DecodeStatus decodeDispRIXOperand ( MCInst Inst,
uint64_t  Imm,
int64_t  Address,
const MCDisassembler Decoder 
)
static

◆ decodeDispSPE2Operand()

static DecodeStatus decodeDispSPE2Operand ( MCInst Inst,
uint64_t  Imm,
int64_t  Address,
const MCDisassembler Decoder 
)
static

◆ decodeDispSPE4Operand()

static DecodeStatus decodeDispSPE4Operand ( MCInst Inst,
uint64_t  Imm,
int64_t  Address,
const MCDisassembler Decoder 
)
static

◆ decodeDispSPE8Operand()

static DecodeStatus decodeDispSPE8Operand ( MCInst Inst,
uint64_t  Imm,
int64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeDMRpRCRegisterClass()

DecodeStatus DecodeDMRpRCRegisterClass ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const void *  Decoder 
)

Definition at line 233 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ DecodeDMRRCRegisterClass()

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

Definition at line 225 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ DecodeDMRROWpRCRegisterClass()

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

Definition at line 219 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ DecodeDMRROWRCRegisterClass()

DecodeStatus DecodeDMRROWRCRegisterClass ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const void *  Decoder 
)

Definition at line 213 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ DecodeF4RCRegisterClass()

static DecodeStatus DecodeF4RCRegisterClass ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 104 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ DecodeF8RCRegisterClass()

static DecodeStatus DecodeF8RCRegisterClass ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 110 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ DecodeFpRCRegisterClass()

static DecodeStatus DecodeFpRCRegisterClass ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 116 of file PPCDisassembler.cpp.

References decodeRegisterClass(), and llvm::MCDisassembler::Fail.

◆ DecodeG8pRCRegisterClass()

static DecodeStatus DecodeG8pRCRegisterClass ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 172 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ DecodeG8RC_NOX0RegisterClass()

static DecodeStatus DecodeG8RC_NOX0RegisterClass ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 179 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ DecodeG8RCRegisterClass()

static DecodeStatus DecodeG8RCRegisterClass ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 166 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ DecodeGPRC_NOR0RegisterClass()

static DecodeStatus DecodeGPRC_NOR0RegisterClass ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 161 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ DecodeGPRCRegisterClass()

static DecodeStatus DecodeGPRCRegisterClass ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 154 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ decodeImmZeroOperand()

static DecodeStatus decodeImmZeroOperand ( MCInst Inst,
uint64_t  Imm,
int64_t  Address,
const MCDisassembler Decoder 
)
static

◆ decodeRegisterClass()

template<std::size_t N>
static DecodeStatus decodeRegisterClass ( MCInst Inst,
uint64_t  RegNo,
const MCPhysReg(&)  Regs[N] 
)
static

◆ decodeSImmOperand()

template<unsigned N>
static DecodeStatus decodeSImmOperand ( MCInst Inst,
uint64_t  Imm,
int64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeSPERCRegisterClass()

static DecodeStatus DecodeSPERCRegisterClass ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 187 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ decodeUImmOperand()

template<unsigned N>
static DecodeStatus decodeUImmOperand ( MCInst Inst,
uint64_t  Imm,
int64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeVFRCRegisterClass()

static DecodeStatus DecodeVFRCRegisterClass ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 124 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ DecodeVRRCRegisterClass()

static DecodeStatus DecodeVRRCRegisterClass ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 130 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ DecodeVSFRCRegisterClass()

static DecodeStatus DecodeVSFRCRegisterClass ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 142 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ DecodeVSRCRegisterClass()

static DecodeStatus DecodeVSRCRegisterClass ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 136 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ decodeVSRpEvenOperands()

static DecodeStatus decodeVSRpEvenOperands ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeVSRpRCRegisterClass()

static DecodeStatus DecodeVSRpRCRegisterClass ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 238 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ DecodeVSSRCRegisterClass()

static DecodeStatus DecodeVSSRCRegisterClass ( MCInst Inst,
uint64_t  RegNo,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 148 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ DecodeWACC_HIRCRegisterClass()

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

Definition at line 205 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ DecodeWACCRCRegisterClass()

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

Definition at line 199 of file PPCDisassembler.cpp.

References decodeRegisterClass().

◆ LLVMInitializePowerPCDisassembler()

LLVM_EXTERNAL_VISIBILITY void LLVMInitializePowerPCDisassembler ( )