#include "lispregs.h"
#include "genesis/fdefn.h"
#include "genesis/closure.h"
+#include "genesis/funcallable-instance.h"
#include "genesis/simple-fun.h"
#include "genesis/static-symbols.h"
/* Indirect the closure */
ldl reg_CODE, CLOSURE_FUN_OFFSET(reg_LEXENV)
- addl reg_CODE,6*4-FUN_POINTER_LOWTAG, reg_LIP
+ addl reg_CODE, SIMPLE_FUN_CODE_OFFSET, reg_LIP
/* And into lisp we go. */
jsr reg_ZERO,(reg_LIP)
.globl end_of_tramps
end_of_tramps:
+ .text
+ .globl funcallable_instance_tramp
+ .align 2
+ .long SIMPLE_FUN_HEADER_WIDETAG
+funcallable_instance_tramp = . + 1
+ .long funcallable_instance_tramp
+ .long NIL
+ .long NIL
+ .long NIL
+ .long NIL
+ .long NIL
+
+ ldl reg_LEXENV, FUNCALLABLE_INSTANCE_FUNCTION_OFFSET(reg_LEXENV)
+ /* I think we don't actually need to use reg_CODE here, because
+ $CODE is computed from $LIP in the function itself */
+ ldl reg_CODE, CLOSURE_FUN_OFFSET(reg_LEXENV)
+ addl reg_CODE, SIMPLE_FUN_CODE_OFFSET, reg_LIP
+ jmp reg_ZERO, (reg_LIP)
/*
* fun-end breakpoint magic.
*/
+/*
+ * For an explanation of the magic involved in function-end
+ * breakpoints, see the implementation in ppc-assem.S.
+ */
+
.text
.align 2
.set noreorder
.globl fun_end_breakpoint_guts
fun_end_breakpoint_guts:
- .long RETURN_PC_HEADER_WIDETAG
+ .long RETURN_PC_HEADER_WIDETAG + 0x800
br zero, fun_end_breakpoint_trap
nop
mov reg_CSP, reg_OCFP