X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fmips-assem.S;h=f9ca519bd11eba0a54b31a633451b1404ab7bbaa;hb=85483d976cc2d779493985f77f39efefb2ea622b;hp=c723b309a3bb994a2a158bfa16bdcace17af0c13;hpb=76b9a8018c36f764336ec6f5e4a3717b9e9be2bb;p=sbcl.git diff --git a/src/runtime/mips-assem.S b/src/runtime/mips-assem.S index c723b30..f9ca519 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 */ @@ -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,19 +358,38 @@ lra: .word RETURN_PC_HEADER_WIDETAG .word NIL /* arglist */ .word NIL /* type */ LEAF(undefined_tramp) - break trap_Error - .byte 4 - .byte UNDEFINED_FUN_ERROR - .byte 254 - .byte (0xc0 + sc_DescriptorReg) - .byte 1 + /* 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 + b 1f + 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 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_CODE, FDEFN_FUN_OFFSET(reg_FDEFN) + lw reg_LIP, SIMPLE_FUN_CODE_OFFSET(reg_CODE) + jr reg_LIP END(undefined_tramp) /* * The closure trampoline. */ - .align 2 + .align 5 /* common MIPS cacheline size */ + .word 0 /* pad 1 */ + .word 0 /* pad 2 */ .word SIMPLE_FUN_HEADER_WIDETAG /* header */ .word closure_tramp - SIMPLE_FUN_CODE_OFFSET /* self */ .word NIL /* next */ @@ -387,15 +406,16 @@ lra: .word RETURN_PC_HEADER_WIDETAG /* * Function-end breakpoint magic. */ - .align 3 - LEAF(fun_end_breakpoint_guts) + .align 3 /* minimum alignment for a lisp object */ .set noreorder .word RETURN_PC_HEADER_WIDETAG - + LEAF(fun_end_breakpoint_guts) b multiple_value_return nop .set reorder + /* single value return */ + move reg_OCFP, reg_CSP addu reg_CSP, 4 li reg_NARGS, 4