- don't movem a7, it's the stack pointer. the cpu saves it for us before processing exceptions.
- push the address of the iframe before calling the C handler. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26724 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b061bf2471
commit
150b5ae01f
@ -94,7 +94,7 @@ FUNCTION(__m68k_exception_noop):
|
||||
|
||||
FUNCTION(__m68k_exception_common):
|
||||
/* save regs */
|
||||
movem.l %d0-%d7/%a0-%a7,-(%sp) /* push the iframe address */
|
||||
movem.l %d0-%d7/%a0-%a6,-(%sp) /* push the iframe address */
|
||||
/* save fp */
|
||||
sub.l #FPU_STATE_sizeof,%sp
|
||||
fsave (%sp)
|
||||
@ -108,7 +108,9 @@ null_sav_1:
|
||||
sub.l #IFRAME_fpu-IFRAME_fp,%sp
|
||||
null_sav_2:
|
||||
|
||||
bsr m68k_exception_entry /* call C entry */
|
||||
move.l %sp,-(%sp) /* push address of iframe */
|
||||
bsr m68k_exception_entry /* call C entry */
|
||||
add.l #4,%sp
|
||||
|
||||
/* restore fp */
|
||||
tst.b IFRAME_fpu-IFRAME_fp(%sp) /* check for a null state */
|
||||
@ -123,7 +125,7 @@ null_res_2:
|
||||
frestore (%sp)
|
||||
add.l #FPU_STATE_sizeof,%sp
|
||||
/* restore regs */
|
||||
movem.l (%sp)+,%d0-%d7/%a0-%a7
|
||||
movem.l (%sp)+,%d0-%d7/%a0-%a6
|
||||
|
||||
rte
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user