mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-15 12:24:39 +00:00
Correctly align program stacks (#1133)
* Properly align program stacks * Enforce size being a multiple of 8 bytes * Correct alignment calculation * Use an ALIGN8 macro in the stack declaration macro
This commit is contained in:
parent
b41489c443
commit
cf048f849a
8 changed files with 38 additions and 30 deletions
|
@ -79,7 +79,7 @@ const char* sFpExceptionNames[] = {
|
|||
// TODO: import .bss (has reordering issues)
|
||||
extern FaultMgr* sFaultInstance;
|
||||
extern u8 sFaultAwaitingInput;
|
||||
extern char sFaultStack[0x600];
|
||||
extern STACK(sFaultStack, 0x600);
|
||||
extern StackEntry sFaultThreadInfo;
|
||||
extern FaultMgr gFaultMgr;
|
||||
|
||||
|
@ -1264,8 +1264,8 @@ void Fault_Init(void) {
|
|||
sFaultInstance->autoScroll = false;
|
||||
gFaultMgr.faultHandlerEnabled = true;
|
||||
osCreateMesgQueue(&sFaultInstance->queue, &sFaultInstance->msg, 1);
|
||||
StackCheck_Init(&sFaultThreadInfo, &sFaultStack, sFaultStack + sizeof(sFaultStack), 0, 0x100, "fault");
|
||||
osCreateThread(&sFaultInstance->thread, 2, Fault_ThreadEntry, 0, sFaultStack + sizeof(sFaultStack),
|
||||
StackCheck_Init(&sFaultThreadInfo, &sFaultStack, STACK_TOP(sFaultStack), 0, 0x100, "fault");
|
||||
osCreateThread(&sFaultInstance->thread, 2, Fault_ThreadEntry, 0, STACK_TOP(sFaultStack),
|
||||
OS_PRIORITY_APPMAX);
|
||||
osStartThread(&sFaultInstance->thread);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue