phase12: match func_800AC648 (708 bodies / 717 regions)
This commit is contained in:
+835
-836
File diff suppressed because it is too large
Load Diff
@@ -513,6 +513,7 @@
|
||||
0x800AA56C 0x800AA59C src/func_800AA56C.c
|
||||
0x800AB078 0x800AB0EC src/func_800AB078.c
|
||||
0x800AB504 0x800AB598 src/func_800AB504.c cc1=-fno-strength-reduce
|
||||
0x800AC648 0x800AC694 src/func_800AC648.c
|
||||
0x800AC818 0x800AC85C src/func_800AC818.c
|
||||
0x800AC85C 0x800AC884 src/func_800AC85C.c
|
||||
0x800AC98C 0x800AC9D8 src/func_800AC98C.c
|
||||
|
||||
|
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* func_800AC648 — 76 bytes at 0x800AC648..0x800AC694
|
||||
*
|
||||
* Calls func_800ABA28 with the incoming pointer, saves the current stack pointer,
|
||||
* switches to the alternate scratchpad stack at 0x1F8003DC, calls func_800BBDF8
|
||||
* with the same pointer, and restores the original stack pointer.
|
||||
*
|
||||
* The three inline-assembly macros are the repository's sanctioned scratchpad-stack
|
||||
* idiom: they are required because C cannot express reassignment of the machine
|
||||
* stack pointer while preserving the compiler's own stack bookkeeping. The s0
|
||||
* binding keeps the argument live across the stack switch and reproduces the target's
|
||||
* save/restore and epilogue.
|
||||
*
|
||||
* LIMITS: the two callees and pointer meaning are not inferred. The scratchpad save
|
||||
* slot 0x1F8003FC, alternate stack 0x1F8003DC, call order, argument preservation,
|
||||
* frame, and restore sequence are byte evidence.
|
||||
*/
|
||||
|
||||
#define SF3_SAVE_SP() \
|
||||
__asm__ __volatile__("lui $at,0x1f80\n\t" \
|
||||
"sw $sp,1020($at)")
|
||||
#define SF3_SET_SP() \
|
||||
__asm__ __volatile__("lui $sp,0x1f80\n\t" \
|
||||
"ori $sp,$sp,0x3dc")
|
||||
#define SF3_REST_SP() \
|
||||
__asm__ __volatile__("lui $sp,0x1f80\n\t" \
|
||||
"lw $sp,1020($sp)")
|
||||
|
||||
extern void func_800ABA28(int *);
|
||||
extern void func_800BBDF8(int *);
|
||||
|
||||
void func_800AC648(int *a0)
|
||||
{
|
||||
register int *s0 __asm__("$16") = a0;
|
||||
|
||||
func_800ABA28(s0);
|
||||
SF3_SAVE_SP();
|
||||
SF3_SET_SP();
|
||||
func_800BBDF8(s0);
|
||||
SF3_REST_SP();
|
||||
}
|
||||
Reference in New Issue
Block a user