source: trunk/src/gcc/boehm-gc/sparc_netbsd_mach_dep.s@ 75

Last change on this file since 75 was 2, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 907 bytes
Line 
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.
28loop:
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
Note: See TracBrowser for help on using the repository browser.