X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fmips-assem.S;h=b44b4bc10d48e4682d16af151761e9d49ec11c15;hb=54c6201a190414c4aef1a52b8fd261fc3dfe981b;hp=4be362842b4f2218a0cc2c04ad7d2cbe76a48364;hpb=3f13400e4297ea4b572da50e5fc926b2c3a3f07b;p=sbcl.git diff --git a/src/runtime/mips-assem.S b/src/runtime/mips-assem.S index 4be3628..b44b4bc 100644 --- a/src/runtime/mips-assem.S +++ b/src/runtime/mips-assem.S @@ -1,8 +1,24 @@ +/* + * very-low-level utilities for runtime support + */ + +/* + * This software is part of the SBCL system. See the README file for + * more information. + * + * This software is derived from the CMU CL system, which was + * written at Carnegie Mellon University and released into the + * public domain. The software is in the public domain and is + * provided with absolutely no warranty. See the COPYING and CREDITS + * files for more information. + */ + #include "sbcl.h" #include "lispregs.h" #include "globals.h" #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" @@ -358,13 +374,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 @@ -397,6 +414,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) @@ -405,6 +423,26 @@ lra: .word RETURN_PC_HEADER_WIDETAG END(closure_tramp) /* + * The trampoline for funcallable instances + */ + .globl funcallable_instance_tramp + .align 3 + .word SIMPLE_FUN_HEADER_WIDETAG +funcallable_instance_tramp = . + 1 + .word funcallable_instance_tramp + .word NIL + .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) + addu reg_LIP, reg_CODE, SIMPLE_FUN_CODE_OFFSET + jr reg_LIP + nop + +/* * 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.