Skip to content

Commit

Permalink
fix matrix operands
Browse files Browse the repository at this point in the history
  • Loading branch information
AngheloAlf committed Apr 18, 2024
1 parent 1c7401e commit 7239793
Show file tree
Hide file tree
Showing 9 changed files with 574 additions and 3,373 deletions.
10 changes: 5 additions & 5 deletions adsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,14 @@ def do_vfpu6():
if i == 7:
for j in range(1<<2):
if j == 0:
for t in range(1 << 1):
for p in range(1 << 1):
print(f" .word 0x{VFPU6:08X} | 0x{i << 23:08X} | 0x{j << 21:08X} | 0x{VT:08X} | 0x{t << 15:08X} | 0x{VS:08X} | 0x{p << 7:08X} | 0x{VD:08X}")
for k in range(1 << 3):
for t in range(1 << 1):
for p in range(1 << 1):
print(f" .word 0x{VFPU6:08X} | 0x{i << 23:08X} | 0x{j << 21:08X} | 0x{k << 16:08X} | 0x{t << 15:08X} | 0x{VS:08X} | 0x{p << 7:08X} | 0x{VD:08X}")
else:
for t in range(1 << 1):
for p in range(1 << 1):
for k in range(1 << 2):
print(f" .word 0x{VFPU6:08X} | 0x{i << 23:08X} | 0x{j << 21:08X} | 0x{k << 16:08X} | 0x{t << 15:08X} | 0x{VS:08X} | 0x{p << 7:08X} | 0x{VD:08X}")
print(f" .word 0x{VFPU6:08X} | 0x{i << 23:08X} | 0x{j << 21:08X} | 0x{VT:08X} | 0x{t << 15:08X} | 0x{VS:08X} | 0x{p << 7:08X} | 0x{VD:08X}")
else:
for t in range(1 << 1):
for p in range(1 << 1):
Expand Down
3,627 changes: 426 additions & 3,201 deletions asdf.txt

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions include/generated/InstrDescriptor_Descriptors_array.h

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 @@ -27,7 +27,7 @@
*10 = SPECIAL3
*11 = VFPU4
*12 = VFPU5
*13 = VFPU6
*13 = VFPU6 (Matrix operations)
*14 = QUADLR
*15 = VFPU7
*/
Expand Down
20 changes: 10 additions & 10 deletions tables/tables/instr_id/r4000allegrex/r4000allegrex_vfpu6.inc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ vmmul.p

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x00 << 2 | 0x1, vmmul_p, vmmul.p,
.operands={RAB_OPERAND_r4000allegrex_p_vd, RAB_OPERAND_r4000allegrex_p_vs, RAB_OPERAND_r4000allegrex_p_vt},
.operands={RAB_OPERAND_r4000allegrex_mp_vd, RAB_OPERAND_r4000allegrex_mp_vs, RAB_OPERAND_r4000allegrex_mp_vt},
.instrType=RABBITIZER_INSTR_TYPE_R
) // Multiply Pair x Pair Matrix

Expand All @@ -36,7 +36,7 @@ vmmul.t

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x00 << 2 | 0x2, vmmul_t, vmmul.t,
.operands={RAB_OPERAND_r4000allegrex_t_vd, RAB_OPERAND_r4000allegrex_t_vs, RAB_OPERAND_r4000allegrex_t_vt},
.operands={RAB_OPERAND_r4000allegrex_mt_vd, RAB_OPERAND_r4000allegrex_mt_vs, RAB_OPERAND_r4000allegrex_mt_vt},
.instrType=RABBITIZER_INSTR_TYPE_R
) // Multiply Triple x Triple Matrix

Expand All @@ -49,7 +49,7 @@ vmmul.q

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x00 << 2 | 0x3, vmmul_q, vmmul.q,
.operands={RAB_OPERAND_r4000allegrex_q_vd, RAB_OPERAND_r4000allegrex_q_vs, RAB_OPERAND_r4000allegrex_q_vt},
.operands={RAB_OPERAND_r4000allegrex_mq_vd, RAB_OPERAND_r4000allegrex_mq_vs, RAB_OPERAND_r4000allegrex_mq_vt},
.instrType=RABBITIZER_INSTR_TYPE_R
) // Multiply Quad x Quad Matrix

