Skip to content

Commit

Permalink
Implement vmov, vabs and vneg
Browse files Browse the repository at this point in the history
  • Loading branch information
AngheloAlf committed Apr 17, 2024
1 parent 069b203 commit 1d8b479
Show file tree
Hide file tree
Showing 8 changed files with 151 additions and 2,095 deletions.
2,094 changes: 3 additions & 2,091 deletions asdf.txt

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions cplusplus/include/generated/UniqueId_enum_class.hpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions include/generated/InstrDescriptor_Descriptors_array.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions include/generated/InstrId_Names_array.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions include/generated/InstrId_enum.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions rabbitizer/InstrId.pyi

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions rust/src/instr_id_enum.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
| = COP2 |0 0|0 0 0|0 0| fmt |t| |p| |
------6-------2----3----2----3---1---------------1---------------
|--000--|--001--|--010--|--011--|--100--|--101--|--110--|--111--| fmt
00 | --- | --- | --- | --- | --- | --- | --- | --- |
01 | --- | --- | --- | --- | --- | --- | --- | --- |
10 | --- | --- | --- | --- | --- | --- | --- | --- |
11 | --- | --- | --- | --- | --- | --- | --- | --- |
00 | vmov.s| vabs.s| vneg.s| --- |vsat0.s|vsat1.s|vzero.s| vocp.s|
01 | vmov.p| vabs.p| vneg.p| vidt.p|vsat0.p|vsat1.p|vzero.p| vocp.p|
10 | vmov.t| vabs.t| vneg.t| --- |vsat0.t|vsat1.t|vzero.t| vocp.t|
11 | vmov.q| vabs.q| vneg.q| vidt.q|vsat0.q|vsat1.q|vzero.q| vocp.q|
tp |-------|-------|-------|-------|-------|-------|-------|-------|
*/

Expand All @@ -20,83 +20,155 @@ vmov.s
------6-------2----3----2----3---1-------7-------1-------7-------
*/

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x00 << 2 | 0x0, vmov_s, vmov.s,
.operands={RAB_OPERAND_r4000allegrex_s_vd, RAB_OPERAND_r4000allegrex_s_vs},
.instrType=RABBITIZER_INSTR_TYPE_R
) // MOVe Single word

/*
vmov.p
31--------26-25-24--21--19----16---14----------8---6------------0
| VFPU4 |0 0|0 0 0|0 0|0 0 0|0| vs |1| vd |
------6-------2----3----2----3---1-------7-------1-------7-------
*/

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x00 << 2 | 0x1, vmov_p, vmov.p,
.operands={RAB_OPERAND_r4000allegrex_p_vd, RAB_OPERAND_r4000allegrex_p_vs},
.instrType=RABBITIZER_INSTR_TYPE_R
) // MOVe Pair word

/*
vmov.t
31--------26-25-24--21--19----16---14----------8---6------------0
| VFPU4 |0 0|0 0 0|0 0|0 0 0|1| vs |0| vd |
------6-------2----3----2----3---1-------7-------1-------7-------
*/

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x00 << 2 | 0x2, vmov_t, vmov.t,
.operands={RAB_OPERAND_r4000allegrex_t_vd, RAB_OPERAND_r4000allegrex_t_vs},
.instrType=RABBITIZER_INSTR_TYPE_R
) // MOVe Triple word

/*
vmov.q
31--------26-25-24--21--19----16---14----------8---6------------0
| VFPU4 |0 0|0 0 0|0 0|0 0 0|1| vs |1| vd |
------6-------2----3----2----3---1-------7-------1-------7-------
*/

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x00 << 2 | 0x3, vmov_q, vmov.q,
.operands={RAB_OPERAND_r4000allegrex_q_vd, RAB_OPERAND_r4000allegrex_q_vs},
.instrType=RABBITIZER_INSTR_TYPE_R
) // MOVe Quad word

/*
vabs.s
31--------26-25-24--21--19----16---14----------8---6------------0
| VFPU4 |0 0|0 0 0|0 0|0 0 1|0| vs |0| vd |
------6-------2----3----2----3---1-------7-------1-------7-------
*/

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x01 << 2 | 0x0, vabs_s, vabs.s,
.operands={RAB_OPERAND_r4000allegrex_s_vd, RAB_OPERAND_r4000allegrex_s_vs},
.instrType=RABBITIZER_INSTR_TYPE_R
) // ABSolute value Single word

