mirror of
https://github.com/Decompollaborate/rabbitizer.git
synced 2025-01-30 06:32:43 +00:00
89 lines
11 KiB
PHP
89 lines
11 KiB
PHP
/* SPDX-FileCopyrightText: © 2022 Decompollaborate */
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
// RSP instructions
|
|
RABBITIZER_DEF_INSTR_ID(rsp, INVALID, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
|
|
// OP vd, vs, vt[elementhigh]
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vmulf, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vmulu, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vrndp, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vmulq, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vmudl, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vmudm, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vmudn, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vmudh, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vmacf, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vmacu, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vrndn, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vmacq, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vmadl, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vmadm, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vmadn, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vmadh, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vadd, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vsub, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vabs, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vaddc, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vsubc, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vsar, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vand, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vnand, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vor, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vnor, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vxor, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vnxor, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vlt, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, veq, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vne, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vge, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vcl, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vch, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vcr, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vmrg, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd, RABBITIZER_REGISTER_TYPE_RSP_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
|
|
// OP vd[vs], vt[elementhigh]
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vrcp, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vrcpl, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}), // operands may be wrong
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vrcph, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vmov, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vrsq, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vrsql, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vrsqh, .operands={RABBITIZER_REGISTER_TYPE_RSP_vd_vs, RABBITIZER_REGISTER_TYPE_RSP_vt_elementhigh}),
|
|
|
|
// OP
|
|
RABBITIZER_DEF_INSTR_ID(rsp, vnop, .operands={}),
|
|
|
|
// OP rt, vd[index]
|
|
RABBITIZER_DEF_INSTR_ID(rsp, mfc2, .operands={RABBITIZER_REGISTER_TYPE_rt, RABBITIZER_REGISTER_TYPE_RSP_vd_index}, .modifiesRt=true),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, mtc2, .operands={RABBITIZER_REGISTER_TYPE_rt, RABBITIZER_REGISTER_TYPE_RSP_vd_index}),
|
|
|
|
// OP rt, rd
|
|
RABBITIZER_DEF_INSTR_ID(rsp, cfc2, .operands={RABBITIZER_REGISTER_TYPE_rt, RABBITIZER_REGISTER_TYPE_rd}, .modifiesRt=true),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, ctc2, .operands={RABBITIZER_REGISTER_TYPE_rt, RABBITIZER_REGISTER_TYPE_rd}),
|
|
|
|
// OP vt[elementlow], offset(vs)
|
|
RABBITIZER_DEF_INSTR_ID(rsp, sbv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, ssv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, slv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, sdv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, sqv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, srv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, spv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, suv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, swv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, shv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, sfv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, stv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, lbv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, lsv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, llv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, ldv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, lqv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, lrv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, lpv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, luv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, lhv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, lfv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|
|
RABBITIZER_DEF_INSTR_ID(rsp, ltv, .operands={RABBITIZER_REGISTER_TYPE_RSP_vt_elementlow, RABBITIZER_REGISTER_TYPE_RSP_offset_rs}),
|