55 uint64_t
Address,
const void *Decoder);
58 uint64_t
Address,
const void *Decoder);
61 uint64_t
Address,
const void *Decoder);
71 uint64_t
Address,
const void *Decoder);
73 #include "LanaiGenDisassemblerTables.inc" 78 if (Bytes.
size() < 4) {
85 (Bytes[0] << 24) | (Bytes[1] << 16) | (Bytes[2] << 8) | (Bytes[3] << 0);
101 AluOp = (Insn >> 8) & 0x7;
105 AluOp |= 0x20 | (((Insn >> 3) & 0xf) << 1);
109 unsigned PQ = (Insn >> PqShift) & 0x3;
144 decodeInstruction(DecoderTableLanai32, Instr, Insn, Address,
this,
STI);
156 Lanai::R0, Lanai::R1, Lanai::PC, Lanai::R3, Lanai::SP, Lanai::FP,
157 Lanai::R6, Lanai::R7, Lanai::RV, Lanai::R9, Lanai::RR1, Lanai::RR2,
158 Lanai::R12, Lanai::R13, Lanai::R14, Lanai::RCA, Lanai::R16, Lanai::R17,
159 Lanai::R18, Lanai::R19, Lanai::R20, Lanai::R21, Lanai::R22, Lanai::R23,
160 Lanai::R24, Lanai::R25, Lanai::R26, Lanai::R27, Lanai::R28, Lanai::R29,
161 Lanai::R30, Lanai::R31};
169 unsigned Reg = GPRDecoderTable[RegNo];
175 uint64_t
Address,
const void *Decoder) {
178 unsigned Register = (Insn >> 18) & 0x1f;
180 unsigned Offset = (Insn & 0xffff);
187 uint64_t
Address,
const void *Decoder) {
190 unsigned Register = (Insn >> 15) & 0x1f;
192 Register = (Insn >> 10) & 0x1f;
199 uint64_t
Address,
const void *Decoder) {
202 unsigned Register = (Insn >> 12) & 0x1f;
204 unsigned Offset = (Insn & 0x3ff);
213 const void *Decoder) {
220 const void *Decoder) {
228 uint64_t
Address,
const void *Decoder) {
229 unsigned Offset = (Insn & 0xffff);
237 const void *Decoder) {
MCDisassembler::DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef< uint8_t > Bytes, uint64_t Address, raw_ostream &CStream) const override
Returns the disassembly of a single instruction.
static DecodeStatus decodeRiMemoryValue(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
This class represents lattice values for constants.
Target & getTheLanaiTarget()
static bool isRRMOpcode(unsigned Opcode)
DecodeStatus
Ternary decode status.
Superclass for all disassemblers.
bool tryAddingSymbolicOperand(MCInst &Inst, int64_t Value, uint64_t Address, bool IsBranch, uint64_t Offset, uint64_t InstSize) const
static void RegisterMCDisassembler(Target &T, Target::MCDisassemblerCtorTy Fn)
RegisterMCDisassembler - Register a MCDisassembler implementation for the given target.
static DecodeStatus decodeRrMemoryValue(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static unsigned makePostOp(unsigned AluOp)
static MCOperand createReg(unsigned Reg)
Context object for machine code objects.
const MCSubtargetInfo & STI
static DecodeStatus decodeBranch(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
Instances of this class represent a single low-level machine instruction.
static const unsigned GPRDecoderTable[]
static DecodeStatus decodePredicateOperand(MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder)
static void PostOperandDecodeAdjust(MCInst &Instr, uint32_t Insn)
size_t size() const
size - Get the array size.
static DecodeStatus DecodeGPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus readInstruction32(ArrayRef< uint8_t > Bytes, uint64_t &Size, uint32_t &Insn)
MCDisassembler::DecodeStatus DecodeStatus
LanaiDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx)
const MCOperand & getOperand(unsigned i) const
#define LLVM_EXTERNAL_VISIBILITY
Target - Wrapper for Target specific information.
static unsigned makePreOp(unsigned AluOp)
static bool isRMOpcode(unsigned Opcode)
static DecodeStatus decodeSplsValue(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
Generic base class for all target subtargets.
void setReg(unsigned Reg)
Set the register number.
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeLanaiDisassembler()
static MCDisassembler * createLanaiDisassembler(const Target &, const MCSubtargetInfo &STI, MCContext &Ctx)
static DecodeStatus decodeShiftImm(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static bool isSPLSOpcode(unsigned Opcode)
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream...
void addOperand(const MCOperand &Op)
unsigned getOpcode() const
static MCOperand createImm(int64_t Val)
Wrapper class representing virtual and physical registers.