From 39f27be861305155c570c5f24aca15b139a6cdcb Mon Sep 17 00:00:00 2001 From: angie Date: Tue, 16 Apr 2024 17:18:08 -0400 Subject: [PATCH] VFPU7 stuff --- .../RabbitizerInstructionR4000Allegrex.h | 2 ++ ...zerInstructionR4000Allegrex_ProcessUniqueId.c | 16 +++------------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/include/instructions/RabbitizerInstructionR4000Allegrex.h b/include/instructions/RabbitizerInstructionR4000Allegrex.h index 9fc348aa..e91d1cbe 100644 --- a/include/instructions/RabbitizerInstructionR4000Allegrex.h +++ b/include/instructions/RabbitizerInstructionR4000Allegrex.h @@ -44,6 +44,7 @@ extern "C" { #define RAB_INSTR_R4000ALLEGREX_GET_vfpu6_fmt(self) ((SHIFTR((self)->word, 23, 3) << 2) | (SHIFTR((self)->word, 15, 1) << 1) | (SHIFTR((self)->word, 7, 1))) #define RAB_INSTR_R4000ALLEGREX_GET_vfpu6_fmt7_fmt(self) ((SHIFTR((self)->word, 21, 2) << 2) | (SHIFTR((self)->word, 15, 1) << 1) | (SHIFTR((self)->word, 7, 1))) #define RAB_INSTR_R4000ALLEGREX_GET_vfpu6_fmt7_fmt0_fmt(self) ((SHIFTR((self)->word, 16, 3) << 2) | (SHIFTR((self)->word, 15, 1) << 1) | (SHIFTR((self)->word, 7, 1))) +#define RAB_INSTR_R4000ALLEGREX_GET_vfpu7_fmt(self) (SHIFTR((self)->word, 0, 26)) #define RAB_INSTR_R4000ALLEGREX_PACK_vt(word, value) (BITREPACK((word), (value), 16, 7)) @@ -78,6 +79,7 @@ extern "C" { #define RAB_INSTR_R4000ALLEGREX_PACK_vfpu6_fmt(word, value) (BITREPACK(BITREPACK(BITREPACK((word), (value) >> 2, 23, 3), (value) >> 1, 15, 1), (value), 7, 1)) #define RAB_INSTR_R4000ALLEGREX_PACK_vfpu6_fmt7_fmt(word, value) (BITREPACK(BITREPACK(BITREPACK((word), (value) >> 2, 21, 2), (value) >> 1, 15, 1), (value), 7, 1)) #define RAB_INSTR_R4000ALLEGREX_PACK_vfpu6_fmt7_fmt0_fmt(word, value) (BITREPACK(BITREPACK(BITREPACK((word), (value) >> 2, 16, 3), (value) >> 1, 15, 1), (value), 7, 1)) +#define RAB_INSTR_R4000ALLEGREX_PACK_vfpu7_fmt(word, value) (BITREPACK((word), (value), 0, 26)) NON_NULL(1) diff --git a/src/instructions/RabbitizerInstructionR4000Allegrex/RabbitizerInstructionR4000Allegrex_ProcessUniqueId.c b/src/instructions/RabbitizerInstructionR4000Allegrex/RabbitizerInstructionR4000Allegrex_ProcessUniqueId.c index 93e0ac7a..f8d3771f 100644 --- a/src/instructions/RabbitizerInstructionR4000Allegrex/RabbitizerInstructionR4000Allegrex_ProcessUniqueId.c +++ b/src/instructions/RabbitizerInstructionR4000Allegrex/RabbitizerInstructionR4000Allegrex_ProcessUniqueId.c @@ -665,7 +665,6 @@ void RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu4_Fmt0_Fmt0_Fmt3(Rab } } - void RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu4_Fmt0_Fmt1(RabbitizerInstruction *self) { uint32_t fmt = RAB_INSTR_R4000ALLEGREX_GET_vfpu4_fmt0_fmt0_fmt(self); bool fetchDescriptor = true; @@ -745,7 +744,6 @@ void RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu4_Fmt0_Fmt1_Fmt3(Rab } } - void RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu4_Fmt0_Fmt2(RabbitizerInstruction *self) { uint32_t fmt = RAB_INSTR_R4000ALLEGREX_GET_vfpu4_fmt0_fmt0_fmt(self); bool fetchDescriptor = true; @@ -846,7 +844,6 @@ void RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu4_Fmt0_Fmt2_Fmt3(Rab } } - void RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu4_Fmt0_Fmt3(RabbitizerInstruction *self) { uint32_t fmt = RAB_INSTR_R4000ALLEGREX_GET_tp(self); bool fetchDescriptor = true; @@ -863,7 +860,6 @@ void RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu4_Fmt0_Fmt3(Rabbitiz } } - void RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu4_Fmt2(RabbitizerInstruction *self) { uint32_t fmt = RAB_INSTR_R4000ALLEGREX_GET_vfpu4_fmt0_fmt(self); bool fetchDescriptor = true; @@ -910,7 +906,6 @@ void RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu4_Fmt2(RabbitizerIns } } - void RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu4_Fmt2_Fmt0(RabbitizerInstruction *self) { uint32_t fmt = RAB_INSTR_R4000ALLEGREX_GET_tp(self); bool fetchDescriptor = true; @@ -1007,7 +1002,6 @@ void RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu4_Fmt2_Fmt5(Rabbitiz } } - void RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu4_Fmt3(RabbitizerInstruction *self) { uint32_t fmt = RAB_INSTR_R4000ALLEGREX_GET_tp(self); bool fetchDescriptor = true; @@ -1024,7 +1018,6 @@ void RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu4_Fmt3(RabbitizerIns } } - void RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu5(RabbitizerInstruction *self) { uint32_t fmt = RAB_INSTR_R4000ALLEGREX_GET_vfpu4_fmt(self); bool fetchDescriptor = true; @@ -1127,14 +1120,12 @@ void RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu6_Fmt7_Fmt0(Rabbitiz } void RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu7(RabbitizerInstruction *self) { - //! TODO - // uint32_t fmt = RAB_INSTR_GET_fmt(self); - // bool fetchDescriptor = true; + uint32_t fmt = RAB_INSTR_R4000ALLEGREX_GET_vfpu7_fmt(self); + bool fetchDescriptor = true; - // self->_mandatorybits = RAB_INSTR_PACK_fmt(self->_mandatorybits, fmt); + self->_mandatorybits = RAB_INSTR_R4000ALLEGREX_PACK_vfpu7_fmt(self->_mandatorybits, fmt); self->instrIdType = RAB_INSTR_ID_TYPE_R4000ALLEGREX_VFPU7; -#if 0 switch (fmt) { #include "tables/instr_id/r4000allegrex/r4000allegrex_vfpu7.inc" } @@ -1142,7 +1133,6 @@ void RabbitizerInstructionR4000Allegrex_processUniqueId_Vfpu7(RabbitizerInstruct if (fetchDescriptor) { self->descriptor = &RabbitizerInstrDescriptor_Descriptors[self->uniqueId]; } -#endif } void RabbitizerInstructionR4000Allegrex_processUniqueId_Quadlr(RabbitizerInstruction *self) {