/*
vabs.p
31--------26-25-24--21--19----16---14----------8---6------------0
| VFPU4 |0 0|0 0 0|0 0|0 0 1|0| vs |1| vd |
------6-------2----3----2----3---1-------7-------1-------7-------
*/

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x01 << 2 | 0x1, vabs_p, vabs.p,
.operands={RAB_OPERAND_r4000allegrex_p_vd, RAB_OPERAND_r4000allegrex_p_vs},
.instrType=RABBITIZER_INSTR_TYPE_R
) // ABSolute value Pair word

/*
vabs.t
31--------26-25-24--21--19----16---14----------8---6------------0
| VFPU4 |0 0|0 0 0|0 0|0 0 1|1| vs |0| vd |
------6-------2----3----2----3---1-------7-------1-------7-------
*/

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x01 << 2 | 0x2, vabs_t, vabs.t,
.operands={RAB_OPERAND_r4000allegrex_t_vd, RAB_OPERAND_r4000allegrex_t_vs},
.instrType=RABBITIZER_INSTR_TYPE_R
) // ABSolute value Triple word

/*
vabs.q
31--------26-25-24--21--19----16---14----------8---6------------0
| VFPU4 |0 0|0 0 0|0 0|0 0 1|1| vs |1| vd |
------6-------2----3----2----3---1-------7-------1-------7-------
*/

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x01 << 2 | 0x3, vabs_q, vabs.q,
.operands={RAB_OPERAND_r4000allegrex_q_vd, RAB_OPERAND_r4000allegrex_q_vs},
.instrType=RABBITIZER_INSTR_TYPE_R
) // ABSolute value Quad word

/*
vneg.s
31--------26-25-24--21--19----16---14----------8---6------------0
| VFPU4 |0 0|0 0 0|0 0|0 1 0|0| vs |0| vd |
------6-------2----3----2----3---1-------7-------1-------7-------
*/

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x02 << 2 | 0x0, vneg_s, vneg.s,
.operands={RAB_OPERAND_r4000allegrex_s_vd, RAB_OPERAND_r4000allegrex_s_vs},
.instrType=RABBITIZER_INSTR_TYPE_R
) // NEGate Single word

/*
vneg.p
31--------26-25-24--21--19----16---14----------8---6------------0
| VFPU4 |0 0|0 0 0|0 0|0 1 0|0| vs |1| vd |
------6-------2----3----2----3---1-------7-------1-------7-------
*/

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x02 << 2 | 0x1, vneg_p, vneg.p,
.operands={RAB_OPERAND_r4000allegrex_p_vd, RAB_OPERAND_r4000allegrex_p_vs},
.instrType=RABBITIZER_INSTR_TYPE_R
) // NEGate Pair word

/*
vneg.t
31--------26-25-24--21--19----16---14----------8---6------------0
| VFPU4 |0 0|0 0 0|0 0|0 1 0|1| vs |0| vd |
------6-------2----3----2----3---1-------7-------1-------7-------
*/

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x02 << 2 | 0x2, vneg_t, vneg.t,
.operands={RAB_OPERAND_r4000allegrex_t_vd, RAB_OPERAND_r4000allegrex_t_vs},
.instrType=RABBITIZER_INSTR_TYPE_R
) // NEGate Triple word

/*
vneg.q
31--------26-25-24--21--19----16---14----------8---6------------0
| VFPU4 |0 0|0 0 0|0 0|0 1 0|1| vs |1| vd |
------6-------2----3----2----3---1-------7-------1-------7-------
*/

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x02 << 2 | 0x3, vneg_q, vneg.q,
.operands={RAB_OPERAND_r4000allegrex_q_vd, RAB_OPERAND_r4000allegrex_q_vs},
.instrType=RABBITIZER_INSTR_TYPE_R
) // NEGate Quad word

/*
vidt.p
31--------26-25-24--21--19----16---14----------8---6------------0
Expand Down

0 comments on commit 1d8b479

Please sign in to comment.