OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [boehm-gc/] [sparc_mach_dep.S] - Blame information for rev 729

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 721 jeremybenn
!       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 5, not SunOS 4.
4
!       Assumes this is called before the stack contents are
5
!       examined.
6
 
7
        .seg    "text"
8
        .globl  GC_save_regs_in_stack
9
        .globl  GC_push_regs
10
GC_save_regs_in_stack:
11
GC_push_regs:
12
#if defined(__arch64__) || defined(__sparcv9)
13
        save    %sp,-128,%sp
14
        flushw
15
        ret
16
          restore %sp,2047+128,%o0
17
#else /* 32 bit SPARC */
18
        ta      0x3   ! ST_FLUSH_WINDOWS
19
        mov     %sp,%o0
20
        retl
21
        nop
22
#endif /* 32 bit SPARC */
23
.GC_save_regs_in_stack_end:
24
        .size GC_save_regs_in_stack,.GC_save_regs_in_stack_end-GC_save_regs_in_stack
25
 
26
 
27
        .globl  GC_clear_stack_inner
28
GC_clear_stack_inner:
29
#if defined(__arch64__) || defined(__sparcv9)
30
        mov %sp,%o2             ! Save sp
31
        add %sp,2047-8,%o3      ! p = sp+bias-8
32
        add %o1,-2047-192,%sp   ! Move sp out of the way,
33
                                ! so that traps still work.
34
                                ! Includes some extra words
35
                                ! so we can be sloppy below.
36
loop:
37
        stx %g0,[%o3]           ! *(long *)p = 0
38
        cmp %o3,%o1
39
        bgu,pt %xcc, loop       ! if (p > limit) goto loop
40
          add %o3,-8,%o3        ! p -= 8 (delay slot)
41
        retl
42
          mov %o2,%sp           ! Restore sp., delay slot
43
#else  /* 32 bit SPARC */
44
        mov     %sp,%o2         ! Save sp
45
        add     %sp,-8,%o3      ! p = sp-8
46
        clr     %g1             ! [g0,g1] = 0
47
        add     %o1,-0x60,%sp   ! Move sp out of the way,
48
                                ! so that traps still work.
49
                                ! Includes some extra words
50
                                ! so we can be sloppy below.
51
loop:
52
        std     %g0,[%o3]       ! *(long long *)p = 0
53
        cmp     %o3,%o1
54
        bgu     loop            ! if (p > limit) goto loop
55
          add   %o3,-8,%o3      ! p -= 8 (delay slot)
56
        retl
57
          mov   %o2,%sp         ! Restore sp., delay slot
58
#endif  /* 32 bit SPARC */
59
.GC_clear_stack_inner_end:
60
        .size GC_clear_stack_inner,.GC_clear_stack_inner_end-GC_clear_stack_inner
61
 
62
 
63
 
64
 
65
 
66
 
67
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.