OSDN Git Service

* Makefile.tpl ($(srcdir)/configure): Update dependencies.
[pf3gnuchains/gcc-fork.git] / boehm-gc / sparc_netbsd_mach_dep.s
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
5 !       examined.
6
7 #include "machine/asm.h"
8
9         .seg    "text"
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
15         mov     %sp,%o0
16         retl
17         nop
18         
19         .globl  _C_LABEL(GC_clear_stack_inner)
20 _C_LABEL(GC_clear_stack_inner):
21         mov     %sp,%o2         ! Save sp
22         add     %sp,-8,%o3      ! p = sp-8
23         clr     %g1             ! [g0,g1] = 0
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.
28 loop:
29         std     %g0,[%o3]       ! *(long long *)p = 0
30         cmp     %o3,%o1
31         bgu     loop            ! if (p > limit) goto loop
32         add     %o3,-8,%o3      ! p -= 8 (delay slot)
33         retl
34         mov     %o2,%sp         ! Restore sp., delay slot