Rizin
unix-like reverse engineering framework and cli tools
|
#include "rsp_idec.h"
Go to the source code of this file.
Classes | |
struct | rsp_operand_decoder |
struct | rsp_instruction_priv |
struct | rsp_op_escape |
Macros | |
#define | RS_DECODER { RSP_OPND_GP_REG, 21, 0x1f, 0, 0, 0, 0, 0 } |
#define | RT_DECODER { RSP_OPND_GP_REG, 16, 0x1f, 0, 0, 0, 0, 0 } |
#define | RD_DECODER { RSP_OPND_GP_REG, 11, 0x1f, 0, 0, 0, 0, 0 } |
#define | SA_DECODER { RSP_OPND_SHIFT_AMOUNT, 6, 0x1f, 0, 0, 0, 0, 0 } |
#define | LUI_DECODER { RSP_OPND_ZIMM, 0, 0xffff, 16, 0, 0, 0, 0 } |
#define | ZIMM_DECODER { RSP_OPND_ZIMM, 0, 0xffff, 0, 0, 0, 0, 0 } |
#define | SIMM_DECODER { RSP_OPND_SIMM, 0, 0, 0, 0, 0xffff, 0x8000, 0 } |
#define | OFFSET_DECODER { RSP_OPND_OFFSET, 0, 0, 0, 0, 0xffff, 0x8000, 2 } |
#define | BASE_OFFSET_DECODER { RSP_OPND_BASE_OFFSET, 21, 0x1f, 0, 0, 0xffff, 0x8000, 0 } |
#define | TARGET_DECODER { RSP_OPND_TARGET, 0, 0x03ff, 2, 0, 0, 0, 0 } |
#define | C0_REG_DECODER { RSP_OPND_C0_REG, 11, 0x0f, 0, 0, 0, 0, 0 } |
#define | C2_CREG_DECODER { RSP_OPND_C2_CREG, 11, 0x03, 0, 0, 0, 0, 0 } |
#define | C2_ACCU_DECODER { RSP_OPND_C2_ACCU, 21, 0x03, 0, 0, 0, 0, 0 } |
#define | VS_DECODER { RSP_OPND_C2_VREG, 11, 0x1f, 0, 0, 0, 0, 0 } |
#define | VD_DECODER { RSP_OPND_C2_VREG, 6, 0x1f, 0, 0, 0, 0, 0 } |
#define | VT_BYTE_DECODER { RSP_OPND_C2_VREG_BYTE, 16, 0x1f, 0, 7, 0xf, 0, 0 } |
#define | VS_BYTE_DECODER { RSP_OPND_C2_VREG_BYTE, 11, 0x1f, 0, 7, 0xf, 0, 0 } |
#define | VT_SCALAR_DECODER { RSP_OPND_C2_VREG_SCALAR, 16, 0x1f, 0, 21, 0x7, 0, 0 } |
#define | VD_SCALAR_DECODER { RSP_OPND_C2_VREG_SCALAR, 6, 0x1f, 0, 11, 0x7, 0, 0 } |
#define | VT_ELEMENT_DECODER { RSP_OPND_C2_VREG_ELEMENT, 16, 0x1f, 0, 21, 0xf, 0, 0 } |
#define | BASE_VOFFSET1_DECODER { RSP_OPND_BASE_OFFSET, 21, 0x1f, 0, 0, 0x7f, 0x40, 0 } |
#define | BASE_VOFFSET2_DECODER { RSP_OPND_BASE_OFFSET, 21, 0x1f, 0, 0, 0x7f, 0x40, 1 } |
#define | BASE_VOFFSET4_DECODER { RSP_OPND_BASE_OFFSET, 21, 0x1f, 0, 0, 0x7f, 0x40, 2 } |
#define | BASE_VOFFSET8_DECODER { RSP_OPND_BASE_OFFSET, 21, 0x1f, 0, 0, 0x7f, 0x40, 3 } |
#define | BASE_VOFFSET16_DECODER { RSP_OPND_BASE_OFFSET, 21, 0x1f, 0, 0, 0x7f, 0x40, 4 } |
#define | OPNDS_NONE 0, |
#define | OPNDS_TARGET 1, { TARGET_DECODER } |
#define | OPNDS_RS_OFFSET 2, { RS_DECODER, OFFSET_DECODER } |
#define | OPNDS_RS_RT_OFFSET 3, { RS_DECODER, RT_DECODER, OFFSET_DECODER } |
#define | OPNDS_RT_BASE_OFFSET 2, { RT_DECODER, BASE_OFFSET_DECODER } |
#define | OPNDS_RS 1, { RS_DECODER } |
#define | OPNDS_RT_LUI 2, { RT_DECODER, LUI_DECODER } |
#define | OPNDS_RT_RS_SIMM 3, { RT_DECODER, RS_DECODER, SIMM_DECODER } |
#define | OPNDS_RT_RS_ZIMM 3, { RT_DECODER, RS_DECODER, ZIMM_DECODER } |
#define | OPNDS_RD_RT_SA 3, { RD_DECODER, RT_DECODER, SA_DECODER } |
#define | OPNDS_RD_RT_RS 3, { RD_DECODER, RT_DECODER, RS_DECODER } |
#define | OPNDS_RD_RS_RT 3, { RD_DECODER, RS_DECODER, RT_DECODER } |
#define | OPNDS_RT_C0_REG 2, { RT_DECODER, C0_REG_DECODER } |
#define | OPNDS_RT_C2_CREG 2, { RT_DECODER, C2_CREG_DECODER } |
#define | OPNDS_RT_VSB 2, { RT_DECODER, VS_BYTE_DECODER } |
#define | OPNDS_VDS_VTS 2, { VD_SCALAR_DECODER, VT_SCALAR_DECODER } |
#define | OPNDS_VTB_BASE_OFFSET1 2, { VT_BYTE_DECODER, BASE_VOFFSET1_DECODER } |
#define | OPNDS_VTB_BASE_OFFSET2 2, { VT_BYTE_DECODER, BASE_VOFFSET2_DECODER } |
#define | OPNDS_VTB_BASE_OFFSET4 2, { VT_BYTE_DECODER, BASE_VOFFSET4_DECODER } |
#define | OPNDS_VTB_BASE_OFFSET8 2, { VT_BYTE_DECODER, BASE_VOFFSET8_DECODER } |
#define | OPNDS_VTB_BASE_OFFSET16 2, { VT_BYTE_DECODER, BASE_VOFFSET16_DECODER } |
#define | OPNDS_VD_VS_C2_ACCU 3, { VD_DECODER, VS_DECODER, C2_ACCU_DECODER } |
#define | OPNDS_VD_VS_VTE 3, { VD_DECODER, VS_DECODER, VT_ELEMENT_DECODER } |
#define | INVALID { "invalid", RSP_OP_INVALID, OPNDS_NONE } |
#define | NOP { "nop", RSP_OP_NOP, OPNDS_NONE } |
#define | SLL { "sll", RSP_OP_SLL, OPNDS_RD_RT_SA } |
#define | SRL { "srl", RSP_OP_SRL, OPNDS_RD_RT_SA } |
#define | SRA { "sra", RSP_OP_SRA, OPNDS_RD_RT_SA } |
#define | SLLV { "sllv", RSP_OP_SLLV, OPNDS_RD_RT_RS } |
#define | SRLV { "srlv", RSP_OP_SRLV, OPNDS_RD_RT_RS } |
#define | SRAV { "srav", RSP_OP_SRAV, OPNDS_RD_RT_RS } |
#define | JR { "jr", RSP_OP_JR, OPNDS_RS } |
#define | BREAK { "break", RSP_OP_BREAK, OPNDS_NONE } |
#define | ADD { "add", RSP_OP_ADD, OPNDS_RD_RS_RT } |
#define | ADDU { "addu", RSP_OP_ADDU, OPNDS_RD_RS_RT } |
#define | SUB { "sub", RSP_OP_SUB, OPNDS_RD_RS_RT } |
#define | SUBU { "subu", RSP_OP_SUBU, OPNDS_RD_RS_RT } |
#define | AND { "and", RSP_OP_AND, OPNDS_RD_RS_RT } |
#define | OR { "or", RSP_OP_OR, OPNDS_RD_RS_RT } |
#define | XOR { "xor", RSP_OP_XOR, OPNDS_RD_RS_RT } |
#define | NOR { "nor", RSP_OP_NOR, OPNDS_RD_RS_RT } |
#define | SLT { "slt", RSP_OP_SLT, OPNDS_RD_RS_RT } |
#define | SLTU { "sltu", RSP_OP_SLTU, OPNDS_RD_RS_RT } |
#define | BLTZ { "bltz", RSP_OP_BLTZ, OPNDS_RS_OFFSET } |
#define | BGEZ { "bgez", RSP_OP_BGEZ, OPNDS_RS_OFFSET } |
#define | BLTZAL { "bltzal", RSP_OP_BLTZAL, OPNDS_RS_OFFSET } |
#define | BGEZAL { "bgezal", RSP_OP_BGEZAL, OPNDS_RS_OFFSET } |
#define | MFC0 { "mfc0", RSP_OP_MFC0, OPNDS_RT_C0_REG } |
#define | MTC0 { "mtc0", RSP_OP_MTC0, OPNDS_RT_C0_REG } |
#define | MFC2 { "mfc2", RSP_OP_MFC2, OPNDS_RT_VSB } |
#define | MTC2 { "mtc2", RSP_OP_MTC2, OPNDS_RT_VSB } |
#define | CFC2 { "cfc2", RSP_OP_CFC2, OPNDS_RT_C2_CREG } |
#define | CTC2 { "ctc2", RSP_OP_CTC2, OPNDS_RT_C2_CREG } |
#define | VMULF { "vmulf", RSP_OP_VMULF, OPNDS_VD_VS_VTE } |
#define | VMULU { "vmulu", RSP_OP_VMULU, OPNDS_VD_VS_VTE } |
#define | VMUDL { "vmudl", RSP_OP_VMUDL, OPNDS_VD_VS_VTE } |
#define | VMUDM { "vmudm", RSP_OP_VMUDM, OPNDS_VD_VS_VTE } |
#define | VMUDN { "vmudn", RSP_OP_VMUDN, OPNDS_VD_VS_VTE } |
#define | VMUDH { "vmudh", RSP_OP_VMUDH, OPNDS_VD_VS_VTE } |
#define | VMACF { "vmacf", RSP_OP_VMACF, OPNDS_VD_VS_VTE } |
#define | VMACU { "vmacu", RSP_OP_VMACU, OPNDS_VD_VS_VTE } |
#define | VMADL { "vmadl", RSP_OP_VMADL, OPNDS_VD_VS_VTE } |
#define | VMADM { "vmadm", RSP_OP_VMADM, OPNDS_VD_VS_VTE } |
#define | VMADN { "vmadn", RSP_OP_VMADN, OPNDS_VD_VS_VTE } |
#define | VMADH { "vmadh", RSP_OP_VMADH, OPNDS_VD_VS_VTE } |
#define | VADD { "vadd", RSP_OP_VADD, OPNDS_VD_VS_VTE } |
#define | VSUB { "vsub", RSP_OP_VSUB, OPNDS_VD_VS_VTE } |
#define | VABS { "vabs", RSP_OP_VABS, OPNDS_VD_VS_VTE } |
#define | VADDC { "vaddc", RSP_OP_VADDC, OPNDS_VD_VS_VTE } |
#define | VSUBC { "vsubc", RSP_OP_VSUBC, OPNDS_VD_VS_VTE } |
#define | VSAR { "vsar", RSP_OP_VSAR, OPNDS_VD_VS_C2_ACCU } |
#define | VLT { "vlt", RSP_OP_VLT, OPNDS_VD_VS_VTE } |
#define | VEQ { "veq", RSP_OP_VEQ, OPNDS_VD_VS_VTE } |
#define | VNE { "vne", RSP_OP_VNE, OPNDS_VD_VS_VTE } |
#define | VGE { "vge", RSP_OP_VGE, OPNDS_VD_VS_VTE } |
#define | VCL { "vcl", RSP_OP_VCL, OPNDS_VD_VS_VTE } |
#define | VCH { "vch", RSP_OP_VCH, OPNDS_VD_VS_VTE } |
#define | VCR { "vcr", RSP_OP_VCR, OPNDS_VD_VS_VTE } |
#define | VMRG { "vmrg", RSP_OP_VMRG, OPNDS_VD_VS_VTE } |
#define | VAND { "vand", RSP_OP_VAND, OPNDS_VD_VS_VTE } |
#define | VNAND { "vnand", RSP_OP_VNAND, OPNDS_VD_VS_VTE } |
#define | VOR { "vor", RSP_OP_VOR, OPNDS_VD_VS_VTE } |
#define | VNOR { "vnor", RSP_OP_VNOR, OPNDS_VD_VS_VTE } |
#define | VXOR { "vxor", RSP_OP_VXOR, OPNDS_VD_VS_VTE } |
#define | VNXOR { "vnxor", RSP_OP_VNXOR, OPNDS_VD_VS_VTE } |
#define | VRCP { "vrcp", RSP_OP_VRCP, OPNDS_VDS_VTS } |
#define | VRCPL { "vrcpl", RSP_OP_VRCPL, OPNDS_VDS_VTS } |
#define | VRCPH { "vrcph", RSP_OP_VRCPH, OPNDS_VDS_VTS } |
#define | VMOV { "vmov", RSP_OP_VMOV, OPNDS_VDS_VTS } |
#define | VRSQ { "vrsq", RSP_OP_VRSQ, OPNDS_VDS_VTS } |
#define | VRSQL { "vrsql", RSP_OP_VRSQL, OPNDS_VDS_VTS } |
#define | VRSQH { "vrsqh", RSP_OP_VRSQH, OPNDS_VDS_VTS } |
#define | VNOP { "vnop", RSP_OP_VNOP, OPNDS_NONE } |
#define | LBV { "lbv", RSP_OP_LBV, OPNDS_VTB_BASE_OFFSET1 } |
#define | LSV { "lsv", RSP_OP_LSV, OPNDS_VTB_BASE_OFFSET2 } |
#define | LLV { "llv", RSP_OP_LLV, OPNDS_VTB_BASE_OFFSET4 } |
#define | LDV { "ldv", RSP_OP_LDV, OPNDS_VTB_BASE_OFFSET8 } |
#define | LQV { "lqv", RSP_OP_LQV, OPNDS_VTB_BASE_OFFSET16 } |
#define | LRV { "lrv", RSP_OP_LRV, OPNDS_VTB_BASE_OFFSET16 } |
#define | LPV { "lpv", RSP_OP_LPV, OPNDS_VTB_BASE_OFFSET8 } |
#define | LUV { "luv", RSP_OP_LUV, OPNDS_VTB_BASE_OFFSET8 } |
#define | LHV { "lhv", RSP_OP_LHV, OPNDS_VTB_BASE_OFFSET16 } |
#define | LFV { "lfv", RSP_OP_LFV, OPNDS_VTB_BASE_OFFSET16 } |
#define | LTV { "ltv", RSP_OP_LTV, OPNDS_VTB_BASE_OFFSET16 } |
#define | SBV { "sbv", RSP_OP_SBV, OPNDS_VTB_BASE_OFFSET1 } |
#define | SSV { "ssv", RSP_OP_SSV, OPNDS_VTB_BASE_OFFSET2 } |
#define | SLV { "slv", RSP_OP_SLV, OPNDS_VTB_BASE_OFFSET4 } |
#define | SDV { "sdv", RSP_OP_SDV, OPNDS_VTB_BASE_OFFSET8 } |
#define | SQV { "sqv", RSP_OP_SQV, OPNDS_VTB_BASE_OFFSET16 } |
#define | SRV { "srv", RSP_OP_SRV, OPNDS_VTB_BASE_OFFSET8 } |
#define | SPV { "spv", RSP_OP_SPV, OPNDS_VTB_BASE_OFFSET8 } |
#define | SUV { "suv", RSP_OP_SUV, OPNDS_VTB_BASE_OFFSET16 } |
#define | SHV { "shv", RSP_OP_SHV, OPNDS_VTB_BASE_OFFSET16 } |
#define | SFV { "sfv", RSP_OP_SFV, OPNDS_VTB_BASE_OFFSET16 } |
#define | SWV { "swv", RSP_OP_SWV, OPNDS_VTB_BASE_OFFSET16 } |
#define | STV { "stv", RSP_OP_STV, OPNDS_VTB_BASE_OFFSET16 } |
#define | J { "j", RSP_OP_J, OPNDS_TARGET } |
#define | JAL { "jal", RSP_OP_JAL, OPNDS_TARGET } |
#define | BEQ { "beq", RSP_OP_BEQ, OPNDS_RS_RT_OFFSET } |
#define | BNE { "bne", RSP_OP_BNE, OPNDS_RS_RT_OFFSET } |
#define | BLEZ { "blez", RSP_OP_BLEZ, OPNDS_RS_RT_OFFSET } |
#define | BGTZ { "bgtz", RSP_OP_BGTZ, OPNDS_RS_RT_OFFSET } |
#define | ADDI { "addi", RSP_OP_ADDI, OPNDS_RT_RS_SIMM } |
#define | ADDIU { "addiu", RSP_OP_ADDIU, OPNDS_RT_RS_SIMM } |
#define | SLTI { "slti", RSP_OP_SLTI, OPNDS_RT_RS_SIMM } |
#define | SLTIU { "sltiu", RSP_OP_SLTIU, OPNDS_RT_RS_SIMM } |
#define | ANDI { "andi", RSP_OP_ANDI, OPNDS_RT_RS_ZIMM } |
#define | ORI { "ori", RSP_OP_ORI, OPNDS_RT_RS_ZIMM } |
#define | XORI { "xori", RSP_OP_XORI, OPNDS_RT_RS_ZIMM } |
#define | LUI { "lui", RSP_OP_LUI, OPNDS_RT_LUI } |
#define | LB { "lb", RSP_OP_LB, OPNDS_RT_BASE_OFFSET } |
#define | LH { "lh", RSP_OP_LH, OPNDS_RT_BASE_OFFSET } |
#define | LW { "lw", RSP_OP_LW, OPNDS_RT_BASE_OFFSET } |
#define | LBU { "lbu", RSP_OP_LBU, OPNDS_RT_BASE_OFFSET } |
#define | LHU { "lhu", RSP_OP_LHU, OPNDS_RT_BASE_OFFSET } |
#define | SB { "sb", RSP_OP_SB, OPNDS_RT_BASE_OFFSET } |
#define | SH { "sh", RSP_OP_SH, OPNDS_RT_BASE_OFFSET } |
#define | SW { "sw", RSP_OP_SW, OPNDS_RT_BASE_OFFSET } |
#define | SPECIAL { 0, 0, 0x3f } |
#define | REGIMM { 64, 16, 0x1f } |
#define | COP0 { 96, 21, 0x1f } |
#define | COP2 { 128, 21, 0x1f } |
#define | VECTOP { 160, 0, 0x3f } |
#define | LWC2 { 224, 11, 0x1f } |
#define | SWC2 { 256, 11, 0x1f } |
#define | MAIN { 288, 26, 0x3f } |
Functions | |
static const rsp_instruction_priv * | rsp_decode_priv (ut32 iw) |
static st32 | rsp_sign_extend (st32 x, st32 m) |
static rsp_operand | rsp_operand_decode (ut64 pc, ut32 iw, const rsp_operand_decoder *odec) |
rsp_instruction | rsp_instruction_decode (ut64 pc, ut32 iw) |
Variables | |
const char * | rsp_gp_reg_soft_names [] |
const char * | rsp_c0_reg_soft_names [] |
const char * | rsp_gp_reg_names [] |
const char * | rsp_c0_reg_names [] |
const char * | rsp_c2_creg_names [] |
const char * | rsp_c2_accu_names [] |
const char * | rsp_c2_vreg_names [] |
const char * | rsp_c2_vreg_element_names [] |
static const rsp_instruction_priv | rsp_op_table [] |
static const rsp_op_escape | rsp_escapes_table [] |
#define ADD { "add", RSP_OP_ADD, OPNDS_RD_RS_RT } |
Definition at line 200 of file rsp_idec.c.
#define ADDI { "addi", RSP_OP_ADDI, OPNDS_RT_RS_SIMM } |
Definition at line 378 of file rsp_idec.c.
#define ADDIU { "addiu", RSP_OP_ADDIU, OPNDS_RT_RS_SIMM } |
Definition at line 380 of file rsp_idec.c.
#define ADDU { "addu", RSP_OP_ADDU, OPNDS_RD_RS_RT } |
Definition at line 202 of file rsp_idec.c.
#define AND { "and", RSP_OP_AND, OPNDS_RD_RS_RT } |
Definition at line 208 of file rsp_idec.c.
#define ANDI { "andi", RSP_OP_ANDI, OPNDS_RT_RS_ZIMM } |
Definition at line 386 of file rsp_idec.c.
#define BASE_OFFSET_DECODER { RSP_OPND_BASE_OFFSET, 21, 0x1f, 0, 0, 0xffff, 0x8000, 0 } |
Definition at line 97 of file rsp_idec.c.
#define BASE_VOFFSET16_DECODER { RSP_OPND_BASE_OFFSET, 21, 0x1f, 0, 0, 0x7f, 0x40, 4 } |
Definition at line 129 of file rsp_idec.c.
#define BASE_VOFFSET1_DECODER { RSP_OPND_BASE_OFFSET, 21, 0x1f, 0, 0, 0x7f, 0x40, 0 } |
Definition at line 121 of file rsp_idec.c.
#define BASE_VOFFSET2_DECODER { RSP_OPND_BASE_OFFSET, 21, 0x1f, 0, 0, 0x7f, 0x40, 1 } |
Definition at line 123 of file rsp_idec.c.
#define BASE_VOFFSET4_DECODER { RSP_OPND_BASE_OFFSET, 21, 0x1f, 0, 0, 0x7f, 0x40, 2 } |
Definition at line 125 of file rsp_idec.c.
#define BASE_VOFFSET8_DECODER { RSP_OPND_BASE_OFFSET, 21, 0x1f, 0, 0, 0x7f, 0x40, 3 } |
Definition at line 127 of file rsp_idec.c.
#define BEQ { "beq", RSP_OP_BEQ, OPNDS_RS_RT_OFFSET } |
Definition at line 370 of file rsp_idec.c.
#define BGEZ { "bgez", RSP_OP_BGEZ, OPNDS_RS_OFFSET } |
Definition at line 222 of file rsp_idec.c.
#define BGEZAL { "bgezal", RSP_OP_BGEZAL, OPNDS_RS_OFFSET } |
Definition at line 226 of file rsp_idec.c.
#define BGTZ { "bgtz", RSP_OP_BGTZ, OPNDS_RS_RT_OFFSET } |
Definition at line 376 of file rsp_idec.c.
#define BLEZ { "blez", RSP_OP_BLEZ, OPNDS_RS_RT_OFFSET } |
Definition at line 374 of file rsp_idec.c.
#define BLTZ { "bltz", RSP_OP_BLTZ, OPNDS_RS_OFFSET } |
Definition at line 220 of file rsp_idec.c.
#define BLTZAL { "bltzal", RSP_OP_BLTZAL, OPNDS_RS_OFFSET } |
Definition at line 224 of file rsp_idec.c.
#define BNE { "bne", RSP_OP_BNE, OPNDS_RS_RT_OFFSET } |
Definition at line 372 of file rsp_idec.c.
#define BREAK { "break", RSP_OP_BREAK, OPNDS_NONE } |
Definition at line 198 of file rsp_idec.c.
#define C0_REG_DECODER { RSP_OPND_C0_REG, 11, 0x0f, 0, 0, 0, 0, 0 } |
Definition at line 101 of file rsp_idec.c.
#define C2_ACCU_DECODER { RSP_OPND_C2_ACCU, 21, 0x03, 0, 0, 0, 0, 0 } |
Definition at line 105 of file rsp_idec.c.
#define C2_CREG_DECODER { RSP_OPND_C2_CREG, 11, 0x03, 0, 0, 0, 0, 0 } |
Definition at line 103 of file rsp_idec.c.
#define CFC2 { "cfc2", RSP_OP_CFC2, OPNDS_RT_C2_CREG } |
Definition at line 236 of file rsp_idec.c.
#define COP0 { 96, 21, 0x1f } |
Definition at line 508 of file rsp_idec.c.
#define COP2 { 128, 21, 0x1f } |
Definition at line 510 of file rsp_idec.c.
#define CTC2 { "ctc2", RSP_OP_CTC2, OPNDS_RT_C2_CREG } |
Definition at line 238 of file rsp_idec.c.
#define INVALID { "invalid", RSP_OP_INVALID, OPNDS_NONE } |
Definition at line 180 of file rsp_idec.c.
#define J { "j", RSP_OP_J, OPNDS_TARGET } |
Definition at line 366 of file rsp_idec.c.
#define JAL { "jal", RSP_OP_JAL, OPNDS_TARGET } |
Definition at line 368 of file rsp_idec.c.
#define JR { "jr", RSP_OP_JR, OPNDS_RS } |
Definition at line 196 of file rsp_idec.c.
#define LB { "lb", RSP_OP_LB, OPNDS_RT_BASE_OFFSET } |
Definition at line 394 of file rsp_idec.c.
#define LBU { "lbu", RSP_OP_LBU, OPNDS_RT_BASE_OFFSET } |
Definition at line 400 of file rsp_idec.c.
#define LBV { "lbv", RSP_OP_LBV, OPNDS_VTB_BASE_OFFSET1 } |
Definition at line 320 of file rsp_idec.c.
#define LDV { "ldv", RSP_OP_LDV, OPNDS_VTB_BASE_OFFSET8 } |
Definition at line 326 of file rsp_idec.c.
#define LFV { "lfv", RSP_OP_LFV, OPNDS_VTB_BASE_OFFSET16 } |
Definition at line 338 of file rsp_idec.c.
#define LH { "lh", RSP_OP_LH, OPNDS_RT_BASE_OFFSET } |
Definition at line 396 of file rsp_idec.c.
#define LHU { "lhu", RSP_OP_LHU, OPNDS_RT_BASE_OFFSET } |
Definition at line 402 of file rsp_idec.c.
#define LHV { "lhv", RSP_OP_LHV, OPNDS_VTB_BASE_OFFSET16 } |
Definition at line 336 of file rsp_idec.c.
#define LLV { "llv", RSP_OP_LLV, OPNDS_VTB_BASE_OFFSET4 } |
Definition at line 324 of file rsp_idec.c.
#define LPV { "lpv", RSP_OP_LPV, OPNDS_VTB_BASE_OFFSET8 } |
Definition at line 332 of file rsp_idec.c.
#define LQV { "lqv", RSP_OP_LQV, OPNDS_VTB_BASE_OFFSET16 } |
Definition at line 328 of file rsp_idec.c.
#define LRV { "lrv", RSP_OP_LRV, OPNDS_VTB_BASE_OFFSET16 } |
Definition at line 330 of file rsp_idec.c.
#define LSV { "lsv", RSP_OP_LSV, OPNDS_VTB_BASE_OFFSET2 } |
Definition at line 322 of file rsp_idec.c.
#define LTV { "ltv", RSP_OP_LTV, OPNDS_VTB_BASE_OFFSET16 } |
Definition at line 340 of file rsp_idec.c.
#define LUI { "lui", RSP_OP_LUI, OPNDS_RT_LUI } |
Definition at line 392 of file rsp_idec.c.
#define LUI_DECODER { RSP_OPND_ZIMM, 0, 0xffff, 16, 0, 0, 0, 0 } |
Definition at line 89 of file rsp_idec.c.
#define LUV { "luv", RSP_OP_LUV, OPNDS_VTB_BASE_OFFSET8 } |
Definition at line 334 of file rsp_idec.c.
#define LW { "lw", RSP_OP_LW, OPNDS_RT_BASE_OFFSET } |
Definition at line 398 of file rsp_idec.c.
#define LWC2 { 224, 11, 0x1f } |
Definition at line 514 of file rsp_idec.c.
#define MAIN { 288, 26, 0x3f } |
Definition at line 518 of file rsp_idec.c.
#define MFC0 { "mfc0", RSP_OP_MFC0, OPNDS_RT_C0_REG } |
Definition at line 228 of file rsp_idec.c.
#define MFC2 { "mfc2", RSP_OP_MFC2, OPNDS_RT_VSB } |
Definition at line 232 of file rsp_idec.c.
#define MTC0 { "mtc0", RSP_OP_MTC0, OPNDS_RT_C0_REG } |
Definition at line 230 of file rsp_idec.c.
#define MTC2 { "mtc2", RSP_OP_MTC2, OPNDS_RT_VSB } |
Definition at line 234 of file rsp_idec.c.
#define NOP { "nop", RSP_OP_NOP, OPNDS_NONE } |
Definition at line 182 of file rsp_idec.c.
#define NOR { "nor", RSP_OP_NOR, OPNDS_RD_RS_RT } |
Definition at line 214 of file rsp_idec.c.
#define OFFSET_DECODER { RSP_OPND_OFFSET, 0, 0, 0, 0, 0xffff, 0x8000, 2 } |
Definition at line 95 of file rsp_idec.c.
#define OPNDS_NONE 0, |
Definition at line 133 of file rsp_idec.c.
#define OPNDS_RD_RS_RT 3, { RD_DECODER, RS_DECODER, RT_DECODER } |
Definition at line 154 of file rsp_idec.c.
#define OPNDS_RD_RT_RS 3, { RD_DECODER, RT_DECODER, RS_DECODER } |
Definition at line 152 of file rsp_idec.c.
#define OPNDS_RD_RT_SA 3, { RD_DECODER, RT_DECODER, SA_DECODER } |
Definition at line 150 of file rsp_idec.c.
#define OPNDS_RS 1, { RS_DECODER } |
Definition at line 142 of file rsp_idec.c.
#define OPNDS_RS_OFFSET 2, { RS_DECODER, OFFSET_DECODER } |
Definition at line 136 of file rsp_idec.c.
#define OPNDS_RS_RT_OFFSET 3, { RS_DECODER, RT_DECODER, OFFSET_DECODER } |
Definition at line 138 of file rsp_idec.c.
#define OPNDS_RT_BASE_OFFSET 2, { RT_DECODER, BASE_OFFSET_DECODER } |
Definition at line 140 of file rsp_idec.c.
#define OPNDS_RT_C0_REG 2, { RT_DECODER, C0_REG_DECODER } |
Definition at line 156 of file rsp_idec.c.
#define OPNDS_RT_C2_CREG 2, { RT_DECODER, C2_CREG_DECODER } |
Definition at line 158 of file rsp_idec.c.
#define OPNDS_RT_LUI 2, { RT_DECODER, LUI_DECODER } |
Definition at line 144 of file rsp_idec.c.
#define OPNDS_RT_RS_SIMM 3, { RT_DECODER, RS_DECODER, SIMM_DECODER } |
Definition at line 146 of file rsp_idec.c.
#define OPNDS_RT_RS_ZIMM 3, { RT_DECODER, RS_DECODER, ZIMM_DECODER } |
Definition at line 148 of file rsp_idec.c.
#define OPNDS_RT_VSB 2, { RT_DECODER, VS_BYTE_DECODER } |
Definition at line 160 of file rsp_idec.c.
#define OPNDS_TARGET 1, { TARGET_DECODER } |
Definition at line 134 of file rsp_idec.c.
#define OPNDS_VD_VS_C2_ACCU 3, { VD_DECODER, VS_DECODER, C2_ACCU_DECODER } |
Definition at line 174 of file rsp_idec.c.
#define OPNDS_VD_VS_VTE 3, { VD_DECODER, VS_DECODER, VT_ELEMENT_DECODER } |
Definition at line 176 of file rsp_idec.c.
#define OPNDS_VDS_VTS 2, { VD_SCALAR_DECODER, VT_SCALAR_DECODER } |
Definition at line 162 of file rsp_idec.c.
#define OPNDS_VTB_BASE_OFFSET1 2, { VT_BYTE_DECODER, BASE_VOFFSET1_DECODER } |
Definition at line 164 of file rsp_idec.c.
#define OPNDS_VTB_BASE_OFFSET16 2, { VT_BYTE_DECODER, BASE_VOFFSET16_DECODER } |
Definition at line 172 of file rsp_idec.c.
#define OPNDS_VTB_BASE_OFFSET2 2, { VT_BYTE_DECODER, BASE_VOFFSET2_DECODER } |
Definition at line 166 of file rsp_idec.c.
#define OPNDS_VTB_BASE_OFFSET4 2, { VT_BYTE_DECODER, BASE_VOFFSET4_DECODER } |
Definition at line 168 of file rsp_idec.c.
#define OPNDS_VTB_BASE_OFFSET8 2, { VT_BYTE_DECODER, BASE_VOFFSET8_DECODER } |
Definition at line 170 of file rsp_idec.c.
#define OR { "or", RSP_OP_OR, OPNDS_RD_RS_RT } |
Definition at line 210 of file rsp_idec.c.
#define ORI { "ori", RSP_OP_ORI, OPNDS_RT_RS_ZIMM } |
Definition at line 388 of file rsp_idec.c.
#define RD_DECODER { RSP_OPND_GP_REG, 11, 0x1f, 0, 0, 0, 0, 0 } |
Definition at line 85 of file rsp_idec.c.
#define REGIMM { 64, 16, 0x1f } |
Definition at line 506 of file rsp_idec.c.
#define RS_DECODER { RSP_OPND_GP_REG, 21, 0x1f, 0, 0, 0, 0, 0 } |
Definition at line 81 of file rsp_idec.c.
#define RT_DECODER { RSP_OPND_GP_REG, 16, 0x1f, 0, 0, 0, 0, 0 } |
Definition at line 83 of file rsp_idec.c.
#define SA_DECODER { RSP_OPND_SHIFT_AMOUNT, 6, 0x1f, 0, 0, 0, 0, 0 } |
Definition at line 87 of file rsp_idec.c.
#define SB { "sb", RSP_OP_SB, OPNDS_RT_BASE_OFFSET } |
Definition at line 404 of file rsp_idec.c.
#define SBV { "sbv", RSP_OP_SBV, OPNDS_VTB_BASE_OFFSET1 } |
Definition at line 342 of file rsp_idec.c.
#define SDV { "sdv", RSP_OP_SDV, OPNDS_VTB_BASE_OFFSET8 } |
Definition at line 348 of file rsp_idec.c.
#define SFV { "sfv", RSP_OP_SFV, OPNDS_VTB_BASE_OFFSET16 } |
Definition at line 360 of file rsp_idec.c.
#define SH { "sh", RSP_OP_SH, OPNDS_RT_BASE_OFFSET } |
Definition at line 406 of file rsp_idec.c.
#define SHV { "shv", RSP_OP_SHV, OPNDS_VTB_BASE_OFFSET16 } |
Definition at line 358 of file rsp_idec.c.
#define SIMM_DECODER { RSP_OPND_SIMM, 0, 0, 0, 0, 0xffff, 0x8000, 0 } |
Definition at line 93 of file rsp_idec.c.
#define SLL { "sll", RSP_OP_SLL, OPNDS_RD_RT_SA } |
Definition at line 184 of file rsp_idec.c.
#define SLLV { "sllv", RSP_OP_SLLV, OPNDS_RD_RT_RS } |
Definition at line 190 of file rsp_idec.c.
#define SLT { "slt", RSP_OP_SLT, OPNDS_RD_RS_RT } |
Definition at line 216 of file rsp_idec.c.
#define SLTI { "slti", RSP_OP_SLTI, OPNDS_RT_RS_SIMM } |
Definition at line 382 of file rsp_idec.c.
#define SLTIU { "sltiu", RSP_OP_SLTIU, OPNDS_RT_RS_SIMM } |
Definition at line 384 of file rsp_idec.c.
#define SLTU { "sltu", RSP_OP_SLTU, OPNDS_RD_RS_RT } |
Definition at line 218 of file rsp_idec.c.
#define SLV { "slv", RSP_OP_SLV, OPNDS_VTB_BASE_OFFSET4 } |
Definition at line 346 of file rsp_idec.c.
#define SPECIAL { 0, 0, 0x3f } |
Definition at line 504 of file rsp_idec.c.
#define SPV { "spv", RSP_OP_SPV, OPNDS_VTB_BASE_OFFSET8 } |
Definition at line 354 of file rsp_idec.c.
#define SQV { "sqv", RSP_OP_SQV, OPNDS_VTB_BASE_OFFSET16 } |
Definition at line 350 of file rsp_idec.c.
#define SRA { "sra", RSP_OP_SRA, OPNDS_RD_RT_SA } |
Definition at line 188 of file rsp_idec.c.
#define SRAV { "srav", RSP_OP_SRAV, OPNDS_RD_RT_RS } |
Definition at line 194 of file rsp_idec.c.
#define SRL { "srl", RSP_OP_SRL, OPNDS_RD_RT_SA } |
Definition at line 186 of file rsp_idec.c.
#define SRLV { "srlv", RSP_OP_SRLV, OPNDS_RD_RT_RS } |
Definition at line 192 of file rsp_idec.c.
#define SRV { "srv", RSP_OP_SRV, OPNDS_VTB_BASE_OFFSET8 } |
Definition at line 352 of file rsp_idec.c.
#define SSV { "ssv", RSP_OP_SSV, OPNDS_VTB_BASE_OFFSET2 } |
Definition at line 344 of file rsp_idec.c.
#define STV { "stv", RSP_OP_STV, OPNDS_VTB_BASE_OFFSET16 } |
Definition at line 364 of file rsp_idec.c.
#define SUB { "sub", RSP_OP_SUB, OPNDS_RD_RS_RT } |
Definition at line 204 of file rsp_idec.c.
#define SUBU { "subu", RSP_OP_SUBU, OPNDS_RD_RS_RT } |
Definition at line 206 of file rsp_idec.c.
#define SUV { "suv", RSP_OP_SUV, OPNDS_VTB_BASE_OFFSET16 } |
Definition at line 356 of file rsp_idec.c.
#define SW { "sw", RSP_OP_SW, OPNDS_RT_BASE_OFFSET } |
Definition at line 408 of file rsp_idec.c.
#define SWC2 { 256, 11, 0x1f } |
Definition at line 516 of file rsp_idec.c.
#define SWV { "swv", RSP_OP_SWV, OPNDS_VTB_BASE_OFFSET16 } |
Definition at line 362 of file rsp_idec.c.
#define TARGET_DECODER { RSP_OPND_TARGET, 0, 0x03ff, 2, 0, 0, 0, 0 } |
Definition at line 99 of file rsp_idec.c.
#define VABS { "vabs", RSP_OP_VABS, OPNDS_VD_VS_VTE } |
Definition at line 268 of file rsp_idec.c.
#define VADD { "vadd", RSP_OP_VADD, OPNDS_VD_VS_VTE } |
Definition at line 264 of file rsp_idec.c.
#define VADDC { "vaddc", RSP_OP_VADDC, OPNDS_VD_VS_VTE } |
Definition at line 270 of file rsp_idec.c.
#define VAND { "vand", RSP_OP_VAND, OPNDS_VD_VS_VTE } |
Definition at line 292 of file rsp_idec.c.
#define VCH { "vch", RSP_OP_VCH, OPNDS_VD_VS_VTE } |
Definition at line 286 of file rsp_idec.c.
#define VCL { "vcl", RSP_OP_VCL, OPNDS_VD_VS_VTE } |
Definition at line 284 of file rsp_idec.c.
#define VCR { "vcr", RSP_OP_VCR, OPNDS_VD_VS_VTE } |
Definition at line 288 of file rsp_idec.c.
#define VD_DECODER { RSP_OPND_C2_VREG, 6, 0x1f, 0, 0, 0, 0, 0 } |
Definition at line 109 of file rsp_idec.c.
#define VD_SCALAR_DECODER { RSP_OPND_C2_VREG_SCALAR, 6, 0x1f, 0, 11, 0x7, 0, 0 } |
Definition at line 117 of file rsp_idec.c.
#define VECTOP { 160, 0, 0x3f } |
Definition at line 512 of file rsp_idec.c.
#define VEQ { "veq", RSP_OP_VEQ, OPNDS_VD_VS_VTE } |
Definition at line 278 of file rsp_idec.c.
#define VGE { "vge", RSP_OP_VGE, OPNDS_VD_VS_VTE } |
Definition at line 282 of file rsp_idec.c.
#define VLT { "vlt", RSP_OP_VLT, OPNDS_VD_VS_VTE } |
Definition at line 276 of file rsp_idec.c.
#define VMACF { "vmacf", RSP_OP_VMACF, OPNDS_VD_VS_VTE } |
Definition at line 252 of file rsp_idec.c.
#define VMACU { "vmacu", RSP_OP_VMACU, OPNDS_VD_VS_VTE } |
Definition at line 254 of file rsp_idec.c.
#define VMADH { "vmadh", RSP_OP_VMADH, OPNDS_VD_VS_VTE } |
Definition at line 262 of file rsp_idec.c.
#define VMADL { "vmadl", RSP_OP_VMADL, OPNDS_VD_VS_VTE } |
Definition at line 256 of file rsp_idec.c.
#define VMADM { "vmadm", RSP_OP_VMADM, OPNDS_VD_VS_VTE } |
Definition at line 258 of file rsp_idec.c.
#define VMADN { "vmadn", RSP_OP_VMADN, OPNDS_VD_VS_VTE } |
Definition at line 260 of file rsp_idec.c.
#define VMOV { "vmov", RSP_OP_VMOV, OPNDS_VDS_VTS } |
Definition at line 310 of file rsp_idec.c.
#define VMRG { "vmrg", RSP_OP_VMRG, OPNDS_VD_VS_VTE } |
Definition at line 290 of file rsp_idec.c.
#define VMUDH { "vmudh", RSP_OP_VMUDH, OPNDS_VD_VS_VTE } |
Definition at line 250 of file rsp_idec.c.
#define VMUDL { "vmudl", RSP_OP_VMUDL, OPNDS_VD_VS_VTE } |
Definition at line 244 of file rsp_idec.c.
#define VMUDM { "vmudm", RSP_OP_VMUDM, OPNDS_VD_VS_VTE } |
Definition at line 246 of file rsp_idec.c.
#define VMUDN { "vmudn", RSP_OP_VMUDN, OPNDS_VD_VS_VTE } |
Definition at line 248 of file rsp_idec.c.
#define VMULF { "vmulf", RSP_OP_VMULF, OPNDS_VD_VS_VTE } |
Definition at line 240 of file rsp_idec.c.
#define VMULU { "vmulu", RSP_OP_VMULU, OPNDS_VD_VS_VTE } |
Definition at line 242 of file rsp_idec.c.
#define VNAND { "vnand", RSP_OP_VNAND, OPNDS_VD_VS_VTE } |
Definition at line 294 of file rsp_idec.c.
#define VNE { "vne", RSP_OP_VNE, OPNDS_VD_VS_VTE } |
Definition at line 280 of file rsp_idec.c.
#define VNOP { "vnop", RSP_OP_VNOP, OPNDS_NONE } |
Definition at line 318 of file rsp_idec.c.
#define VNOR { "vnor", RSP_OP_VNOR, OPNDS_VD_VS_VTE } |
Definition at line 298 of file rsp_idec.c.
#define VNXOR { "vnxor", RSP_OP_VNXOR, OPNDS_VD_VS_VTE } |
Definition at line 302 of file rsp_idec.c.
#define VOR { "vor", RSP_OP_VOR, OPNDS_VD_VS_VTE } |
Definition at line 296 of file rsp_idec.c.
#define VRCP { "vrcp", RSP_OP_VRCP, OPNDS_VDS_VTS } |
Definition at line 304 of file rsp_idec.c.
#define VRCPH { "vrcph", RSP_OP_VRCPH, OPNDS_VDS_VTS } |
Definition at line 308 of file rsp_idec.c.
#define VRCPL { "vrcpl", RSP_OP_VRCPL, OPNDS_VDS_VTS } |
Definition at line 306 of file rsp_idec.c.
#define VRSQ { "vrsq", RSP_OP_VRSQ, OPNDS_VDS_VTS } |
Definition at line 312 of file rsp_idec.c.
#define VRSQH { "vrsqh", RSP_OP_VRSQH, OPNDS_VDS_VTS } |
Definition at line 316 of file rsp_idec.c.
#define VRSQL { "vrsql", RSP_OP_VRSQL, OPNDS_VDS_VTS } |
Definition at line 314 of file rsp_idec.c.
#define VS_BYTE_DECODER { RSP_OPND_C2_VREG_BYTE, 11, 0x1f, 0, 7, 0xf, 0, 0 } |
Definition at line 113 of file rsp_idec.c.
#define VS_DECODER { RSP_OPND_C2_VREG, 11, 0x1f, 0, 0, 0, 0, 0 } |
Definition at line 107 of file rsp_idec.c.
#define VSAR { "vsar", RSP_OP_VSAR, OPNDS_VD_VS_C2_ACCU } |
Definition at line 274 of file rsp_idec.c.
#define VSUB { "vsub", RSP_OP_VSUB, OPNDS_VD_VS_VTE } |
Definition at line 266 of file rsp_idec.c.
#define VSUBC { "vsubc", RSP_OP_VSUBC, OPNDS_VD_VS_VTE } |
Definition at line 272 of file rsp_idec.c.
#define VT_BYTE_DECODER { RSP_OPND_C2_VREG_BYTE, 16, 0x1f, 0, 7, 0xf, 0, 0 } |
Definition at line 111 of file rsp_idec.c.
#define VT_ELEMENT_DECODER { RSP_OPND_C2_VREG_ELEMENT, 16, 0x1f, 0, 21, 0xf, 0, 0 } |
Definition at line 119 of file rsp_idec.c.
#define VT_SCALAR_DECODER { RSP_OPND_C2_VREG_SCALAR, 16, 0x1f, 0, 21, 0x7, 0, 0 } |
Definition at line 115 of file rsp_idec.c.
#define VXOR { "vxor", RSP_OP_VXOR, OPNDS_VD_VS_VTE } |
Definition at line 300 of file rsp_idec.c.
#define XOR { "xor", RSP_OP_XOR, OPNDS_RD_RS_RT } |
Definition at line 212 of file rsp_idec.c.
#define XORI { "xori", RSP_OP_XORI, OPNDS_RT_RS_ZIMM } |
Definition at line 390 of file rsp_idec.c.
#define ZIMM_DECODER { RSP_OPND_ZIMM, 0, 0xffff, 0, 0, 0, 0, 0 } |
Definition at line 91 of file rsp_idec.c.
|
static |
Definition at line 546 of file rsp_idec.c.
References rsp_op_escape::mask, rsp_op_escape::offset, rsp_escapes_table, rsp_op_table, and rsp_op_escape::shift.
Referenced by rsp_instruction_decode().
rsp_instruction rsp_instruction_decode | ( | ut64 | pc, |
ut32 | iw | ||
) |
Definition at line 587 of file rsp_idec.c.
References rsp_instruction_priv::mnemonic, rsp_instruction::mnemonic, rsp_instruction_priv::noperands, rsp_instruction::noperands, rsp_instruction_priv::odecs, rsp_instruction_priv::opcode, rsp_instruction::opcode, rsp_instruction::operands, pc, rsp_decode_priv(), and rsp_operand_decode().
Referenced by disassemble(), and rsp_op().
|
static |
Definition at line 565 of file rsp_idec.c.
References pc, RSP_IMEM_OFFSET, rsp_mem_addr(), RSP_OPND_OFFSET, RSP_OPND_TARGET, rsp_sign_extend(), rsp_operand::s, rsp_operand_decoder::s_lshift, rsp_operand_decoder::s_mask, rsp_operand_decoder::s_shift, rsp_operand_decoder::s_smask, rsp_operand_decoder::type, rsp_operand::type, rsp_operand::u, rsp_operand_decoder::u_lshift, rsp_operand_decoder::u_mask, and rsp_operand_decoder::u_shift.
Referenced by rsp_instruction_decode().
Definition at line 558 of file rsp_idec.c.
References regress::m, and x.
Referenced by rsp_operand_decode().
const char* rsp_c0_reg_names[] |
Definition at line 55 of file rsp_idec.c.
Referenced by rsp_op().
const char* rsp_c0_reg_soft_names[] |
Definition at line 13 of file rsp_idec.c.
Referenced by disassemble().
const char* rsp_c2_accu_names[] |
Definition at line 64 of file rsp_idec.c.
Referenced by disassemble().
const char* rsp_c2_creg_names[] |
Definition at line 60 of file rsp_idec.c.
Referenced by disassemble().
const char* rsp_c2_vreg_element_names[] |
Definition at line 75 of file rsp_idec.c.
Referenced by disassemble().
const char* rsp_c2_vreg_names[] |
Definition at line 68 of file rsp_idec.c.
Referenced by disassemble().
|
static |
const char* rsp_gp_reg_names[] |
Definition at line 20 of file rsp_idec.c.
const char* rsp_gp_reg_soft_names[] |
Definition at line 6 of file rsp_idec.c.
Referenced by disassemble(), and rsp_op().
|
static |
Definition at line 429 of file rsp_idec.c.
Referenced by rsp_decode_priv().