Expand All @@ -62,7 +62,7 @@ vhtfm2.p

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x01 << 2 | 0x0, vhtfm2_p, vhtfm2.p,
.operands={RAB_OPERAND_r4000allegrex_p_vd, RAB_OPERAND_r4000allegrex_p_vs, RAB_OPERAND_r4000allegrex_p_vt},
.operands={RAB_OPERAND_r4000allegrex_p_vd, RAB_OPERAND_r4000allegrex_mp_vs, RAB_OPERAND_r4000allegrex_p_vt},
.instrType=RABBITIZER_INSTR_TYPE_R
) // Homogeneous Transform 2 Pair Word

Expand All @@ -88,7 +88,7 @@ vhtfm3.t

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x02 << 2 | 0x1, vhtfm3_t, vhtfm3.t,
.operands={RAB_OPERAND_r4000allegrex_t_vd, RAB_OPERAND_r4000allegrex_t_vs, RAB_OPERAND_r4000allegrex_t_vt},
.operands={RAB_OPERAND_r4000allegrex_t_vd, RAB_OPERAND_r4000allegrex_mt_vs, RAB_OPERAND_r4000allegrex_t_vt},
.instrType=RABBITIZER_INSTR_TYPE_R
) // Homogeneous Transform 3 Triple Word

Expand All @@ -101,7 +101,7 @@ vtfm3.t

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x02 << 2 | 0x2, vtfm3_t, vtfm3.t,
.operands={RAB_OPERAND_r4000allegrex_t_vd, RAB_OPERAND_r4000allegrex_t_vs, RAB_OPERAND_r4000allegrex_t_vt},
.operands={RAB_OPERAND_r4000allegrex_t_vd, RAB_OPERAND_r4000allegrex_mt_vs, RAB_OPERAND_r4000allegrex_t_vt},
.instrType=RABBITIZER_INSTR_TYPE_R
) // Transform 3 Triple Word

Expand All @@ -114,7 +114,7 @@ vhtfm4.q

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x03 << 2 | 0x2, vhtfm4_q, vhtfm4.q,
.operands={RAB_OPERAND_r4000allegrex_q_vd, RAB_OPERAND_r4000allegrex_q_vs, RAB_OPERAND_r4000allegrex_q_vt},
.operands={RAB_OPERAND_r4000allegrex_q_vd, RAB_OPERAND_r4000allegrex_mq_vs, RAB_OPERAND_r4000allegrex_q_vt},
.instrType=RABBITIZER_INSTR_TYPE_R
) // Homogeneous Transform 4 Quad Word

Expand All @@ -140,7 +140,7 @@ vmscl.p

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x04 << 2 | 0x1, vmscl_p, vmscl.p,
.operands={RAB_OPERAND_r4000allegrex_p_vd, RAB_OPERAND_r4000allegrex_p_vs, RAB_OPERAND_r4000allegrex_p_vt},
.operands={RAB_OPERAND_r4000allegrex_mp_vd, RAB_OPERAND_r4000allegrex_mp_vs, RAB_OPERAND_r4000allegrex_s_vt},
.instrType=RABBITIZER_INSTR_TYPE_R
) // Scale Pair x Pair Matrix

Expand All @@ -153,7 +153,7 @@ vmscl.t

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x04 << 2 | 0x2, vmscl_t, vmscl.t,
.operands={RAB_OPERAND_r4000allegrex_t_vd, RAB_OPERAND_r4000allegrex_t_vs, RAB_OPERAND_r4000allegrex_t_vt},
.operands={RAB_OPERAND_r4000allegrex_mt_vd, RAB_OPERAND_r4000allegrex_mt_vs, RAB_OPERAND_r4000allegrex_s_vt},
.instrType=RABBITIZER_INSTR_TYPE_R
) // Scale Triple x Triple Matrix

Expand All @@ -166,7 +166,7 @@ vmscl.q

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x04 << 2 | 0x3, vmscl_q, vmscl.q,
.operands={RAB_OPERAND_r4000allegrex_q_vd, RAB_OPERAND_r4000allegrex_q_vs, RAB_OPERAND_r4000allegrex_q_vt},
.operands={RAB_OPERAND_r4000allegrex_mq_vd, RAB_OPERAND_r4000allegrex_mq_vs, RAB_OPERAND_r4000allegrex_s_vt},
.instrType=RABBITIZER_INSTR_TYPE_R
) // Scale Quad x Quad Matrix

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ vmmov.p

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x00 << 2 | 0x1, vmmov_p, vmmov.p,
.operands={RAB_OPERAND_r4000allegrex_p_vd, RAB_OPERAND_r4000allegrex_p_vs},
.operands={RAB_OPERAND_r4000allegrex_mp_vd, RAB_OPERAND_r4000allegrex_mp_vs},
.instrType=RABBITIZER_INSTR_TYPE_R
) // Move Pair x Pair Matrix

