📄 mips-dis.c
字号:
"M" 3 bit compare condition code (OP_*_CCC) (only used for mips4 and up) "N" 3 bit branch condition code (OP_*_BCC) (only used for mips4 and up) "S" 5 bit fs source 1 register (OP_*_FS) "T" 5 bit ft source 2 register (OP_*_FT) "R" 5 bit fr source 3 register (OP_*_FR) "V" 5 bit same register used as floating source and destination (OP_*_FS) "W" 5 bit same register used as floating target and destination (OP_*_FT) Coprocessor instructions: "E" 5 bit target register (OP_*_RT) "G" 5 bit destination register (OP_*_RD) "H" 3 bit sel field for (d)mtc* and (d)mfc* (OP_*_SEL) "P" 5 bit performance-monitor register (OP_*_PERFREG) "e" 5 bit vector register byte specifier (OP_*_VECBYTE) "%" 3 bit immediate vr5400 vector alignment operand (OP_*_VECALIGN) see also "k" above "+D" Combined destination register ("G") and sel ("H") for CP0 ops, for pretty-printing in disassembly only. Macro instructions: "A" General 32 bit expression "I" 32 bit immediate (value placed in imm_expr). "+I" 32 bit immediate (value placed in imm2_expr). "F" 64 bit floating point constant in .rdata "L" 64 bit floating point constant in .lit8 "f" 32 bit floating point constant "l" 32 bit floating point constant in .lit4 MDMX instruction operands (note that while these use the FP register fields, they accept both $fN and $vN names for the registers): "O" MDMX alignment offset (OP_*_ALN) "Q" MDMX vector/scalar/immediate source (OP_*_VSEL and OP_*_FT) "X" MDMX destination register (OP_*_FD) "Y" MDMX source register (OP_*_FS) "Z" MDMX source register (OP_*_FT) Other: "()" parens surrounding optional value "," separates operands "[]" brackets around index for vector-op scalar operand specifier (vr5400) "+" Start of extension sequence. Characters used so far, for quick reference when adding more: "%[]<>(),+" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefhijklopqrstuvwxz" Extension character sequences used so far ("+" followed by the following), for quick reference when adding more: "ABCDEFGHI"*//* These are the bits which may be set in the pinfo field of an instructions, if it is not equal to INSN_MACRO. *//* Modifies the general purpose register in OP_*_RD. */#define INSN_WRITE_GPR_D 0x00000001/* Modifies the general purpose register in OP_*_RT. */#define INSN_WRITE_GPR_T 0x00000002/* Modifies general purpose register 31. */#define INSN_WRITE_GPR_31 0x00000004/* Modifies the floating point register in OP_*_FD. */#define INSN_WRITE_FPR_D 0x00000008/* Modifies the floating point register in OP_*_FS. */#define INSN_WRITE_FPR_S 0x00000010/* Modifies the floating point register in OP_*_FT. */#define INSN_WRITE_FPR_T 0x00000020/* Reads the general purpose register in OP_*_RS. */#define INSN_READ_GPR_S 0x00000040/* Reads the general purpose register in OP_*_RT. */#define INSN_READ_GPR_T 0x00000080/* Reads the floating point register in OP_*_FS. */#define INSN_READ_FPR_S 0x00000100/* Reads the floating point register in OP_*_FT. */#define INSN_READ_FPR_T 0x00000200/* Reads the floating point register in OP_*_FR. */#define INSN_READ_FPR_R 0x00000400/* Modifies coprocessor condition code. */#define INSN_WRITE_COND_CODE 0x00000800/* Reads coprocessor condition code. */#define INSN_READ_COND_CODE 0x00001000/* TLB operation. */#define INSN_TLB 0x00002000/* Reads coprocessor register other than floating point register. */#define INSN_COP 0x00004000/* Instruction loads value from memory, requiring delay. */#define INSN_LOAD_MEMORY_DELAY 0x00008000/* Instruction loads value from coprocessor, requiring delay. */#define INSN_LOAD_COPROC_DELAY 0x00010000/* Instruction has unconditional branch delay slot. */#define INSN_UNCOND_BRANCH_DELAY 0x00020000/* Instruction has conditional branch delay slot. */#define INSN_COND_BRANCH_DELAY 0x00040000/* Conditional branch likely: if branch not taken, insn nullified. */#define INSN_COND_BRANCH_LIKELY 0x00080000/* Moves to coprocessor register, requiring delay. */#define INSN_COPROC_MOVE_DELAY 0x00100000/* Loads coprocessor register from memory, requiring delay. */#define INSN_COPROC_MEMORY_DELAY 0x00200000/* Reads the HI register. */#define INSN_READ_HI 0x00400000/* Reads the LO register. */#define INSN_READ_LO 0x00800000/* Modifies the HI register. */#define INSN_WRITE_HI 0x01000000/* Modifies the LO register. */#define INSN_WRITE_LO 0x02000000/* Takes a trap (easier to keep out of delay slot). */#define INSN_TRAP 0x04000000/* Instruction stores value into memory. */#define INSN_STORE_MEMORY 0x08000000/* Instruction uses single precision floating point. */#define FP_S 0x10000000/* Instruction uses double precision floating point. */#define FP_D 0x20000000/* Instruction is part of the tx39's integer multiply family. */#define INSN_MULT 0x40000000/* Instruction synchronize shared memory. */#define INSN_SYNC 0x80000000/* Instruction reads MDMX accumulator. XXX FIXME: No bits left! */#define INSN_READ_MDMX_ACC 0/* Instruction writes MDMX accumulator. XXX FIXME: No bits left! */#define INSN_WRITE_MDMX_ACC 0/* Instruction is actually a macro. It should be ignored by the disassembler, and requires special treatment by the assembler. */#define INSN_MACRO 0xffffffff/* Masks used to mark instructions to indicate which MIPS ISA level they were introduced in. ISAs, as defined below, are logical ORs of these bits, indicating that they support the instructions defined at the given level. */#define INSN_ISA_MASK 0x00000fff#define INSN_ISA1 0x00000001#define INSN_ISA2 0x00000002#define INSN_ISA3 0x00000004#define INSN_ISA4 0x00000008#define INSN_ISA5 0x00000010#define INSN_ISA32 0x00000020#define INSN_ISA64 0x00000040#define INSN_ISA32R2 0x00000080#define INSN_ISA64R2 0x00000100/* Masks used for MIPS-defined ASEs. */#define INSN_ASE_MASK 0x0000f000/* MIPS 16 ASE */#define INSN_MIPS16 0x00002000/* MIPS-3D ASE */#define INSN_MIPS3D 0x00004000/* MDMX ASE */ #define INSN_MDMX 0x00008000/* Chip specific instructions. These are bitmasks. *//* MIPS R4650 instruction. */#define INSN_4650 0x00010000/* LSI R4010 instruction. */#define INSN_4010 0x00020000/* NEC VR4100 instruction. */#define INSN_4100 0x00040000/* Toshiba R3900 instruction. */#define INSN_3900 0x00080000/* MIPS R10000 instruction. */#define INSN_10000 0x00100000/* Broadcom SB-1 instruction. */#define INSN_SB1 0x00200000/* NEC VR4111/VR4181 instruction. */#define INSN_4111 0x00400000/* NEC VR4120 instruction. */#define INSN_4120 0x00800000/* NEC VR5400 instruction. */#define INSN_5400 0x01000000/* NEC VR5500 instruction. */#define INSN_5500 0x02000000/* MIPS ISA defines, use instead of hardcoding ISA level. */#define ISA_UNKNOWN 0 /* Gas internal use. */#define ISA_MIPS1 (INSN_ISA1)#define ISA_MIPS2 (ISA_MIPS1 | INSN_ISA2)#define ISA_MIPS3 (ISA_MIPS2 | INSN_ISA3)#define ISA_MIPS4 (ISA_MIPS3 | INSN_ISA4)#define ISA_MIPS5 (ISA_MIPS4 | INSN_ISA5)#define ISA_MIPS32 (ISA_MIPS2 | INSN_ISA32)#define ISA_MIPS64 (ISA_MIPS5 | INSN_ISA32 | INSN_ISA64)#define ISA_MIPS32R2 (ISA_MIPS32 | INSN_ISA32R2)#define ISA_MIPS64R2 (ISA_MIPS64 | INSN_ISA32R2 | INSN_ISA64R2)/* CPU defines, use instead of hardcoding processor number. Keep this in sync with bfd/archures.c in order for machine selection to work. */#define CPU_UNKNOWN 0 /* Gas internal use. */#define CPU_R3000 3000#define CPU_R3900 3900#define CPU_R4000 4000#define CPU_R4010 4010#define CPU_VR4100 4100#define CPU_R4111 4111#define CPU_VR4120 4120#define CPU_R4300 4300#define CPU_R4400 4400#define CPU_R4600 4600#define CPU_R4650 4650#define CPU_R5000 5000#define CPU_VR5400 5400#define CPU_VR5500 5500#define CPU_R6000 6000#define CPU_RM7000 7000#define CPU_R8000 8000#define CPU_R10000 10000#define CPU_R12000 12000#define CPU_MIPS16 16#define CPU_MIPS32 32#define CPU_MIPS32R2 33#define CPU_MIPS5 5#define CPU_MIPS64 64#define CPU_MIPS64R2 65#define CPU_SB1 12310201 /* octal 'SB', 01. *//* Test for membership in an ISA including chip specific ISAs. INSN is pointer to an element of the opcode table; ISA is the specified ISA/ASE bitmask to test against; and CPU is the CPU specific ISA to test, or zero if no CPU specific ISA test is desired. */#define OPCODE_IS_MEMBER(insn, isa, cpu) \ (((insn)->membership & isa) != 0 \ || (cpu == CPU_R4650 && ((insn)->membership & INSN_4650) != 0) \ || (cpu == CPU_RM7000 && ((insn)->membership & INSN_4650) != 0) \ || (cpu == CPU_R4010 && ((insn)->membership & INSN_4010) != 0) \ || (cpu == CPU_VR4100 && ((insn)->membership & INSN_4100) != 0) \ || (cpu == CPU_R3900 && ((insn)->membership & INSN_3900) != 0) \ || ((cpu == CPU_R10000 || cpu == CPU_R12000) \ && ((insn)->membership & INSN_10000) != 0) \ || (cpu == CPU_SB1 && ((insn)->membership & INSN_SB1) != 0) \ || (cpu == CPU_R4111 && ((insn)->membership & INSN_4111) != 0) \ || (cpu == CPU_VR4120 && ((insn)->membership & INSN_4120) != 0) \ || (cpu == CPU_VR5400 && ((insn)->membership & INSN_5400) != 0) \ || (cpu == CPU_VR5500 && ((insn)->membership & INSN_5500) != 0) \ || 0) /* Please keep this term for easier source merging. *//* This is a list of macro expanded instructions. _I appended means immediate _A appended means address _AB appended means address with base register _D appended means 64 bit floating point constant _S appended means 32 bit floating point constant. */enum{ M_ABS, M_ADD_I, M_ADDU_I, M_AND_I, M_BEQ, M_BEQ_I, M_BEQL_I, M_BGE, M_BGEL, M_BGE_I, M_BGEL_I, M_BGEU, M_BGEUL, M_BGEU_I, M_BGEUL_I, M_BGT, M_BGTL, M_BGT_I, M_BGTL_I, M_BGTU, M_BGTUL, M_BGTU_I, M_BGTUL_I, M_BLE, M_BLEL, M_BLE_I, M_BLEL_I, M_BLEU, M_BLEUL, M_BLEU_I, M_BLEUL_I, M_BLT, M_BLTL, M_BLT_I, M_BLTL_I, M_BLTU, M_BLTUL, M_BLTU_I, M_BLTUL_I, M_BNE, M_BNE_I, M_BNEL_I, M_DABS, M_DADD_I, M_DADDU_I, M_DDIV_3, M_DDIV_3I, M_DDIVU_3,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -