X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fmips-assem.S;h=d18699aa4e972396bd14af5d09db21fed1795f00;hb=8a97cca4411b211a5d4be617bb179e3f53a61f31;hp=1c8a92353adf1ccf6a0cbb93f78f2349b4c128c6;hpb=481348f2f96f364374f669786f9fc61348decabc;p=sbcl.git diff --git a/src/runtime/mips-assem.S b/src/runtime/mips-assem.S index 1c8a923..d18699a 100644 --- a/src/runtime/mips-assem.S +++ b/src/runtime/mips-assem.S @@ -138,7 +138,7 @@ symbol: .set noreorder bgez reg_NL4, 1f subu reg_ALLOC, 1 - break 0x10 + break 0x0, 0x10 1: .set reorder /* Pass in args */ @@ -162,7 +162,7 @@ symbol: addu reg_LIP, reg_CODE, SIMPLE_FUN_CODE_OFFSET jr reg_LIP - .align 2 + .align 3 .set noreorder lra: .word RETURN_PC_HEADER_WIDETAG @@ -194,7 +194,7 @@ lra: .word RETURN_PC_HEADER_WIDETAG .set noreorder bgez reg_NL4, 1f subu reg_ALLOC, 1 - break 0x10 + break 0x0, 0x10 1: .set reorder /* Pass one return value back to C land. For a 64bit value, we may @@ -272,7 +272,7 @@ lra: .word RETURN_PC_HEADER_WIDETAG .set noreorder bgez reg_NL4, 1f subu reg_ALLOC, 1 - break 0x10 + break 0x0, 0x10 1: .set reorder /* Into C land we go. */ @@ -333,7 +333,7 @@ lra: .word RETURN_PC_HEADER_WIDETAG .set noreorder bgez reg_NL4, 1f subu reg_ALLOC, 1 - break 0x10 + break 0x0, 0x10 1: .set reorder /* Reset the lisp stack. */ @@ -350,7 +350,7 @@ lra: .word RETURN_PC_HEADER_WIDETAG * * The undefined-function trampoline. */ - .align 2 + .align 3 /* minimum alignment for a lisp object */ .word SIMPLE_FUN_HEADER_WIDETAG /* header */ .word undefined_tramp - SIMPLE_FUN_CODE_OFFSET /* self */ .word NIL /* next */ @@ -358,24 +358,29 @@ lra: .word RETURN_PC_HEADER_WIDETAG .word NIL /* arglist */ .word NIL /* type */ 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 .set noreorder - /* Continuable errors break here for some reason. b 1f - break trap_Cerror */ - break trap_Error + break 0x0, trap_Cerror /* Error data length. */ .byte 4 /* Error number. */ .byte UNDEFINED_FUN_ERROR /* Magic value 254 means a 16bit little endian value follows. - See interr.c:describe_internal_error. */ + See debug-var-io.lisp. */ .byte 254 /* reg_FDEFN is #14. */ .byte ((14 << 5) + sc_DescriptorReg) % 0x100 .byte ((14 << 5) + sc_DescriptorReg) / 0x100 .align 2 .set reorder -1: lw reg_LIP, FDEFN_RAW_ADDR_OFFSET(reg_FDEFN) +1: lw reg_CODE, FDEFN_FUN_OFFSET(reg_FDEFN) + lw reg_LIP, SIMPLE_FUN_CODE_OFFSET(reg_CODE) jr reg_LIP END(undefined_tramp) @@ -399,16 +404,19 @@ lra: .word RETURN_PC_HEADER_WIDETAG END(closure_tramp) /* - * Function-end breakpoint magic. + * Function-end breakpoint magic. This is truely magic, the code is + * copied and has to be relocatable. It also needs a properly aligned + * header tag after the fun_end_breakpoint_guts symbol. */ - .align 2 + .align 3 /* minimum alignment for a lisp object */ LEAF(fun_end_breakpoint_guts) - .set noreorder - .word RETURN_PC_HEADER_WIDETAG - - b multiple_value_return + .set noreorder + .word RETURN_PC_HEADER_WIDETAG + b multiple_value_return nop - .set reorder + .set reorder + + /* single value return */ move reg_OCFP, reg_CSP addu reg_CSP, 4 @@ -422,7 +430,7 @@ lra: .word RETURN_PC_HEADER_WIDETAG multiple_value_return: FEXPORT(fun_end_breakpoint_trap) - break trap_FunEndBreakpoint + break 0x0, trap_FunEndBreakpoint b multiple_value_return EXPORT(fun_end_breakpoint_end) END(fun_end_breakpoint_guts)