51488
|
1 # $Id: alpha_mach_dep.s,v 1.2 1993/01/18 22:54:51 dosser Exp $
|
|
2 .arch ev6
|
|
3
|
|
4 .text
|
|
5 .align 4
|
|
6 .globl GC_push_regs
|
|
7 .ent GC_push_regs 2
|
|
8 GC_push_regs:
|
|
9 ldgp $gp, 0($27)
|
|
10 lda $sp, -16($sp)
|
|
11 stq $26, 0($sp)
|
|
12 .mask 0x04000000, 0
|
|
13 .frame $sp, 16, $26, 0
|
|
14
|
|
15 # $0 integer result
|
|
16 # $1-$8 temp regs - not preserved cross calls
|
|
17 # $9-$15 call saved regs
|
|
18 # $16-$21 argument regs - not preserved cross calls
|
|
19 # $22-$28 temp regs - not preserved cross calls
|
|
20 # $29 global pointer - not preserved cross calls
|
|
21 # $30 stack pointer
|
|
22
|
|
23 # define call_push(x) \
|
|
24 mov x, $16; \
|
|
25 jsr $26, GC_push_one; \
|
|
26 ldgp $gp, 0($26)
|
|
27
|
|
28 call_push($9)
|
|
29 call_push($10)
|
|
30 call_push($11)
|
|
31 call_push($12)
|
|
32 call_push($13)
|
|
33 call_push($14)
|
|
34 call_push($15)
|
|
35
|
|
36 # $f0-$f1 floating point results
|
|
37 # $f2-$f9 call saved regs
|
|
38 # $f10-$f30 temp regs - not preserved cross calls
|
|
39
|
|
40 # Use the most efficient transfer method for this hardware.
|
|
41 # Bit 1 detects the FIX extension, which includes ftoit.
|
|
42 amask 2, $0
|
|
43 bne $0, $use_stack
|
|
44
|
|
45 #undef call_push
|
|
46 #define call_push(x) \
|
|
47 ftoit x, $16; \
|
|
48 jsr $26, GC_push_one; \
|
|
49 ldgp $gp, 0($26)
|
|
50
|
|
51 call_push($f2)
|
|
52 call_push($f3)
|
|
53 call_push($f4)
|
|
54 call_push($f5)
|
|
55 call_push($f6)
|
|
56 call_push($f7)
|
|
57 call_push($f8)
|
|
58 call_push($f9)
|
|
59
|
|
60 ldq $26, 0($sp)
|
|
61 lda $sp, 16($sp)
|
|
62 ret $31, ($26), 1
|
|
63
|
|
64 .align 4
|
|
65 $use_stack:
|
|
66
|
|
67 #undef call_push
|
|
68 #define call_push(x) \
|
|
69 stt x, 8($sp); \
|
|
70 ldq $16, 8($sp); \
|
|
71 jsr $26, GC_push_one; \
|
|
72 ldgp $gp, 0($26)
|
|
73
|
|
74 call_push($f2)
|
|
75 call_push($f3)
|
|
76 call_push($f4)
|
|
77 call_push($f5)
|
|
78 call_push($f6)
|
|
79 call_push($f7)
|
|
80 call_push($f8)
|
|
81 call_push($f9)
|
|
82
|
|
83 ldq $26, 0($sp)
|
|
84 lda $sp, 16($sp)
|
|
85 ret $31, ($26), 1
|
|
86
|
|
87 .end GC_push_regs
|