Expand All @@ -35,7 +35,7 @@ vmmov.t

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x00 << 2 | 0x2, vmmov_t, vmmov.t,
.operands={RAB_OPERAND_r4000allegrex_t_vd, RAB_OPERAND_r4000allegrex_t_vs},
.operands={RAB_OPERAND_r4000allegrex_mt_vd, RAB_OPERAND_r4000allegrex_mt_vs},
.instrType=RABBITIZER_INSTR_TYPE_R
) // Move Triple x Triple Matrix

Expand All @@ -49,7 +49,7 @@ vmmov.q

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x00 << 2 | 0x3, vmmov_q, vmmov.q,
.operands={RAB_OPERAND_r4000allegrex_q_vd, RAB_OPERAND_r4000allegrex_q_vs},
.operands={RAB_OPERAND_r4000allegrex_mq_vd, RAB_OPERAND_r4000allegrex_mq_vs},
.instrType=RABBITIZER_INSTR_TYPE_R
) // Move Quad x Quad Matrix

Expand All @@ -62,7 +62,7 @@ vmidt.p

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x03 << 2 | 0x1, vmidt_p, vmidt.p,
.operands={RAB_OPERAND_r4000allegrex_p_vd},
.operands={RAB_OPERAND_r4000allegrex_mp_vd},
.instrType=RABBITIZER_INSTR_TYPE_R
) // Identity Pair x Pair Matrix

Expand All @@ -75,7 +75,7 @@ vmidt.t

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x03 << 2 | 0x2, vmidt_t, vmidt.t,
.operands={RAB_OPERAND_r4000allegrex_t_vd},
.operands={RAB_OPERAND_r4000allegrex_mt_vd},
.instrType=RABBITIZER_INSTR_TYPE_R
) // Identity Triple x Triple Matrix

Expand All @@ -88,7 +88,7 @@ vmidt.q

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x03 << 2 | 0x3, vmidt_q, vmidt.q,
.operands={RAB_OPERAND_r4000allegrex_q_vd},
.operands={RAB_OPERAND_r4000allegrex_mq_vd},
.instrType=RABBITIZER_INSTR_TYPE_R
) // Identity Quad x Quad Matrix

Expand All @@ -101,7 +101,7 @@ vmzero.p

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x06 << 2 | 0x1, vmzero_p, vmzero.p,
.operands={RAB_OPERAND_r4000allegrex_p_vd},
.operands={RAB_OPERAND_r4000allegrex_mp_vd},
.instrType=RABBITIZER_INSTR_TYPE_R
) // Zero Pair x Pair Matrix

Expand All @@ -114,7 +114,7 @@ vmzero.t

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x06 << 2 | 0x2, vmzero_t, vmzero.t,
.operands={RAB_OPERAND_r4000allegrex_t_vd},
.operands={RAB_OPERAND_r4000allegrex_mt_vd},
.instrType=RABBITIZER_INSTR_TYPE_R
) // Zero Triple x Triple Matrix

Expand All @@ -127,7 +127,7 @@ vmzero.q

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x06 << 2 | 0x3, vmzero_q, vmzero.q,
.operands={RAB_OPERAND_r4000allegrex_q_vd},
.operands={RAB_OPERAND_r4000allegrex_mq_vd},
.instrType=RABBITIZER_INSTR_TYPE_R
) // Zero Quad x Quad Matrix

Expand All @@ -140,7 +140,7 @@ vmone.p

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x07 << 2 | 0x1, vmone_p, vmone.p,
.operands={RAB_OPERAND_r4000allegrex_p_vd},
.operands={RAB_OPERAND_r4000allegrex_mp_vd},
.instrType=RABBITIZER_INSTR_TYPE_R
) // One Pair x Pair Matrix

Expand All @@ -153,7 +153,7 @@ vmone.t

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x07 << 2 | 0x2, vmone_t, vmone.t,
.operands={RAB_OPERAND_r4000allegrex_t_vd},
.operands={RAB_OPERAND_r4000allegrex_mt_vd},
.instrType=RABBITIZER_INSTR_TYPE_R
) // One Triple x Triple Matrix

Expand All @@ -166,6 +166,6 @@ vmone.q

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0x07 << 2 | 0x3, vmone_q, vmone.q,
.operands={RAB_OPERAND_r4000allegrex_q_vd},
.operands={RAB_OPERAND_r4000allegrex_mq_vd},
.instrType=RABBITIZER_INSTR_TYPE_R
) // One Quad x Quad Matrix
Loading

0 comments on commit 7239793

Please sign in to comment.