mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Handle interrupt return values.
This commit is contained in:
parent
d6d1f687a8
commit
529818c9cd
2 changed files with 8 additions and 1 deletions
|
@ -259,7 +259,6 @@ bool __RunOnePendingInterrupt()
|
|||
__KernelSwitchOffThread("interrupt");
|
||||
|
||||
PendingInterrupt pend = pendingInterrupts.front();
|
||||
pendingInterrupts.pop_front();
|
||||
intState.save();
|
||||
pend.handler->copyArgsToCPU(pend);
|
||||
|
||||
|
@ -294,6 +293,12 @@ void __KernelReturnFromInterrupt()
|
|||
{
|
||||
DEBUG_LOG(CPU, "Left interrupt handler at %08x", currentMIPS->pc);
|
||||
inInterrupt = false;
|
||||
|
||||
// This is what we just ran.
|
||||
PendingInterrupt pend = pendingInterrupts.front();
|
||||
pendingInterrupts.pop_front();
|
||||
pend.handler->handleResult(currentMIPS->r[MIPS_REG_V0]);
|
||||
|
||||
// Restore context after running the interrupt.
|
||||
intState.restore();
|
||||
// All should now be back to normal, including PC.
|
||||
|
|
|
@ -70,6 +70,7 @@ public:
|
|||
virtual void copyArgsToCPU(const PendingInterrupt &pend) = 0;
|
||||
virtual void queueUp() = 0;
|
||||
virtual void queueUpWithArg(int arg) = 0;
|
||||
virtual void handleResult(int result) = 0;
|
||||
};
|
||||
|
||||
class SubIntrHandler : public AllegrexInterruptHandler
|
||||
|
@ -79,6 +80,7 @@ public:
|
|||
virtual void queueUp();
|
||||
virtual void queueUpWithArg(int arg);
|
||||
virtual void copyArgsToCPU(const PendingInterrupt &pend);
|
||||
virtual void handleResult(int result) {}
|
||||
|
||||
bool enabled;
|
||||
int number;
|
||||
|
|
Loading…
Add table
Reference in a new issue