1.0.32.18: additional allocation information
[sbcl.git] / src / runtime / sparc-assem.S
index a18bdc2..ac6342d 100644 (file)
@@ -1,12 +1,16 @@
 #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"        
 
 #define load(sym, reg) \
         sethi %hi(sym), reg; ld [reg+%lo(sym)], reg
@@ -197,6 +201,8 @@ call_into_c:
         ret
         nop
 
+/* Lisp calling convention. notice the first .byte line.
+ */            
         .global undefined_tramp
        FUNCDEF(undefined_tramp)
         .align  8
@@ -207,6 +213,7 @@ undefined_tramp = . + 1
         .word   NIL
         .word   NIL
         .word   NIL
+        .word   NIL
 
        b       1f
         unimp   trap_Cerror
@@ -219,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
@@ -229,13 +238,29 @@ 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.
  */
@@ -266,9 +291,9 @@ fun_end_breakpoint_trap:
        .global fun_end_breakpoint_end
 fun_end_breakpoint_end:
 
-       .global flush_icache
-       FUNCDEF(flush_icache)
-flush_icache:
+       .global sparc_flush_icache
+       FUNCDEF(sparc_flush_icache)
+sparc_flush_icache:
         add %o0,%o1,%o2
 1:      iflush %o0                     ! flush instruction cache
         add %o0,8,%o0