185 __REGIMM_RESERVED_13,
187 __REGIMM_RESERVED_15,
192 __REGIMM_RESERVED_20,
193 __REGIMM_RESERVED_21,
194 __REGIMM_RESERVED_22,
195 __REGIMM_RESERVED_23,
196 __REGIMM_RESERVED_24,
197 __REGIMM_RESERVED_25,
198 __REGIMM_RESERVED_26,
199 __REGIMM_RESERVED_27,
200 __REGIMM_RESERVED_28,
201 __REGIMM_RESERVED_29,
202 __REGIMM_RESERVED_30,
203 __REGIMM_RESERVED_31,
263 __C0_REG_RESERVED_21,
264 __C0_REG_RESERVED_22,
265 __C0_REG_RESERVED_23,
266 __C0_REG_RESERVED_24,
267 __C0_REG_RESERVED_25,
273 __C0_REG_RESERVED_31,
280 __COPZ_RS_RESERVED_3,
284 __COPZ_RS_RESERVED_7,
286 __COPZ_RS_RESERVED_9,
287 __COPZ_RS_RESERVED_10,
288 __COPZ_RS_RESERVED_11,
289 __COPZ_RS_RESERVED_12,
290 __COPZ_RS_RESERVED_13,
291 __COPZ_RS_RESERVED_14,
292 __COPZ_RS_RESERVED_15,
296 __C0_FUNCT_RESERVED_0,
299 __C0_FUNCT_RESERVED_3,
300 __C0_FUNCT_RESERVED_4,
301 __C0_FUNCT_RESERVED_5,
303 __C0_FUNCT_RESERVED_7,
305 __C0_FUNCT_RESERVED_9,
306 __C0_FUNCT_RESERVED_10,
307 __C0_FUNCT_RESERVED_11,
308 __C0_FUNCT_RESERVED_12,
309 __C0_FUNCT_RESERVED_13,
310 __C0_FUNCT_RESERVED_14,
311 __C0_FUNCT_RESERVED_15,
312 __C0_FUNCT_RESERVED_16,
313 __C0_FUNCT_RESERVED_17,
314 __C0_FUNCT_RESERVED_18,
315 __C0_FUNCT_RESERVED_19,
316 __C0_FUNCT_RESERVED_20,
317 __C0_FUNCT_RESERVED_21,
318 __C0_FUNCT_RESERVED_22,
319 __C0_FUNCT_RESERVED_23,
321 __C0_FUNCT_RESERVED_25,
322 __C0_FUNCT_RESERVED_26,
323 __C0_FUNCT_RESERVED_27,
324 __C0_FUNCT_RESERVED_28,
325 __C0_FUNCT_RESERVED_29,
326 __C0_FUNCT_RESERVED_30,
327 __C0_FUNCT_RESERVED_31,
328 __C0_FUNCT_RESERVED_32,
329 __C0_FUNCT_RESERVED_33,
330 __C0_FUNCT_RESERVED_34,
331 __C0_FUNCT_RESERVED_35,
332 __C0_FUNCT_RESERVED_36,
333 __C0_FUNCT_RESERVED_37,
334 __C0_FUNCT_RESERVED_38,
335 __C0_FUNCT_RESERVED_39,
336 __C0_FUNCT_RESERVED_40,
337 __C0_FUNCT_RESERVED_41,
338 __C0_FUNCT_RESERVED_42,
339 __C0_FUNCT_RESERVED_43,
340 __C0_FUNCT_RESERVED_44,
341 __C0_FUNCT_RESERVED_45,
342 __C0_FUNCT_RESERVED_46,
343 __C0_FUNCT_RESERVED_47,
344 __C0_FUNCT_RESERVED_48,
345 __C0_FUNCT_RESERVED_49,
346 __C0_FUNCT_RESERVED_50,
347 __C0_FUNCT_RESERVED_51,
348 __C0_FUNCT_RESERVED_52,
349 __C0_FUNCT_RESERVED_53,
350 __C0_FUNCT_RESERVED_54,
351 __C0_FUNCT_RESERVED_55,
352 __C0_FUNCT_RESERVED_56,
353 __C0_FUNCT_RESERVED_57,
354 __C0_FUNCT_RESERVED_58,
355 __C0_FUNCT_RESERVED_59,
356 __C0_FUNCT_RESERVED_60,
357 __C0_FUNCT_RESERVED_61,
358 __C0_FUNCT_RESERVED_62,
359 __C0_FUNCT_RESERVED_63,
362#define __ASM_I_INST(o, s, t, i) \
363 (((vr4300_instruction_t){.i_type = {.op = (o), .rs = (s), .rt = (t), .imm = (i)&0xFFFF}}).raw)
364#define __ASM_J_INST(o, t) (((vr4300_instruction_t){.j_type = {.op = (o), .target = (t)&0x3FFFFFF}}).raw)
365#define __ASM_R_INST(o, s, t, d, a, f) \
366 (((vr4300_instruction_t){.r_type = {.op = (o), .rs = (s), .rt = (t), .rd = (d), .sa = (a), .funct = (f)}}).raw)
367#define __ASM_C_INST(o, c, f) (((vr4300_instruction_t){.c_type = {.op = (o), .co = (c), .funct = (f)}}).raw)
369#define A_OFFSET(a) ((int16_t)((a)&0xFFFF))
370#define A_BASE(a) ((uint16_t)((((a) >> 16) & 0xFFFF) + (A_OFFSET(a) < 0 ? 1 : 0)))
372#define I_ADDIU(rt, rs, immediate) __ASM_I_INST(OP_ADDIU, rs, rt, immediate)
373#define I_AND(rd, rs, rt) __ASM_R_INST(OP_SPECIAL, rs, rt, rd, 0, FUNCT_AND)
374#define I_ANDI(rt, rs, immediate) __ASM_I_INST(OP_ANDI, rs, rt, immediate)
375#define I_BEQ(rs, rt, offset) __ASM_I_INST(OP_BEQ, rs, rt, offset)
376#define I_BGTZ(rs, offset) __ASM_I_INST(OP_BGTZ, rs, 0, offset)
377#define I_BNE(rs, rt, offset) __ASM_I_INST(OP_BNE, rs, rt, offset)
378#define I_BNEL(rs, rt, offset) __ASM_I_INST(OP_BNEL, rs, rt, offset)
379#define I_CACHE(op, offset, base) __ASM_I_INST(OP_CACHE, base, op, offset)
380#define I_ERET() __ASM_C_INST(OP_COP0, 1, C0_FUNCT_ERET)
381#define I_J(target) __ASM_J_INST(OP_J, (target >> 2))
382#define I_JR(rs) __ASM_R_INST(OP_SPECIAL, rs, REG_ZERO, REG_ZERO, 0, FUNCT_JR)
383#define I_LBU(rt, offset, base) __ASM_I_INST(OP_LBU, base, rt, offset)
384#define I_LHU(rt, offset, base) __ASM_I_INST(OP_LHU, base, rt, offset)
385#define I_LUI(rt, immediate) __ASM_I_INST(OP_LUI, 0, rt, immediate)
386#define I_LW(rt, offset, base) __ASM_I_INST(OP_LW, base, rt, offset)
387#define I_MFC0(rt, rd) __ASM_R_INST(OP_COP0, COPZ_RS_MF, rt, rd, 0, 0)
388#define I_MTC0(rt, rd) __ASM_R_INST(OP_COP0, COPZ_RS_MT, rt, rd, 0, 0)
389#define I_NOP() __ASM_R_INST(OP_SPECIAL, REG_ZERO, REG_ZERO, REG_ZERO, 0, FUNCT_SSL)
390#define I_OR(rd, rs, rt) __ASM_R_INST(OP_SPECIAL, rs, rt, rd, 0, FUNCT_OR)
391#define I_ORI(rt, rs, immediate) __ASM_I_INST(OP_ORI, rs, rt, immediate)
392#define I_SB(rt, offset, base) __ASM_I_INST(OP_SB, base, rt, offset)
393#define I_SH(rt, offset, base) __ASM_I_INST(OP_SH, base, rt, offset)
394#define I_SRL(rd, rt, sa) __ASM_R_INST(OP_SPECIAL, 0, rt, rd, sa, FUNCT_SRL)
395#define I_SW(rt, offset, base) __ASM_I_INST(OP_SW, base, rt, offset)
Definition: vr4300_asm.h:6