201 __REGIMM_RESERVED_13,
203 __REGIMM_RESERVED_15,
208 __REGIMM_RESERVED_20,
209 __REGIMM_RESERVED_21,
210 __REGIMM_RESERVED_22,
211 __REGIMM_RESERVED_23,
212 __REGIMM_RESERVED_24,
213 __REGIMM_RESERVED_25,
214 __REGIMM_RESERVED_26,
215 __REGIMM_RESERVED_27,
216 __REGIMM_RESERVED_28,
217 __REGIMM_RESERVED_29,
218 __REGIMM_RESERVED_30,
219 __REGIMM_RESERVED_31,
279 __C0_REG_RESERVED_21,
280 __C0_REG_RESERVED_22,
281 __C0_REG_RESERVED_23,
282 __C0_REG_RESERVED_24,
283 __C0_REG_RESERVED_25,
289 __C0_REG_RESERVED_31,
296 __COPZ_RS_RESERVED_3,
300 __COPZ_RS_RESERVED_7,
302 __COPZ_RS_RESERVED_9,
303 __COPZ_RS_RESERVED_10,
304 __COPZ_RS_RESERVED_11,
305 __COPZ_RS_RESERVED_12,
306 __COPZ_RS_RESERVED_13,
307 __COPZ_RS_RESERVED_14,
308 __COPZ_RS_RESERVED_15,
312 __C0_FUNCT_RESERVED_0,
315 __C0_FUNCT_RESERVED_3,
316 __C0_FUNCT_RESERVED_4,
317 __C0_FUNCT_RESERVED_5,
319 __C0_FUNCT_RESERVED_7,
321 __C0_FUNCT_RESERVED_9,
322 __C0_FUNCT_RESERVED_10,
323 __C0_FUNCT_RESERVED_11,
324 __C0_FUNCT_RESERVED_12,
325 __C0_FUNCT_RESERVED_13,
326 __C0_FUNCT_RESERVED_14,
327 __C0_FUNCT_RESERVED_15,
328 __C0_FUNCT_RESERVED_16,
329 __C0_FUNCT_RESERVED_17,
330 __C0_FUNCT_RESERVED_18,
331 __C0_FUNCT_RESERVED_19,
332 __C0_FUNCT_RESERVED_20,
333 __C0_FUNCT_RESERVED_21,
334 __C0_FUNCT_RESERVED_22,
335 __C0_FUNCT_RESERVED_23,
337 __C0_FUNCT_RESERVED_25,
338 __C0_FUNCT_RESERVED_26,
339 __C0_FUNCT_RESERVED_27,
340 __C0_FUNCT_RESERVED_28,
341 __C0_FUNCT_RESERVED_29,
342 __C0_FUNCT_RESERVED_30,
343 __C0_FUNCT_RESERVED_31,
344 __C0_FUNCT_RESERVED_32,
345 __C0_FUNCT_RESERVED_33,
346 __C0_FUNCT_RESERVED_34,
347 __C0_FUNCT_RESERVED_35,
348 __C0_FUNCT_RESERVED_36,
349 __C0_FUNCT_RESERVED_37,
350 __C0_FUNCT_RESERVED_38,
351 __C0_FUNCT_RESERVED_39,
352 __C0_FUNCT_RESERVED_40,
353 __C0_FUNCT_RESERVED_41,
354 __C0_FUNCT_RESERVED_42,
355 __C0_FUNCT_RESERVED_43,
356 __C0_FUNCT_RESERVED_44,
357 __C0_FUNCT_RESERVED_45,
358 __C0_FUNCT_RESERVED_46,
359 __C0_FUNCT_RESERVED_47,
360 __C0_FUNCT_RESERVED_48,
361 __C0_FUNCT_RESERVED_49,
362 __C0_FUNCT_RESERVED_50,
363 __C0_FUNCT_RESERVED_51,
364 __C0_FUNCT_RESERVED_52,
365 __C0_FUNCT_RESERVED_53,
366 __C0_FUNCT_RESERVED_54,
367 __C0_FUNCT_RESERVED_55,
368 __C0_FUNCT_RESERVED_56,
369 __C0_FUNCT_RESERVED_57,
370 __C0_FUNCT_RESERVED_58,
371 __C0_FUNCT_RESERVED_59,
372 __C0_FUNCT_RESERVED_60,
373 __C0_FUNCT_RESERVED_61,
374 __C0_FUNCT_RESERVED_62,
375 __C0_FUNCT_RESERVED_63,
378#define __ASM_I_INST(o, s, t, i) \
379 (((vr4300_instruction_t){.i_type = {.op = (o), .rs = (s), .rt = (t), .imm = (i)&0xFFFF}}).raw)
380#define __ASM_J_INST(o, t) (((vr4300_instruction_t){.j_type = {.op = (o), .target = (t)&0x3FFFFFF}}).raw)
381#define __ASM_R_INST(o, s, t, d, a, f) \
382 (((vr4300_instruction_t){.r_type = {.op = (o), .rs = (s), .rt = (t), .rd = (d), .sa = (a), .funct = (f)}}).raw)
383#define __ASM_C_INST(o, c, f) (((vr4300_instruction_t){.c_type = {.op = (o), .co = (c), .funct = (f)}}).raw)
385#define A_OFFSET(a) ((int16_t)((a)&0xFFFF))
386#define A_BASE(a) ((uint16_t)((((a) >> 16) & 0xFFFF) + (A_OFFSET(a) < 0 ? 1 : 0)))
388#define I_ADDIU(rt, rs, immediate) __ASM_I_INST(OP_ADDIU, rs, rt, immediate)
389#define I_AND(rd, rs, rt) __ASM_R_INST(OP_SPECIAL, rs, rt, rd, 0, FUNCT_AND)
390#define I_ANDI(rt, rs, immediate) __ASM_I_INST(OP_ANDI, rs, rt, immediate)
391#define I_BEQ(rs, rt, offset) __ASM_I_INST(OP_BEQ, rs, rt, offset)
392#define I_BGTZ(rs, offset) __ASM_I_INST(OP_BGTZ, rs, 0, offset)
393#define I_BNE(rs, rt, offset) __ASM_I_INST(OP_BNE, rs, rt, offset)
394#define I_BNEL(rs, rt, offset) __ASM_I_INST(OP_BNEL, rs, rt, offset)
395#define I_CACHE(op, offset, base) __ASM_I_INST(OP_CACHE, base, op, offset)
396#define I_ERET() __ASM_C_INST(OP_COP0, 1, C0_FUNCT_ERET)
397#define I_J(target) __ASM_J_INST(OP_J, (target >> 2))
398#define I_JR(rs) __ASM_R_INST(OP_SPECIAL, rs, REG_ZERO, REG_ZERO, 0, FUNCT_JR)
399#define I_LBU(rt, offset, base) __ASM_I_INST(OP_LBU, base, rt, offset)
400#define I_LHU(rt, offset, base) __ASM_I_INST(OP_LHU, base, rt, offset)
401#define I_LUI(rt, immediate) __ASM_I_INST(OP_LUI, 0, rt, immediate)
402#define I_LW(rt, offset, base) __ASM_I_INST(OP_LW, base, rt, offset)
403#define I_MFC0(rt, rd) __ASM_R_INST(OP_COP0, COPZ_RS_MF, rt, rd, 0, 0)
404#define I_MTC0(rt, rd) __ASM_R_INST(OP_COP0, COPZ_RS_MT, rt, rd, 0, 0)
405#define I_NOP() __ASM_R_INST(OP_SPECIAL, REG_ZERO, REG_ZERO, REG_ZERO, 0, FUNCT_SSL)
406#define I_OR(rd, rs, rt) __ASM_R_INST(OP_SPECIAL, rs, rt, rd, 0, FUNCT_OR)
407#define I_ORI(rt, rs, immediate) __ASM_I_INST(OP_ORI, rs, rt, immediate)
408#define I_SB(rt, offset, base) __ASM_I_INST(OP_SB, base, rt, offset)
409#define I_SH(rt, offset, base) __ASM_I_INST(OP_SH, base, rt, offset)
410#define I_SRL(rd, rt, sa) __ASM_R_INST(OP_SPECIAL, 0, rt, rd, sa, FUNCT_SRL)
411#define I_SW(rt, offset, base) __ASM_I_INST(OP_SW, base, rt, offset)
vr4300_op_t
VR4300 Opcode Enumeration.
Definition vr4300_asm.h:53
uint32_t raw
Definition vr4300_asm.h:18
VR4300 Instruction Structure.
Definition vr4300_asm.h:17