X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fsparc-assem.S;h=6c2af48150f22110fe47e0b8a4afb6bafa20c794;hb=dd54f9e004a0a83d1328e94648f48dcc27e0be5b;hp=cb4bfe64aa5755ff780c622e1c88005bd5e4a55b;hpb=56caa7055d1a1d228842cf4fb05dc4b53f9131b0;p=sbcl.git diff --git a/src/runtime/sparc-assem.S b/src/runtime/sparc-assem.S index cb4bfe6..6c2af48 100644 --- a/src/runtime/sparc-assem.S +++ b/src/runtime/sparc-assem.S @@ -1,12 +1,13 @@ #define _ASM -#define FUNCDEF(x) .type x,@function +#include "sparc-funcdef.h" #define LANGUAGE_ASSEMBLY #include "lispregs.h" #include "globals.h" #include "sbcl.h" #include "genesis/closure.h" +#include "genesis/funcallable-instance.h" #include "genesis/fdefn.h" #include "genesis/static-symbols.h" #include "genesis/simple-fun.h" @@ -200,6 +201,8 @@ call_into_c: ret nop +/* Lisp calling convention. notice the first .byte line. + */ .global undefined_tramp FUNCDEF(undefined_tramp) .align 8 @@ -210,6 +213,7 @@ undefined_tramp = . + 1 .word NIL .word NIL .word NIL + .word NIL b 1f unimp trap_Cerror @@ -222,6 +226,8 @@ undefined_tramp = . + 1 jmp reg_CODE+SIMPLE_FUN_CODE_OFFSET nop +/* Lisp calling convention. Notice the first .byte line. + */ .global closure_tramp FUNCDEF(closure_tramp) .align 8 @@ -232,22 +238,43 @@ closure_tramp = . + 1 .word NIL .word NIL .word NIL + .word NIL ld [reg_FDEFN+FDEFN_FUN_OFFSET], reg_LEXENV ld [reg_LEXENV+CLOSURE_FUN_OFFSET], reg_CODE jmp reg_CODE+SIMPLE_FUN_CODE_OFFSET nop - + .global funcallable_instance_tramp + FUNCDEF(funcallable_instance_tramp) + .align 8 + .word SIMPLE_FUN_HEADER_WIDETAG +funcallable_instance_tramp = . + 1 + .word funcallable_instance_tramp + .word NIL + .word NIL + .word NIL + .word NIL + .word NIL + + ld [reg_LEXENV+FUNCALLABLE_INSTANCE_FUNCTION_OFFSET], reg_LEXENV + ld [reg_LEXENV+CLOSURE_FUN_OFFSET], reg_CODE + jmp reg_CODE+SIMPLE_FUN_CODE_OFFSET + nop /* * Function-end breakpoint magic. */ +/* + * For an explanation of the magic involved in function-end + * breakpoints, see the implementation in ppc-assem.S. + */ + .text .align 8 .global fun_end_breakpoint_guts fun_end_breakpoint_guts: - .word RETURN_PC_HEADER_WIDETAG + .word RETURN_PC_HEADER_WIDETAG + 0x800 b 1f nop mov reg_CSP, reg_OCFP @@ -287,4 +314,3 @@ save_context: ta ST_FLUSH_WINDOWS ! flush register windows retl ! return from leaf routine nop -