Skip to content

Commit

Permalink
VFPU7 stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
AngheloAlf committed Apr 16, 2024
1 parent 9ba89ba commit 39f27be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
2 changes: 2 additions & 0 deletions include/instructions/RabbitizerInstructionR4000Allegrex.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -1127,22 +1120,19 @@ 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"
}

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

void RabbitizerInstructionR4000Allegrex_processUniqueId_Quadlr(RabbitizerInstruction *self) {
Expand Down

0 comments on commit 39f27be

Please sign in to comment.