Skip to content

Commit

Permalink
Interpreter: Add slbie instruction and fix VRSAVE register size.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitsh1ft3r committed Jan 21, 2025
1 parent b273e04 commit df80381
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Xenon/Core/XCPU/Interpreter/PPCInterpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,9 +549,10 @@ void PPCInterpreter::ppcExecuteSingleInstruction(PPU_STATE* hCore) {
case PPCInstruction::slbia:
PPCInterpreter_slbia(hCore);
break;
/*
case PPCInstruction::slbie:
PPCInterpreter_slbie(hCore);
break;
/*
case PPCInstruction::slbmfee:
break;
case PPCInstruction::slbmfev:
Expand Down
3 changes: 2 additions & 1 deletion Xenon/Core/XCPU/Interpreter/PPCInterpreter.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ namespace PPCInterpreter
void PPCInterpreter_rlwimix(PPU_STATE* hCore);
void PPCInterpreter_rlwnmx(PPU_STATE* hCore);
void PPCInterpreter_rlwinmx(PPU_STATE* hCore);
void PPCInterpreter_slbia(PPU_STATE* hCore);
void PPCInterpreter_sldx(PPU_STATE* hCore);
void PPCInterpreter_slwx(PPU_STATE* hCore);
void PPCInterpreter_sradx(PPU_STATE* hCore);
Expand All @@ -184,6 +183,8 @@ namespace PPCInterpreter

// System instructions
void PPCInterpreter_sc(PPU_STATE* hCore);
void PPCInterpreter_slbia(PPU_STATE* hCore);
void PPCInterpreter_slbie(PPU_STATE* hCore);
void PPCInterpreter_slbmte(PPU_STATE* hCore);
void PPCInterpreter_rfid(PPU_STATE* hCore);
void PPCInterpreter_tw(PPU_STATE* hCore);
Expand Down
2 changes: 1 addition & 1 deletion Xenon/Core/XCPU/Interpreter/PPC_System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ void PPCInterpreter::PPCInterpreter_mtspr(PPU_STATE* hCore)
hCore->ppuThread[hCore->currentThread].SPR.CFAR = hCore->ppuThread[hCore->currentThread].GPR[rD];
break;
case SPR_VRSAVE:
hCore->ppuThread[hCore->currentThread].SPR.VRSAVE = hCore->ppuThread[hCore->currentThread].GPR[rD];
hCore->ppuThread[hCore->currentThread].SPR.VRSAVE = static_cast<u32>(hCore->ppuThread[hCore->currentThread].GPR[rD]);
break;
case SPR_LPCR:
hCore->SPR.LPCR = hCore->ppuThread[hCore->currentThread].GPR[rD];
Expand Down
6 changes: 3 additions & 3 deletions Xenon/Core/XCPU/PPU/PowerPC.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ union PVR
// Segment Lookaside Buffer Entry
struct SLBEntry
{
u8 V;
u8 LP; // Large Page selector
u8 C;
u8 L;
u8 N;
u8 Kp;
u8 Ks;
u64 VSID;
u8 V;
u64 ESID;
u64 vsidReg;
u64 esidReg;
Expand Down Expand Up @@ -199,8 +199,8 @@ struct PPU_THREAD_SPRS
u64 CTR;
// CFAR: I dont know the definition.
u64 CFAR;
// Vector Register Save.
u64 VRSAVE;
// VXU Register Save.
u32 VRSAVE;
// Data Storage Interrupt Status Register
u64 DSISR;
// Data Address Register
Expand Down

0 comments on commit df80381

Please sign in to comment.