|
LLVM
10.0.0
|
#include "MCTargetDesc/SystemZMCTargetDesc.h"#include "SystemZ.h"#include "TargetInfo/SystemZTargetInfo.h"#include "llvm/MC/MCDisassembler/MCDisassembler.h"#include "llvm/MC/MCFixedLenDisassembler.h"#include "llvm/MC/MCInst.h"#include "llvm/MC/MCSubtargetInfo.h"#include "llvm/Support/MathExtras.h"#include "llvm/Support/TargetRegistry.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 MCDisassembler * | createSystemZDisassembler (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 void *Decoder) |
| tryAddingSymbolicOperand - trys to add a symbolic operand in place of the immediate Value in the MCInst. More... | |
| 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 void *Decoder) |
| static DecodeStatus | DecodeGRH32BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) |
| static DecodeStatus | DecodeGR64BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) |
| static DecodeStatus | DecodeGR128BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) |
| static DecodeStatus | DecodeADDR64BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) |
| static DecodeStatus | DecodeFP32BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) |
| static DecodeStatus | DecodeFP64BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) |
| static DecodeStatus | DecodeFP128BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) |
| static DecodeStatus | DecodeVR32BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) |
| static DecodeStatus | DecodeVR64BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) |
| static DecodeStatus | DecodeVR128BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) |
| static DecodeStatus | DecodeAR32BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) |
| static DecodeStatus | DecodeCR64BitRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *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 void *Decoder) |
| static DecodeStatus | decodeU2ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodeU3ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodeU4ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodeU6ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodeU8ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodeU12ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodeU16ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodeU32ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodeS8ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodeS16ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodeS32ImmOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const void *Decoder) |
| template<unsigned N> | |
| static DecodeStatus | decodePCDBLOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, bool isBranch, const void *Decoder) |
| static DecodeStatus | decodePC12DBLBranchOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodePC16DBLBranchOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodePC24DBLBranchOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodePC32DBLBranchOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodePC32DBLOperand (MCInst &Inst, uint64_t Imm, uint64_t Address, const void *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 void *Decoder) |
| static DecodeStatus | decodeBDAddr32Disp20Operand (MCInst &Inst, uint64_t Field, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodeBDAddr64Disp12Operand (MCInst &Inst, uint64_t Field, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodeBDAddr64Disp20Operand (MCInst &Inst, uint64_t Field, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodeBDXAddr64Disp12Operand (MCInst &Inst, uint64_t Field, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodeBDXAddr64Disp20Operand (MCInst &Inst, uint64_t Field, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodeBDLAddr64Disp12Len4Operand (MCInst &Inst, uint64_t Field, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodeBDLAddr64Disp12Len8Operand (MCInst &Inst, uint64_t Field, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodeBDRAddr64Disp12Operand (MCInst &Inst, uint64_t Field, uint64_t Address, const void *Decoder) |
| static DecodeStatus | decodeBDVAddr64Disp12Operand (MCInst &Inst, uint64_t Field, uint64_t Address, const void *Decoder) |
| #define DEBUG_TYPE "systemz-disassembler" |
Definition at line 23 of file SystemZDisassembler.cpp.
Definition at line 25 of file SystemZDisassembler.cpp.
|
static |
Definition at line 42 of file SystemZDisassembler.cpp.
Referenced by LLVMInitializeSystemZDisassembler().
|
static |
Definition at line 116 of file SystemZDisassembler.cpp.
References decodeRegisterClass(), and llvm::SystemZMC::GR64Regs.
|
static |
Definition at line 158 of file SystemZDisassembler.cpp.
References llvm::SystemZMC::AR32Regs, and decodeRegisterClass().
|
static |
Definition at line 291 of file SystemZDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::MCOperand::createReg(), and llvm::MCDisassembler::Success.
Referenced by decodeBDAddr32Disp12Operand(), and decodeBDAddr64Disp12Operand().
|
static |
Definition at line 301 of file SystemZDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::MCOperand::createReg(), and llvm::MCDisassembler::Success.
Referenced by decodeBDAddr32Disp20Operand(), and decodeBDAddr64Disp20Operand().
|
static |
Definition at line 383 of file SystemZDisassembler.cpp.
References decodeBDAddr12Operand(), and llvm::SystemZMC::GR32Regs.
|
static |
Definition at line 389 of file SystemZDisassembler.cpp.
References decodeBDAddr20Operand(), and llvm::SystemZMC::GR32Regs.
|
static |
Definition at line 395 of file SystemZDisassembler.cpp.
References decodeBDAddr12Operand(), and llvm::SystemZMC::GR64Regs.
|
static |
Definition at line 401 of file SystemZDisassembler.cpp.
References decodeBDAddr20Operand(), and llvm::SystemZMC::GR64Regs.
|
static |
Definition at line 335 of file SystemZDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::MCOperand::createReg(), and llvm::MCDisassembler::Success.
Referenced by decodeBDLAddr64Disp12Len4Operand().
|
static |
Definition at line 347 of file SystemZDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::MCOperand::createReg(), and llvm::MCDisassembler::Success.
Referenced by decodeBDLAddr64Disp12Len8Operand().
|
static |
Definition at line 419 of file SystemZDisassembler.cpp.
References decodeBDLAddr12Len4Operand(), and llvm::SystemZMC::GR64Regs.
|
static |
Definition at line 426 of file SystemZDisassembler.cpp.
References decodeBDLAddr12Len8Operand(), and llvm::SystemZMC::GR64Regs.
|
static |
Definition at line 359 of file SystemZDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::MCOperand::createReg(), and llvm::MCDisassembler::Success.
Referenced by decodeBDRAddr64Disp12Operand().
|
static |
Definition at line 433 of file SystemZDisassembler.cpp.
References decodeBDRAddr12Operand(), and llvm::SystemZMC::GR64Regs.
|
static |
Definition at line 371 of file SystemZDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::MCOperand::createReg(), llvm::MCDisassembler::Success, and llvm::SystemZMC::VR128Regs.
Referenced by decodeBDVAddr64Disp12Operand().
|
static |
Definition at line 440 of file SystemZDisassembler.cpp.
References llvm::Address, decodeBDVAddr12Operand(), llvm::MCDisassembler::Fail, llvm::SystemZMC::GR64Regs, I, MI, Size, and llvm::ArrayRef< T >::size().
|
static |
Definition at line 311 of file SystemZDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::MCOperand::createReg(), and llvm::MCDisassembler::Success.
Referenced by decodeBDXAddr64Disp12Operand().
|
static |
Definition at line 323 of file SystemZDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::MCOperand::createReg(), and llvm::MCDisassembler::Success.
Referenced by decodeBDXAddr64Disp20Operand().
|
static |
Definition at line 407 of file SystemZDisassembler.cpp.
References decodeBDXAddr12Operand(), and llvm::SystemZMC::GR64Regs.
|
static |
Definition at line 413 of file SystemZDisassembler.cpp.
References decodeBDXAddr20Operand(), and llvm::SystemZMC::GR64Regs.
|
static |
Definition at line 164 of file SystemZDisassembler.cpp.
References llvm::SystemZMC::CR64Regs, and decodeRegisterClass().
|
static |
Definition at line 134 of file SystemZDisassembler.cpp.
References decodeRegisterClass(), and llvm::SystemZMC::FP128Regs.
|
static |
Definition at line 122 of file SystemZDisassembler.cpp.
References decodeRegisterClass(), and llvm::SystemZMC::FP32Regs.
|
static |
Definition at line 128 of file SystemZDisassembler.cpp.
References decodeRegisterClass(), and llvm::SystemZMC::FP64Regs.
|
static |
Definition at line 110 of file SystemZDisassembler.cpp.
References decodeRegisterClass(), and llvm::SystemZMC::GR128Regs.
|
static |
Definition at line 92 of file SystemZDisassembler.cpp.
References decodeRegisterClass(), and llvm::SystemZMC::GR32Regs.
|
static |
Definition at line 104 of file SystemZDisassembler.cpp.
References decodeRegisterClass(), and llvm::SystemZMC::GR64Regs.
|
static |
Definition at line 98 of file SystemZDisassembler.cpp.
References decodeRegisterClass(), and llvm::SystemZMC::GRH32Regs.
|
static |
Definition at line 261 of file SystemZDisassembler.cpp.
References llvm::Address.
|
static |
Definition at line 267 of file SystemZDisassembler.cpp.
References llvm::Address.
|
static |
Definition at line 273 of file SystemZDisassembler.cpp.
References llvm::Address.
|
static |
Definition at line 279 of file SystemZDisassembler.cpp.
References llvm::Address.
|
static |
Definition at line 285 of file SystemZDisassembler.cpp.
References llvm::Address.
|
static |
Definition at line 247 of file SystemZDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), N, llvm::MCDisassembler::Success, and tryAddingSymbolicOperand().
|
static |
Definition at line 82 of file SystemZDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createReg(), llvm::MCDisassembler::Fail, and llvm::MCDisassembler::Success.
Referenced by DecodeADDR64BitRegisterClass(), DecodeAR32BitRegisterClass(), DecodeCR64BitRegisterClass(), DecodeFP128BitRegisterClass(), DecodeFP32BitRegisterClass(), DecodeFP64BitRegisterClass(), DecodeGR128BitRegisterClass(), DecodeGR32BitRegisterClass(), DecodeGR64BitRegisterClass(), DecodeGRH32BitRegisterClass(), DecodeVR128BitRegisterClass(), DecodeVR32BitRegisterClass(), and DecodeVR64BitRegisterClass().
|
static |
Definition at line 236 of file SystemZDisassembler.cpp.
|
static |
Definition at line 241 of file SystemZDisassembler.cpp.
|
static |
Definition at line 231 of file SystemZDisassembler.cpp.
|
static |
Definition at line 179 of file SystemZDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), llvm::MCDisassembler::Fail, and llvm::MCDisassembler::Success.
|
static |
Definition at line 216 of file SystemZDisassembler.cpp.
|
static |
Definition at line 221 of file SystemZDisassembler.cpp.
|
static |
Definition at line 186 of file SystemZDisassembler.cpp.
|
static |
Definition at line 191 of file SystemZDisassembler.cpp.
|
static |
Definition at line 226 of file SystemZDisassembler.cpp.
|
static |
Definition at line 196 of file SystemZDisassembler.cpp.
|
static |
Definition at line 201 of file SystemZDisassembler.cpp.
|
static |
Definition at line 206 of file SystemZDisassembler.cpp.
|
static |
Definition at line 211 of file SystemZDisassembler.cpp.
|
static |
Definition at line 171 of file SystemZDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), llvm::MCDisassembler::Fail, and llvm::MCDisassembler::Success.
|
static |
Definition at line 152 of file SystemZDisassembler.cpp.
References decodeRegisterClass(), and llvm::SystemZMC::VR128Regs.
|
static |
Definition at line 140 of file SystemZDisassembler.cpp.
References decodeRegisterClass(), and llvm::SystemZMC::VR32Regs.
|
static |
Definition at line 146 of file SystemZDisassembler.cpp.
References decodeRegisterClass(), and llvm::SystemZMC::VR64Regs.
| LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSystemZDisassembler | ( | ) |
Definition at line 48 of file SystemZDisassembler.cpp.
References createSystemZDisassembler(), llvm::getTheSystemZTarget(), and llvm::TargetRegistry::RegisterMCDisassembler().
|
static |
tryAddingSymbolicOperand - trys to add a symbolic operand in place of the immediate Value in the MCInst.
| 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 llvm::MCDisassembler::tryAddingSymbolicOperand().
Referenced by decodePCDBLOperand().
1.8.13