X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fmips-assem.S;h=62b3672ecfdcc337df25d7ebc62d30029dcfde59;hb=35ab27e7aab71c94aa6be12da15603c7fd87fca8;hp=ca4cfd06719388a49cfa49fc08f5b5cc2382db12;hpb=b9e94e326f79ab01e56cb437e424ce5ea489471f;p=sbcl.git diff --git a/src/runtime/mips-assem.S b/src/runtime/mips-assem.S index ca4cfd0..62b3672 100644 --- a/src/runtime/mips-assem.S +++ b/src/runtime/mips-assem.S @@ -19,7 +19,6 @@ #include "genesis/fdefn.h" #include "genesis/closure.h" #include "genesis/funcallable-instance.h" -#include "genesis/return-pc.h" #include "genesis/simple-fun.h" #include "genesis/static-symbols.h" @@ -166,7 +165,7 @@ symbol: lw reg_A5, 20(reg_CFP) /* Calculate LRA */ - la reg_LRA, lra - RETURN_PC_RETURN_POINT_OFFSET + la reg_LRA, lra + OTHER_POINTER_LOWTAG /* Indirect closure */ lw reg_CODE, CLOSURE_FUN_OFFSET(reg_LEXENV) @@ -192,14 +191,14 @@ lra: .word RETURN_PC_HEADER_WIDETAG /* Nested lisp -> C calls may have clobbered gp. */ lw gp, framesize-16(sp) + /* Mark us as in C land. */ + sw reg_CSP, foreign_function_call_active + /* Set the pseudo-atomic flag. */ li reg_NL4, 0 addu reg_ALLOC, 1 .set reorder - /* Mark us as in C land. */ - sw reg_CSP, foreign_function_call_active - /* Save LISP state. */ subu reg_NL0, reg_ALLOC, 1 sw reg_NL0, dynamic_space_free_pointer @@ -262,15 +261,15 @@ lra: .word RETURN_PC_HEADER_WIDETAG move reg_CFP, reg_CSP addu reg_CSP, reg_CFP, 32 + /* Mark us as in C land. */ + sw reg_CSP, foreign_function_call_active + /* Set the pseudo-atomic flag. */ .set noreorder li reg_NL4, 0 addu reg_ALLOC, 1 .set reorder - /* Mark us as in C land. */ - sw reg_CSP, foreign_function_call_active - /* Convert the return address to an offset and save it on the stack. */ subu reg_NFP, reg_LIP, reg_CODE addu reg_NFP, OTHER_POINTER_LOWTAG @@ -374,13 +373,14 @@ lra: .word RETURN_PC_HEADER_WIDETAG .word NIL /* name */ .word NIL /* arglist */ .word NIL /* type */ + .word NIL /* xrefs */ LEAF(undefined_tramp) /* Point reg_CODE to the header and tag it as function, since the debugger regards a function pointer in reg_CODE which doesn't point to a code object as undefined function. */ lui reg_CODE, %hi(undefined_tramp) addiu reg_CODE, %lo(undefined_tramp) - addiu reg_CODE, - 24 + FUN_POINTER_LOWTAG + addiu reg_CODE, -SIMPLE_FUN_CODE_OFFSET .set noreorder b 1f break 0x0, trap_Cerror @@ -392,8 +392,8 @@ lra: .word RETURN_PC_HEADER_WIDETAG See debug-var-io.lisp. */ .byte 254 /* reg_FDEFN is #14. */ - .byte ((14 << 5) + sc_DescriptorReg) % 0x100 - .byte ((14 << 5) + sc_DescriptorReg) / 0x100 + .byte ((14 << 6) + sc_DescriptorReg) % 0x100 + .byte ((14 << 6) + sc_DescriptorReg) / 0x100 .align 2 .set reorder 1: lw reg_CODE, FDEFN_FUN_OFFSET(reg_FDEFN) @@ -413,6 +413,7 @@ lra: .word RETURN_PC_HEADER_WIDETAG .word NIL /* name */ .word NIL /* arglist */ .word NIL /* type */ + .word NIL /* xrefs */ LEAF(closure_tramp) lw reg_LEXENV, FDEFN_FUN_OFFSET(reg_FDEFN) lw reg_CODE, CLOSURE_FUN_OFFSET(reg_LEXENV) @@ -432,6 +433,7 @@ funcallable_instance_tramp = . + 1 .word NIL .word NIL .word NIL + .word NIL lw reg_LEXENV, FUNCALLABLE_INSTANCE_FUNCTION_OFFSET(reg_LEXENV) lw reg_CODE, CLOSURE_FUN_OFFSET(reg_LEXENV) @@ -444,10 +446,16 @@ funcallable_instance_tramp = . + 1 * copied and has to be relocatable. It also needs a properly aligned * header tag after the fun_end_breakpoint_guts symbol. */ + +/* + * For an explanation of the magic involved in function-end + * breakpoints, see the implementation in ppc-assem.S. + */ + .align 3 /* minimum alignment for a lisp object */ LEAF(fun_end_breakpoint_guts) .set noreorder - .word RETURN_PC_HEADER_WIDETAG + .word RETURN_PC_HEADER_WIDETAG + 0x800 b multiple_value_return nop .set reorder @@ -466,7 +474,16 @@ funcallable_instance_tramp = . + 1 multiple_value_return: FEXPORT(fun_end_breakpoint_trap) - break 0x0, trap_FunEndBreakpoint + .set noreorder b multiple_value_return + break 0x0, trap_FunEndBreakpoint + .set reorder EXPORT(fun_end_breakpoint_end) END(fun_end_breakpoint_guts) + + + .align 3 /* minimum alignment for a lisp object */ + LEAF(do_pending_interrupt) + break 0x0, trap_PendingInterrupt + jr reg_LIP + END(do_pending_interrupt)