mirror of
https://github.com/zeldaret/tp
synced 2026-07-08 14:36:36 -04:00
Match __OSDispatchInterrupt and AIRegisterDMACallback
This commit is contained in:
@@ -21,15 +21,16 @@ static AISCallback __AIS_Callback;
|
||||
static AIDCallback __AID_Callback;
|
||||
|
||||
/* 8034FC70-8034FCB4 34A5B0 0044+00 0/0 1/1 0/0 .text AIRegisterDMACallback */
|
||||
// need compiler epilogue patch
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm AIDCallback AIRegisterDMACallback(AIDCallback callback) {
|
||||
nofralloc
|
||||
#include "asm/dolphin/ai/ai/AIRegisterDMACallback.s"
|
||||
AIDCallback AIRegisterDMACallback(AIDCallback callback) {
|
||||
s32 oldInts;
|
||||
AIDCallback ret;
|
||||
|
||||
ret = __AID_Callback;
|
||||
oldInts = OSDisableInterrupts();
|
||||
__AID_Callback = callback;
|
||||
OSRestoreInterrupts(oldInts);
|
||||
return ret;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8034FCB4-8034FD3C 34A5F4 0088+00 0/0 2/2 0/0 .text AIInitDMA */
|
||||
void AIInitDMA(u32 addr, u32 length) {
|
||||
|
||||
@@ -315,8 +315,6 @@ extern u32 __OSLastInterruptSrr0;
|
||||
u32 __OSLastInterruptSrr0;
|
||||
|
||||
/* 8033DBCC-8033DF10 33850C 0344+00 1/1 0/0 0/0 .text __OSDispatchInterrupt */
|
||||
// need compiler epilogue patch
|
||||
#ifdef NONMATCHING
|
||||
void __OSDispatchInterrupt(__OSException exception, OSContext* context) {
|
||||
u32 intsr;
|
||||
u32 reg;
|
||||
@@ -435,16 +433,6 @@ void __OSDispatchInterrupt(__OSException exception, OSContext* context) {
|
||||
|
||||
OSLoadContext(context);
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void __OSDispatchInterrupt(__OSException exception, OSContext* context) {
|
||||
nofralloc
|
||||
#include "asm/dolphin/os/OSInterrupt/__OSDispatchInterrupt.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8033DF10-8033DF60 338850 0050+00 1/1 0/0 0/0 .text ExternalInterruptHandler */
|
||||
static asm void ExternalInterruptHandler(register OSInterrupt type, register OSContext* context) {
|
||||
|
||||
Reference in New Issue
Block a user