PageRenderTime 27ms CodeModel.GetById 16ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/vendor/gc/sparc_netbsd_mach_dep.s

http://github.com/feyeleanor/RubyGoLightly
Assembly | 34 lines | 31 code | 3 blank | 0 comment | 2 complexity | 2fb164a0b84a2a49c3cd41e877cd61e7 MD5 | raw file
 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