Skip to content

Commit

Permalink
svl.q, svr.q
Browse files Browse the repository at this point in the history
  • Loading branch information
AngheloAlf committed Apr 14, 2024
1 parent f1b9ff7 commit 6112604
Show file tree
Hide file tree
Showing 18 changed files with 7,782 additions and 2 deletions.
7,708 changes: 7,708 additions & 0 deletions asdf.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions cplusplus/include/generated/InstrIdType_enum_class.hpp

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

2 changes: 2 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.

2 changes: 2 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.

1 change: 1 addition & 0 deletions include/generated/InstrIdType_Names_array.h

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

1 change: 1 addition & 0 deletions include/generated/InstrIdType_enum.h

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

2 changes: 2 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.

2 changes: 2 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.

3 changes: 3 additions & 0 deletions include/instructions/RabbitizerInstructionR4000Allegrex.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ void RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu6(RabbitizerInstruct
NON_NULL(1)
void RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu7(RabbitizerInstruction *self);

NON_NULL(1)
void RabbitizerInstructionR4000Allegrex_processUniqueId_Quadlr(RabbitizerInstruction *self);

NON_NULL(1)
void RabbitizerInstructionR4000Allegrex_processUniqueId(RabbitizerInstruction *self);

Expand Down
2 changes: 2 additions & 0 deletions rabbitizer/InstrId.pyi

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

1 change: 1 addition & 0 deletions rabbitizer/InstrIdType.pyi

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

2 changes: 2 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.

1 change: 1 addition & 0 deletions rust/src/instr_id_type_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 @@ -517,6 +517,23 @@ void RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu7(RabbitizerInstruct
#endif
}

void RabbitizerInstructionR4000Allegrex_processUniqueId_Quadlr(RabbitizerInstruction *self) {
uint32_t temp = RAB_INSTR_R4000ALLEGREX_GET_wb(self);
bool fetchDescriptor = true;

self->_mandatorybits = RAB_INSTR_R4000ALLEGREX_PACK_wb(self->_mandatorybits, temp);
self->instrIdType = RAB_INSTR_ID_TYPE_R4000ALLEGREX_QUADLR;
self->_handwrittenCategory = true;

switch (temp) {
#include "tables/instr_id/r4000allegrex/r4000allegrex_quadlr.inc"
}

if (fetchDescriptor) {
self->descriptor = &RabbitizerInstrDescriptor_Descriptors[self->uniqueId];
}
}

#undef RABBITIZER_DEF_INSTR_ID
#undef RABBITIZER_DEF_INSTR_ID_ALTNAME

Expand Down Expand Up @@ -572,6 +589,11 @@ void RabbitizerInstructionR4000Allegrex_processUniqueId(RabbitizerInstruction *s
case 0x3C:
RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu6(self);
break;

case 0x3D:
RabbitizerInstructionR4000Allegrex_processUniqueId_Quadlr(self);
break;

case 0x3F:
RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu7(self);
break;
Expand Down
2 changes: 2 additions & 0 deletions tables/tables/instr_id/RabbitizerInstrId_r4000allegrex.inc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
#include "r4000allegrex/r4000allegrex_vfpu6.inc"
#include "r4000allegrex/r4000allegrex_vfpu7.inc"

#include "r4000allegrex/r4000allegrex_quadlr.inc"

#ifndef INSTRID_AVOID_USERDEF
RABBITIZER_DEF_INSTR_ID(
r4000allegrex, , USERDEF_00,
Expand Down
5 changes: 3 additions & 2 deletions tables/tables/instr_id/r4000allegrex/r4000allegrex_normal.inc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
100 | LB | LH | LWL | LW | LBU | LHU | LWR | --- |
101 | SB | SH | SWL | SW | --- | --- | SWR | CACHE |
110 | LL | LWC1 | LV.S | --- | *11 | --- | LV.Q | *12 |
111 | SC | SWC1 | SV.S | --- | *13 | --- | SV.Q | *14 |
111 | SC | SWC1 | SV.S | --- | *13 | *14 | SV.Q | *15 |
hi |-------|-------|-------|-------|-------|-------|-------|-------|
*1 = SPECIAL, see SPECIAL list
*2 = REGIMM, see REGIMM list
Expand All @@ -28,7 +28,8 @@
*11 = VFPU4
*12 = VFPU5
*13 = VFPU6
*14 = VFPU7
*14 = QUADLR
*15 = VFPU7
*/

// The other instructions are implemented using the main CPU table
Expand Down
25 changes: 25 additions & 0 deletions tables/tables/instr_id/r4000allegrex/r4000allegrex_quadlr.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* SPDX-FileCopyrightText: © 2024 Decompollaborate */
/* SPDX-License-Identifier: MIT */

/*
31---------26-----------------------------------------------2-1-0
| = SPECIAL | |Z| |
------6------------------------------------------------------1---
|---------------0---------------|---------------1---------------| lo
| SVL.Q | SVR.Q |
|-------------------------------|-------------------------------|
*/

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 0, svl_q, svl.q,
.operands={RAB_OPERAND_r4000allegrex_q_vt_imm, RAB_OPERAND_r4000allegrex_offset14_base},
.instrType=RABBITIZER_INSTR_TYPE_I,
.readsRs=true
) // Store Quad word Left from Vfpu

RABBITIZER_DEF_INSTR_ID_ALTNAME(
r4000allegrex, 1, svr_q, svr.q,
.operands={RAB_OPERAND_r4000allegrex_q_vt_imm, RAB_OPERAND_r4000allegrex_offset14_base},
.instrType=RABBITIZER_INSTR_TYPE_I,
.readsRs=true
) // Store Quad word Right from Vfpu
2 changes: 2 additions & 0 deletions tables/tables/instr_id_types/InstrIdType_r4000allegrex.inc
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@
RABBITIZER_DEF_INSTR_ID_TYPE(R4000ALLEGREX, VFPU6)

RABBITIZER_DEF_INSTR_ID_TYPE(R4000ALLEGREX, VFPU7)

RABBITIZER_DEF_INSTR_ID_TYPE(R4000ALLEGREX, QUADLR)

0 comments on commit 6112604

Please sign in to comment.