diff --git a/asdf.txt b/asdf.txt index 059f8f9e..04ea1620 100644 --- a/asdf.txt +++ b/asdf.txt @@ -4,11 +4,6 @@ tests/c/instruction_checks/r3000gte_disasm.c: 0 errors out of 65 entries. 100.00 tests/c/instruction_checks/r4000allegrex_disasm.c: 0 errors out of 73 entries. 100.00% correct. -Error on word '0x486000FF'. Expected 'vsync2', got '.word 0x486000FF # INVALID $v1, $zero, 0xFF # 00000000 ' - File: tests/c/instruction_checks/r4000allegrex_vfpu_disasm.c - InstrIdType: 'R4000ALLEGREX_COP2_MFHC2_P' - gnuMode 'true' - Error on word '0xD0161001'. Expected 'vsqrt.s S010, S400', got '.word 0xD0161001 # vsqrt.s S010 # 00001000 ' File: tests/c/instruction_checks/r4000allegrex_vfpu_disasm.c InstrIdType: 'R4000ALLEGREX_VFPU4_FMT0_FMT0_FMT2' @@ -6004,5 +5999,5 @@ Error on word '0xF3A090C0'. Expected 'vrot.q C002, S400, [C,S,S,S]', got 'v InstrIdType: 'R4000ALLEGREX_VFPU6_FMT7' gnuMode 'true' -tests/c/instruction_checks/r4000allegrex_vfpu_disasm.c: 1200 errors out of 4798 entries. 74.99% correct. +tests/c/instruction_checks/r4000allegrex_vfpu_disasm.c: 1199 errors out of 4798 entries. 75.01% correct. diff --git a/cplusplus/include/generated/InstrIdType_enum_class.hpp b/cplusplus/include/generated/InstrIdType_enum_class.hpp index 7e41f1fa..abd8db61 100644 --- a/cplusplus/include/generated/InstrIdType_enum_class.hpp +++ b/cplusplus/include/generated/InstrIdType_enum_class.hpp @@ -60,6 +60,7 @@ enum class IdType { R4000ALLEGREX_COP2_BC2, R4000ALLEGREX_COP2_MFHC2, R4000ALLEGREX_COP2_MFHC2_P, + R4000ALLEGREX_COP2_MFHC2_P_S, R4000ALLEGREX_COP2_MTHC2, R4000ALLEGREX_VFPU0, R4000ALLEGREX_VFPU1, diff --git a/cplusplus/include/generated/UniqueId_enum_class.hpp b/cplusplus/include/generated/UniqueId_enum_class.hpp index 7307a677..daa8b7a4 100644 --- a/cplusplus/include/generated/UniqueId_enum_class.hpp +++ b/cplusplus/include/generated/UniqueId_enum_class.hpp @@ -493,6 +493,7 @@ enum class UniqueId { r4000allegrex_bvtl, r4000allegrex_mfv, r4000allegrex_mfvc, + r4000allegrex_vsync2, r4000allegrex_mtv, r4000allegrex_mtvc, r4000allegrex_vadd_s, diff --git a/include/generated/InstrDescriptor_Descriptors_array.h b/include/generated/InstrDescriptor_Descriptors_array.h index 9b431cd1..44dc6b33 100644 --- a/include/generated/InstrDescriptor_Descriptors_array.h +++ b/include/generated/InstrDescriptor_Descriptors_array.h @@ -493,6 +493,7 @@ const RabbitizerInstrDescriptor RabbitizerInstrDescriptor_Descriptors[] = { [RABBITIZER_INSTR_ID_r4000allegrex_bvtl] = { .operands={RAB_OPERAND_r4000allegrex_imm3, RAB_OPERAND_cpu_branch_target_label}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isBranch=true, .isBranchLikely=true }, [RABBITIZER_INSTR_ID_r4000allegrex_mfv] = { .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_r4000allegrex_s_vd}, .instrType=RABBITIZER_INSTR_TYPE_R, .readsRs=true }, [RABBITIZER_INSTR_ID_r4000allegrex_mfvc] = { .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_r4000allegrex_cop2cd}, .instrType=RABBITIZER_INSTR_TYPE_R, .readsRs=true }, + [RABBITIZER_INSTR_ID_r4000allegrex_vsync2] = { .operands={0}, .instrType=RABBITIZER_INSTR_TYPE_R, .readsRs=true }, [RABBITIZER_INSTR_ID_r4000allegrex_mtv] = { .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_r4000allegrex_s_vd}, .instrType=RABBITIZER_INSTR_TYPE_R, .readsRs=true }, [RABBITIZER_INSTR_ID_r4000allegrex_mtvc] = { .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_r4000allegrex_cop2cd}, .instrType=RABBITIZER_INSTR_TYPE_R, .readsRs=true }, [RABBITIZER_INSTR_ID_r4000allegrex_vadd_s] = { .operands={RAB_OPERAND_r4000allegrex_s_vd, RAB_OPERAND_r4000allegrex_s_vs, RAB_OPERAND_r4000allegrex_s_vt}, .instrType=RABBITIZER_INSTR_TYPE_R }, diff --git a/include/generated/InstrIdType_Names_array.h b/include/generated/InstrIdType_Names_array.h index 33d70d1f..5cd75a89 100644 --- a/include/generated/InstrIdType_Names_array.h +++ b/include/generated/InstrIdType_Names_array.h @@ -60,6 +60,7 @@ const char *RabInstrIdType_Names[] = { [RAB_INSTR_ID_TYPE_R4000ALLEGREX_COP2_BC2] = "R4000ALLEGREX" "_" "COP2_BC2", [RAB_INSTR_ID_TYPE_R4000ALLEGREX_COP2_MFHC2] = "R4000ALLEGREX" "_" "COP2_MFHC2", [RAB_INSTR_ID_TYPE_R4000ALLEGREX_COP2_MFHC2_P] = "R4000ALLEGREX" "_" "COP2_MFHC2_P", + [RAB_INSTR_ID_TYPE_R4000ALLEGREX_COP2_MFHC2_P_S] = "R4000ALLEGREX" "_" "COP2_MFHC2_P_S", [RAB_INSTR_ID_TYPE_R4000ALLEGREX_COP2_MTHC2] = "R4000ALLEGREX" "_" "COP2_MTHC2", [RAB_INSTR_ID_TYPE_R4000ALLEGREX_VFPU0] = "R4000ALLEGREX" "_" "VFPU0", [RAB_INSTR_ID_TYPE_R4000ALLEGREX_VFPU1] = "R4000ALLEGREX" "_" "VFPU1", diff --git a/include/generated/InstrIdType_enum.h b/include/generated/InstrIdType_enum.h index 7aadb583..d50e4942 100644 --- a/include/generated/InstrIdType_enum.h +++ b/include/generated/InstrIdType_enum.h @@ -60,6 +60,7 @@ typedef enum RabInstrIdType { RAB_INSTR_ID_TYPE_R4000ALLEGREX_COP2_BC2, RAB_INSTR_ID_TYPE_R4000ALLEGREX_COP2_MFHC2, RAB_INSTR_ID_TYPE_R4000ALLEGREX_COP2_MFHC2_P, + RAB_INSTR_ID_TYPE_R4000ALLEGREX_COP2_MFHC2_P_S, RAB_INSTR_ID_TYPE_R4000ALLEGREX_COP2_MTHC2, RAB_INSTR_ID_TYPE_R4000ALLEGREX_VFPU0, RAB_INSTR_ID_TYPE_R4000ALLEGREX_VFPU1, diff --git a/include/generated/InstrId_Names_array.h b/include/generated/InstrId_Names_array.h index 43451702..172e7be4 100644 --- a/include/generated/InstrId_Names_array.h +++ b/include/generated/InstrId_Names_array.h @@ -493,6 +493,7 @@ const char *RabbitizerInstrId_Names[] = { [RABBITIZER_INSTR_ID_r4000allegrex_bvtl] = "bvtl", [RABBITIZER_INSTR_ID_r4000allegrex_mfv] = "mfv", [RABBITIZER_INSTR_ID_r4000allegrex_mfvc] = "mfvc", + [RABBITIZER_INSTR_ID_r4000allegrex_vsync2] = "vsync2", [RABBITIZER_INSTR_ID_r4000allegrex_mtv] = "mtv", [RABBITIZER_INSTR_ID_r4000allegrex_mtvc] = "mtvc", [RABBITIZER_INSTR_ID_r4000allegrex_vadd_s] = "vadd.s", diff --git a/include/generated/InstrId_enum.h b/include/generated/InstrId_enum.h index 50643d2a..e3c4ae72 100644 --- a/include/generated/InstrId_enum.h +++ b/include/generated/InstrId_enum.h @@ -493,6 +493,7 @@ typedef enum RabbitizerInstrId { RABBITIZER_INSTR_ID_r4000allegrex_bvtl, RABBITIZER_INSTR_ID_r4000allegrex_mfv, RABBITIZER_INSTR_ID_r4000allegrex_mfvc, + RABBITIZER_INSTR_ID_r4000allegrex_vsync2, RABBITIZER_INSTR_ID_r4000allegrex_mtv, RABBITIZER_INSTR_ID_r4000allegrex_mtvc, RABBITIZER_INSTR_ID_r4000allegrex_vadd_s, diff --git a/include/instructions/RabbitizerInstructionR4000Allegrex.h b/include/instructions/RabbitizerInstructionR4000Allegrex.h index 9e8609f3..f7160938 100644 --- a/include/instructions/RabbitizerInstructionR4000Allegrex.h +++ b/include/instructions/RabbitizerInstructionR4000Allegrex.h @@ -31,6 +31,7 @@ extern "C" { #define RAB_INSTR_R4000ALLEGREX_GET_bc2_fmt(self) (SHIFTR((self)->word, 16, 2)) #define RAB_INSTR_R4000ALLEGREX_GET_mxhc2(self) (SHIFTR((self)->word, 7, 1)) #define RAB_INSTR_R4000ALLEGREX_GET_mfhc2_p_fmt(self) (SHIFTR((self)->word, 4, 3)) +#define RAB_INSTR_R4000ALLEGREX_GET_mfhc2_p_s_fmt(self) (SHIFTR((self)->word, 0, 4)) #define RAB_INSTR_R4000ALLEGREX_GET_imm3(self) (SHIFTR((self)->word, 18, 3)) #define RAB_INSTR_R4000ALLEGREX_GET_offset14(self) (SHIFTR((self)->word, 2, 14)) @@ -72,6 +73,7 @@ extern "C" { #define RAB_INSTR_R4000ALLEGREX_PACK_bc2_fmt(word, value) (BITREPACK((word), (value), 16, 2)) #define RAB_INSTR_R4000ALLEGREX_PACK_mxhc2(word, value) (BITREPACK((word), (value), 7, 1)) #define RAB_INSTR_R4000ALLEGREX_PACK_mfhc2_p_fmt(word, value) (BITREPACK((word), (value), 4, 3)) +#define RAB_INSTR_R4000ALLEGREX_PACK_mfhc2_p_s_fmt(word, value) (BITREPACK((word), (value), 0, 4)) #define RAB_INSTR_R4000ALLEGREX_PACK_imm3(word, value) (BITREPACK((word), (value), 18, 3)) #define RAB_INSTR_R4000ALLEGREX_PACK_offset14(word, value) (BITREPACK((word), (value), 2, 14)) @@ -146,6 +148,8 @@ void RabbitizerInstructionR4000Allegrex_processUniqueId_Coprocessor2_MFHC2(Rabbi NON_NULL(1) void RabbitizerInstructionR4000Allegrex_processUniqueId_Coprocessor2_MFHC2_p(RabbitizerInstruction *self); NON_NULL(1) +void RabbitizerInstructionR4000Allegrex_processUniqueId_Coprocessor2_MFHC2_p_s(RabbitizerInstruction *self); +NON_NULL(1) void RabbitizerInstructionR4000Allegrex_processUniqueId_Coprocessor2_MTHC2(RabbitizerInstruction *self); NON_NULL(1) diff --git a/rabbitizer/InstrId.pyi b/rabbitizer/InstrId.pyi index f5013613..00e3724f 100644 --- a/rabbitizer/InstrId.pyi +++ b/rabbitizer/InstrId.pyi @@ -434,6 +434,7 @@ class InstrId: r4000allegrex_bvtl: Enum r4000allegrex_mfv: Enum r4000allegrex_mfvc: Enum + r4000allegrex_vsync2: Enum r4000allegrex_mtv: Enum r4000allegrex_mtvc: Enum r4000allegrex_vadd_s: Enum diff --git a/rabbitizer/InstrIdType.pyi b/rabbitizer/InstrIdType.pyi index 77490df1..3c108d6c 100644 --- a/rabbitizer/InstrIdType.pyi +++ b/rabbitizer/InstrIdType.pyi @@ -61,6 +61,7 @@ class InstrIdType: R4000ALLEGREX_COP2_BC2: Enum R4000ALLEGREX_COP2_MFHC2: Enum R4000ALLEGREX_COP2_MFHC2_P: Enum + R4000ALLEGREX_COP2_MFHC2_P_S: Enum R4000ALLEGREX_COP2_MTHC2: Enum R4000ALLEGREX_VFPU0: Enum R4000ALLEGREX_VFPU1: Enum diff --git a/rust/src/instr_id_enum.rs b/rust/src/instr_id_enum.rs index 0a9c3f87..1cc67aab 100644 --- a/rust/src/instr_id_enum.rs +++ b/rust/src/instr_id_enum.rs @@ -493,6 +493,7 @@ pub enum InstrId { r4000allegrex_bvtl, r4000allegrex_mfv, r4000allegrex_mfvc, + r4000allegrex_vsync2, r4000allegrex_mtv, r4000allegrex_mtvc, r4000allegrex_vadd_s, diff --git a/rust/src/instr_id_type_enum.rs b/rust/src/instr_id_type_enum.rs index 4c420024..66593450 100644 --- a/rust/src/instr_id_type_enum.rs +++ b/rust/src/instr_id_type_enum.rs @@ -60,6 +60,7 @@ pub enum InstrIdType { R4000ALLEGREX_COP2_BC2, R4000ALLEGREX_COP2_MFHC2, R4000ALLEGREX_COP2_MFHC2_P, + R4000ALLEGREX_COP2_MFHC2_P_S, R4000ALLEGREX_COP2_MTHC2, R4000ALLEGREX_VFPU0, R4000ALLEGREX_VFPU1, diff --git a/src/instructions/RabbitizerInstructionR4000Allegrex/RabbitizerInstructionR4000Allegrex_ProcessUniqueId.c b/src/instructions/RabbitizerInstructionR4000Allegrex/RabbitizerInstructionR4000Allegrex_ProcessUniqueId.c index 65753a0b..ae10ef5b 100644 --- a/src/instructions/RabbitizerInstructionR4000Allegrex/RabbitizerInstructionR4000Allegrex_ProcessUniqueId.c +++ b/src/instructions/RabbitizerInstructionR4000Allegrex/RabbitizerInstructionR4000Allegrex_ProcessUniqueId.c @@ -446,6 +446,11 @@ void RabbitizerInstructionR4000Allegrex_processUniqueId_Coprocessor2_MFHC2_p(Rab // self->_handwrittenCategory = true; switch (fmt) { + case 0x7: + RabbitizerInstructionR4000Allegrex_processUniqueId_Coprocessor2_MFHC2_p_s(self); + fetchDescriptor = false; + break; + #include "tables/instr_id/r4000allegrex/r4000allegrex_cop2_mfhc2_p.inc" } @@ -454,6 +459,23 @@ void RabbitizerInstructionR4000Allegrex_processUniqueId_Coprocessor2_MFHC2_p(Rab } } +void RabbitizerInstructionR4000Allegrex_processUniqueId_Coprocessor2_MFHC2_p_s(RabbitizerInstruction *self) { + uint32_t fmt = RAB_INSTR_R4000ALLEGREX_GET_mfhc2_p_s_fmt(self); + bool fetchDescriptor = true; + + self->_mandatorybits = RAB_INSTR_R4000ALLEGREX_PACK_mfhc2_p_s_fmt(self->_mandatorybits, fmt); + self->instrIdType = RAB_INSTR_ID_TYPE_R4000ALLEGREX_COP2_MFHC2_P_S; + // self->_handwrittenCategory = true; + + switch (fmt) { +#include "tables/instr_id/r4000allegrex/r4000allegrex_cop2_mfhc2_p_s.inc" + } + + if (fetchDescriptor) { + self->descriptor = &RabbitizerInstrDescriptor_Descriptors[self->uniqueId]; + } +} + void RabbitizerInstructionR4000Allegrex_processUniqueId_Coprocessor2_MTHC2(RabbitizerInstruction *self) { uint32_t fmt = RAB_INSTR_R4000ALLEGREX_GET_mxhc2(self); bool fetchDescriptor = true; diff --git a/tables/tables/instr_id/RabbitizerInstrId_r4000allegrex.inc b/tables/tables/instr_id/RabbitizerInstrId_r4000allegrex.inc index dbb30a81..4366e75d 100644 --- a/tables/tables/instr_id/RabbitizerInstrId_r4000allegrex.inc +++ b/tables/tables/instr_id/RabbitizerInstrId_r4000allegrex.inc @@ -33,6 +33,7 @@ #include "r4000allegrex/r4000allegrex_cop2_bc2.inc" #include "r4000allegrex/r4000allegrex_cop2_mfhc2.inc" #include "r4000allegrex/r4000allegrex_cop2_mfhc2_p.inc" + #include "r4000allegrex/r4000allegrex_cop2_mfhc2_p_s.inc" #include "r4000allegrex/r4000allegrex_cop2_mthc2.inc" #include "r4000allegrex/r4000allegrex_vfpu0.inc" diff --git a/tables/tables/instr_id_types/InstrIdType_r4000allegrex.inc b/tables/tables/instr_id_types/InstrIdType_r4000allegrex.inc index c81c0a8c..ee756d91 100644 --- a/tables/tables/instr_id_types/InstrIdType_r4000allegrex.inc +++ b/tables/tables/instr_id_types/InstrIdType_r4000allegrex.inc @@ -29,6 +29,7 @@ RABBITIZER_DEF_INSTR_ID_TYPE(R4000ALLEGREX, COP2_BC2) RABBITIZER_DEF_INSTR_ID_TYPE(R4000ALLEGREX, COP2_MFHC2) RABBITIZER_DEF_INSTR_ID_TYPE(R4000ALLEGREX, COP2_MFHC2_P) + RABBITIZER_DEF_INSTR_ID_TYPE(R4000ALLEGREX, COP2_MFHC2_P_S) RABBITIZER_DEF_INSTR_ID_TYPE(R4000ALLEGREX, COP2_MTHC2) RABBITIZER_DEF_INSTR_ID_TYPE(R4000ALLEGREX, VFPU0)