1 ! SPARCompiler 3.0 and later apparently no longer handles
2 ! asm outside functions. So we need a separate .s file
3 ! This is only set up for SunOS 4.
4 ! Assumes this is called before the stack contents are
7 #include "machine/asm.h"
10 .globl _C_LABEL(GC_save_regs_in_stack)
11 .globl _C_LABEL(GC_push_regs)
12 _C_LABEL(GC_save_regs_in_stack):
13 _C_LABEL(GC_push_regs):
14 ta 0x3 ! ST_FLUSH_WINDOWS
19 .globl _C_LABEL(GC_clear_stack_inner)
20 _C_LABEL(GC_clear_stack_inner):
22 add %sp,-8,%o3 ! p = sp-8
24 add %o1,-0x60,%sp ! Move sp out of the way,
25 ! so that traps still work.
26 ! Includes some extra words
27 ! so we can be sloppy below.
29 std %g0,[%o3] ! *(long long *)p = 0
31 bgu loop ! if (p > limit) goto loop
32 add %o3,-8,%o3 ! p -= 8 (delay slot)
34 mov %o2,%sp ! Restore sp., delay slot