summaryrefslogtreecommitdiff
path: root/alpha_mach_dep.S
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2011-07-26 15:07:21 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 15:07:21 +0200
commit3313dcc53de4d5d5f76f58a856beb06688d1f8c7 (patch)
tree112d67f2a8b062a9e238469308394e762e26e2f5 /alpha_mach_dep.S
parent9f27ae7aee7a12b3c99d0ce7dc4c7384e3189fa2 (diff)
gc6.1alpha4 tarball importgc6_1alpha4
Diffstat (limited to 'alpha_mach_dep.S')
-rw-r--r--alpha_mach_dep.S87
1 files changed, 87 insertions, 0 deletions
diff --git a/alpha_mach_dep.S b/alpha_mach_dep.S
new file mode 100644
index 0000000..5354730
--- /dev/null
+++ b/alpha_mach_dep.S
@@ -0,0 +1,87 @@
+ # $Id: alpha_mach_dep.s,v 1.2 1993/01/18 22:54:51 dosser Exp $
+ .arch ev6
+
+ .text
+ .align 4
+ .globl GC_push_regs
+ .ent GC_push_regs 2
+GC_push_regs:
+ ldgp $gp, 0($27)
+ lda $sp, -16($sp)
+ stq $26, 0($sp)
+ .mask 0x04000000, 0
+ .frame $sp, 16, $26, 0
+
+ # $0 integer result
+ # $1-$8 temp regs - not preserved cross calls
+ # $9-$15 call saved regs
+ # $16-$21 argument regs - not preserved cross calls
+ # $22-$28 temp regs - not preserved cross calls
+ # $29 global pointer - not preserved cross calls
+ # $30 stack pointer
+
+# define call_push(x) \
+ mov x, $16; \
+ jsr $26, GC_push_one; \
+ ldgp $gp, 0($26)
+
+ call_push($9)
+ call_push($10)
+ call_push($11)
+ call_push($12)
+ call_push($13)
+ call_push($14)
+ call_push($15)
+
+ # $f0-$f1 floating point results
+ # $f2-$f9 call saved regs
+ # $f10-$f30 temp regs - not preserved cross calls
+
+ # Use the most efficient transfer method for this hardware.
+ # Bit 1 detects the FIX extension, which includes ftoit.
+ amask 2, $0
+ bne $0, $use_stack
+
+#undef call_push
+#define call_push(x) \
+ ftoit x, $16; \
+ jsr $26, GC_push_one; \
+ ldgp $gp, 0($26)
+
+ call_push($f2)
+ call_push($f3)
+ call_push($f4)
+ call_push($f5)
+ call_push($f6)
+ call_push($f7)
+ call_push($f8)
+ call_push($f9)
+
+ ldq $26, 0($sp)
+ lda $sp, 16($sp)
+ ret $31, ($26), 1
+
+ .align 4
+$use_stack:
+
+#undef call_push
+#define call_push(x) \
+ stt x, 8($sp); \
+ ldq $16, 8($sp); \
+ jsr $26, GC_push_one; \
+ ldgp $gp, 0($26)
+
+ call_push($f2)
+ call_push($f3)
+ call_push($f4)
+ call_push($f5)
+ call_push($f6)
+ call_push($f7)
+ call_push($f8)
+ call_push($f9)
+
+ ldq $26, 0($sp)
+ lda $sp, 16($sp)
+ ret $31, ($26), 1
+
+ .end GC_push_regs