LLVM 17.0.0git
Macros | Typedefs | Functions
SystemZDisassembler.cpp File Reference
#include "MCTargetDesc/SystemZMCTargetDesc.h"
#include "SystemZ.h"
#include "TargetInfo/SystemZTargetInfo.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/MathExtras.h"
#include <cassert>
#include <cstdint>
#include "SystemZGenDisassemblerTables.inc"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "systemz-disassembler"
 

Typedefs

typedef MCDisassembler::DecodeStatus DecodeStatus
 

Functions

static MCDisassemblercreateSystemZDisassembler (const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx)
 
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSystemZDisassembler ()
 
static bool tryAddingSymbolicOperand (int64_t Value, bool isBranch, uint64_t Address, uint64_t Offset, uint64_t Width, MCInst &MI, const MCDisassembler *Decoder)
 tryAddingSymbolicOperand - trys to add a symbolic operand in place of the immediate Value in the MCInst.
 
static DecodeStatus decodeRegisterClass (MCInst &Inst, uint64_t RegNo, const unsigned *Regs, unsigned Size)
 
static DecodeStatus DecodeGR32BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeGRH32BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeGR64BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeGR128BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeADDR64BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeFP32BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeFP64BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeFP128BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeVR32BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeVR64BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeVR128BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeAR32BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeCR64BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
template<unsigned N>
static DecodeStatus decodeUImmOperand (MCInst &Inst, uint64_t Imm)
 
template<unsigned N>
static DecodeStatus decodeSImmOperand (MCInst &Inst, uint64_t Imm)
 
static DecodeStatus decodeU1ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeU2ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeU3ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeU4ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeU8ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeU12ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeU16ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeU32ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeS8ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeS16ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeS32ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const MCDisassembler *Decoder)
 
template<unsigned N>
static DecodeStatus decodePCDBLOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, bool isBranch, const MCDisassembler *Decoder)
 
static DecodeStatus decodePC12DBLBranchOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodePC16DBLBranchOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodePC24DBLBranchOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodePC32DBLBranchOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodePC32DBLOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeBDAddr12Operand (MCInst &Inst, uint64_t Field, const unsigned *Regs)
 
static DecodeStatus decodeBDAddr20Operand (MCInst &Inst, uint64_t Field, const unsigned *Regs)
 
static DecodeStatus decodeBDXAddr12Operand (MCInst &Inst, uint64_t Field, const unsigned *Regs)
 
static DecodeStatus decodeBDXAddr20Operand (MCInst &Inst, uint64_t Field, const unsigned *Regs)
 
static DecodeStatus decodeBDLAddr12Len4Operand (MCInst &Inst, uint64_t Field, const unsigned *Regs)
 
static DecodeStatus decodeBDLAddr12Len8Operand (MCInst &Inst, uint64_t Field, const unsigned *Regs)
 
static DecodeStatus decodeBDRAddr12Operand (MCInst &Inst, uint64_t Field, const unsigned *Regs)
 
static DecodeStatus decodeBDVAddr12Operand (MCInst &Inst, uint64_t Field, const unsigned *Regs)
 
