osspsetpc OK (#384)

This commit is contained in:
kyleburnette
2021-11-03 12:48:08 -07:00
committed by GitHub
parent e3830f6ab0
commit 78153a1bf4
2 changed files with 12 additions and 2 deletions
+11 -1
View File
@@ -1,3 +1,13 @@
#include "global.h"
#pragma GLOBAL_ASM("asm/non_matchings/boot/spsetpc/__osSpSetPc.s")
s32 __osSpSetPc(void* pc) {
register u32 spStatus = HW_REG(SP_STATUS_REG, u32);
if (!(spStatus & SP_STATUS_HALT)) {
return -1;
} else {
HW_REG(SP_PC_REG, void*) = pc;
}
return 0;
}