2023-08-10 00:57:11 +00:00
|
|
|
#include "cpu/RspTypes.h"
|
|
|
|
|
|
|
|
// RSP registers
|
|
|
|
UWORD32 RSP_GPR[32], RSP_Flags[4];
|
|
|
|
UDWORD RSP_ACCUM[8];
|
|
|
|
RSPVector RSP_Vect[32];
|
|
|
|
|
2023-08-24 00:37:05 +00:00
|
|
|
RSPFlag VCOL(RSP_Flags[0].UB[0]), VCOH(RSP_Flags[0].UB[1]);
|
|
|
|
RSPFlag VCCL(RSP_Flags[1].UB[0]), VCCH(RSP_Flags[1].UB[1]);
|
|
|
|
RSPFlag VCE(RSP_Flags[2].UB[0]);
|
2023-08-23 22:30:29 +00:00
|
|
|
|
2023-08-10 00:57:11 +00:00
|
|
|
char * GPR_Strings[32] = {
|
|
|
|
"R0",
|
|
|
|
"AT",
|
|
|
|
"V0",
|
|
|
|
"V1",
|
|
|
|
"A0",
|
|
|
|
"A1",
|
|
|
|
"A2",
|
|
|
|
"A3",
|
|
|
|
"T0",
|
|
|
|
"T1",
|
|
|
|
"T2",
|
|
|
|
"T3",
|
|
|
|
"T4",
|
|
|
|
"T5",
|
|
|
|
"T6",
|
|
|
|
"T7",
|
|
|
|
"S0",
|
|
|
|
"S1",
|
|
|
|
"S2",
|
|
|
|
"S3",
|
|
|
|
"S4",
|
|
|
|
"S5",
|
|
|
|
"S6",
|
|
|
|
"S7",
|
|
|
|
"T8",
|
|
|
|
"T9",
|
|
|
|
"K0",
|
|
|
|
"K1",
|
|
|
|
"GP",
|
|
|
|
"SP",
|
|
|
|
"S8",
|
|
|
|
"RA",
|
2023-09-07 02:11:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
int64_t AccumulatorGet(uint8_t el)
|
|
|
|
{
|
|
|
|
return (((int64_t)RSP_ACCUM[el].HW[3]) << 32) | (((int64_t)RSP_ACCUM[el].UHW[2]) << 16) | RSP_ACCUM[el].UHW[1];
|
|
|
|
}
|
|
|
|
|
|
|
|
void AccumulatorSet(uint8_t el, int64_t Accumulator)
|
|
|
|
{
|
|
|
|
RSP_ACCUM[el].HW[3] = (int16_t)(Accumulator >> 32);
|
|
|
|
RSP_ACCUM[el].HW[2] = (int16_t)(Accumulator >> 16);
|
|
|
|
RSP_ACCUM[el].HW[1] = (int16_t)(Accumulator);
|
|
|
|
}
|