static DecodeStatus decodeBDAddr32Disp12Operand (MCInst &Inst, uint64_t Field, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeBDAddr32Disp20Operand (MCInst &Inst, uint64_t Field, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeBDAddr64Disp12Operand (MCInst &Inst, uint64_t Field, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeBDAddr64Disp20Operand (MCInst &Inst, uint64_t Field, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeBDXAddr64Disp12Operand (MCInst &Inst, uint64_t Field, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeBDXAddr64Disp20Operand (MCInst &Inst, uint64_t Field, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeBDLAddr64Disp12Len4Operand (MCInst &Inst, uint64_t Field, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeBDLAddr64Disp12Len8Operand (MCInst &Inst, uint64_t Field, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeBDRAddr64Disp12Operand (MCInst &Inst, uint64_t Field, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeBDVAddr64Disp12Operand (MCInst &Inst, uint64_t Field, uint64_t Address, const MCDisassembler *Decoder)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "systemz-disassembler"

Definition at line 23 of file SystemZDisassembler.cpp.

Typedef Documentation

◆ DecodeStatus

Definition at line 25 of file SystemZDisassembler.cpp.

Function Documentation

◆ createSystemZDisassembler()

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

Definition at line 42 of file SystemZDisassembler.cpp.

Referenced by LLVMInitializeSystemZDisassembler().

◆ DecodeADDR64BitRegisterClass()

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

Definition at line 116 of file SystemZDisassembler.cpp.

References decodeRegisterClass(), and llvm::SystemZMC::GR64Regs.

◆ DecodeAR32BitRegisterClass()

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

Definition at line 157 of file SystemZDisassembler.cpp.

References llvm::SystemZMC::AR32Regs, and decodeRegisterClass().

◆ decodeBDAddr12Operand()

static DecodeStatus decodeBDAddr12Operand ( MCInst Inst,
uint64_t  Field,
const unsigned Regs 
)
static

◆ decodeBDAddr20Operand()

static DecodeStatus decodeBDAddr20Operand ( MCInst Inst,
uint64_t  Field,
const unsigned Regs 
)
static

◆ decodeBDAddr32Disp12Operand()

static DecodeStatus decodeBDAddr32Disp12Operand ( MCInst Inst,
uint64_t  Field,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 387 of file SystemZDisassembler.cpp.

References decodeBDAddr12Operand(), and llvm::SystemZMC::GR32Regs.

◆ decodeBDAddr32Disp20Operand()

static DecodeStatus decodeBDAddr32Disp20Operand ( MCInst Inst,
uint64_t  Field,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 393 of file SystemZDisassembler.cpp.

References decodeBDAddr20Operand(), and llvm::SystemZMC::GR32Regs.

◆ decodeBDAddr64Disp12Operand()

static DecodeStatus decodeBDAddr64Disp12Operand ( MCInst Inst,
uint64_t  Field,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 399 of file SystemZDisassembler.cpp.

References decodeBDAddr12Operand(), and llvm::SystemZMC::GR64Regs.

◆ decodeBDAddr64Disp20Operand()

static DecodeStatus decodeBDAddr64Disp20Operand ( MCInst Inst,
uint64_t  Field,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 405 of file SystemZDisassembler.cpp.

References decodeBDAddr20Operand(), and llvm::SystemZMC::GR64Regs.

◆ decodeBDLAddr12Len4Operand()

static DecodeStatus decodeBDLAddr12Len4Operand ( MCInst Inst,
uint64_t  Field,
const unsigned Regs 
)
static

◆ decodeBDLAddr12Len8Operand()

static DecodeStatus decodeBDLAddr12Len8Operand ( MCInst Inst,
uint64_t  Field,
const unsigned Regs 
)
static

◆ decodeBDLAddr64Disp12Len4Operand()

static DecodeStatus decodeBDLAddr64Disp12Len4Operand ( MCInst Inst,
uint64_t  Field,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ decodeBDLAddr64Disp12Len8Operand()

static DecodeStatus decodeBDLAddr64Disp12Len8Operand ( MCInst Inst,
uint64_t  Field,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ decodeBDRAddr12Operand()

static DecodeStatus decodeBDRAddr12Operand ( MCInst Inst,
uint64_t  Field,
const unsigned Regs 
)
static

◆ decodeBDRAddr64Disp12Operand()

static DecodeStatus decodeBDRAddr64Disp12Operand ( MCInst Inst,
uint64_t  Field,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 436 of file SystemZDisassembler.cpp.

References decodeBDRAddr12Operand(), and llvm::SystemZMC::GR64Regs.

◆ decodeBDVAddr12Operand()

static DecodeStatus decodeBDVAddr12Operand ( MCInst Inst,
uint64_t  Field,
const unsigned Regs 
)
static

◆ decodeBDVAddr64Disp12Operand()

static DecodeStatus decodeBDVAddr64Disp12Operand ( MCInst Inst,
uint64_t  Field,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 442 of file SystemZDisassembler.cpp.

References decodeBDVAddr12Operand(), and llvm::SystemZMC::GR64Regs.

◆ decodeBDXAddr12Operand()

static DecodeStatus decodeBDXAddr12Operand ( MCInst Inst,
uint64_t  Field,
const unsigned Regs 
)
static

◆ decodeBDXAddr20Operand()

static DecodeStatus decodeBDXAddr20Operand ( MCInst Inst,
uint64_t  Field,
const unsigned Regs 
)
static

◆ decodeBDXAddr64Disp12Operand()

static DecodeStatus decodeBDXAddr64Disp12Operand ( MCInst Inst,
uint64_t  Field,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 412 of file SystemZDisassembler.cpp.

References decodeBDXAddr12Operand(), and llvm::SystemZMC::GR64Regs.

◆ decodeBDXAddr64Disp20Operand()

static DecodeStatus decodeBDXAddr64Disp20Operand ( MCInst Inst,
uint64_t  Field,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 418 of file SystemZDisassembler.cpp.

References decodeBDXAddr20Operand(), and llvm::SystemZMC::GR64Regs.

◆ DecodeCR64BitRegisterClass()

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

Definition at line 163 of file SystemZDisassembler.cpp.

References llvm::SystemZMC::CR64Regs, and decodeRegisterClass().

◆ DecodeFP128BitRegisterClass()

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

Definition at line 133 of file SystemZDisassembler.cpp.

References decodeRegisterClass(), and llvm::SystemZMC::FP128Regs.

◆ DecodeFP32BitRegisterClass()

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

Definition at line 121 of file SystemZDisassembler.cpp.

References decodeRegisterClass(), and llvm::SystemZMC::FP32Regs.

◆ DecodeFP64BitRegisterClass()

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

Definition at line 127 of file SystemZDisassembler.cpp.

References decodeRegisterClass(), and llvm::SystemZMC::FP64Regs.

◆ DecodeGR128BitRegisterClass()

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

Definition at line 109 of file SystemZDisassembler.cpp.

References decodeRegisterClass(), and llvm::SystemZMC::GR128Regs.

◆ DecodeGR32BitRegisterClass()

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

Definition at line 91 of file SystemZDisassembler.cpp.

References decodeRegisterClass(), and llvm::SystemZMC::GR32Regs.

◆ DecodeGR64BitRegisterClass()

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

Definition at line 103 of file SystemZDisassembler.cpp.

References decodeRegisterClass(), and llvm::SystemZMC::GR64Regs.

◆ DecodeGRH32BitRegisterClass()

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

Definition at line 97 of file SystemZDisassembler.cpp.

References decodeRegisterClass(), and llvm::SystemZMC::GRH32Regs.

◆ decodePC12DBLBranchOperand()

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

Definition at line 265 of file SystemZDisassembler.cpp.

◆ decodePC16DBLBranchOperand()

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

Definition at line 271 of file SystemZDisassembler.cpp.

◆ decodePC24DBLBranchOperand()

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

Definition at line 277 of file SystemZDisassembler.cpp.

◆ decodePC32DBLBranchOperand()

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

Definition at line 283 of file SystemZDisassembler.cpp.

◆ decodePC32DBLOperand()

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

Definition at line 289 of file SystemZDisassembler.cpp.

◆ decodePCDBLOperand()

template<unsigned N>
static DecodeStatus decodePCDBLOperand ( MCInst Inst,
uint64_t  Imm,
uint64_t  Address,
bool  isBranch,
const MCDisassembler Decoder 
)
static

◆ decodeRegisterClass()

static DecodeStatus decodeRegisterClass ( MCInst Inst,
uint64_t  RegNo,
const unsigned Regs,
unsigned  Size 
)
static

◆ decodeS16ImmOperand()

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

Definition at line 239 of file SystemZDisassembler.cpp.

◆ decodeS32ImmOperand()

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

Definition at line 245 of file SystemZDisassembler.cpp.

◆ decodeS8ImmOperand()

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

Definition at line 233 of file SystemZDisassembler.cpp.

◆ decodeSImmOperand()

template<unsigned N>
static DecodeStatus decodeSImmOperand ( MCInst Inst,
uint64_t  Imm 
)
static

◆ decodeU12ImmOperand()

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

Definition at line 215 of file SystemZDisassembler.cpp.

◆ decodeU16ImmOperand()

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

Definition at line 221 of file SystemZDisassembler.cpp.

◆ decodeU1ImmOperand()

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

Definition at line 185 of file SystemZDisassembler.cpp.

◆ decodeU2ImmOperand()

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

Definition at line 191 of file SystemZDisassembler.cpp.

◆ decodeU32ImmOperand()

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

Definition at line 227 of file SystemZDisassembler.cpp.

◆ decodeU3ImmOperand()

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

Definition at line 197 of file SystemZDisassembler.cpp.

◆ decodeU4ImmOperand()

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

Definition at line 203 of file SystemZDisassembler.cpp.

◆ decodeU8ImmOperand()

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

Definition at line 209 of file SystemZDisassembler.cpp.

◆ decodeUImmOperand()

template<unsigned N>
static DecodeStatus decodeUImmOperand ( MCInst Inst,
uint64_t  Imm 
)
static

◆ DecodeVR128BitRegisterClass()

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

Definition at line 151 of file SystemZDisassembler.cpp.

References decodeRegisterClass(), and llvm::SystemZMC::VR128Regs.

◆ DecodeVR32BitRegisterClass()

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

Definition at line 139 of file SystemZDisassembler.cpp.

References decodeRegisterClass(), and llvm::SystemZMC::VR32Regs.

◆ DecodeVR64BitRegisterClass()

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

Definition at line 145 of file SystemZDisassembler.cpp.

References decodeRegisterClass(), and llvm::SystemZMC::VR64Regs.

◆ LLVMInitializeSystemZDisassembler()

LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSystemZDisassembler ( )

◆ tryAddingSymbolicOperand()

static bool tryAddingSymbolicOperand ( int64_t  Value,
bool  isBranch,
uint64_t  Address,
uint64_t  Offset,
uint64_t  Width,
MCInst MI,
const MCDisassembler Decoder 
)
static

tryAddingSymbolicOperand - trys to add a symbolic operand in place of the immediate Value in the MCInst.

Parameters
Value- The immediate Value, has had any PC adjustment made by the caller.
isBranch- If the instruction is a branch instruction
Address- The starting address of the instruction
Offset- The byte offset to this immediate in the instruction
Width- The byte width of this immediate in the instruction

If the getOpInfo() function was set when setupForSymbolicDisassembly() was called then that function is called to get any symbolic information for the immediate in the instruction using the Address, Offset and Width. If that returns non-zero then the symbolic information it returns is used to create an MCExpr and that is added as an operand to the MCInst. If getOpInfo() returns zero and isBranch is true then a symbol look up for immediate Value is done and if a symbol is found an MCExpr is created with that, else an MCExpr with the immediate Value is created. This function returns true if it adds an operand to the MCInst and false otherwise.

Definition at line 73 of file SystemZDisassembler.cpp.

References isBranch(), MI, llvm::Offset, and llvm::MCDisassembler::tryAddingSymbolicOperand().

Referenced by decodePCDBLOperand().