summaryrefslogtreecommitdiff
path: root/alpha_mach_dep.s
diff options
context:
space:
mode:
Diffstat (limited to 'alpha_mach_dep.s')
-rw-r--r--alpha_mach_dep.s22
1 files changed, 12 insertions, 10 deletions
diff --git a/alpha_mach_dep.s b/alpha_mach_dep.s
index 265c314..087baea 100644
--- a/alpha_mach_dep.s
+++ b/alpha_mach_dep.s
@@ -1,15 +1,18 @@
# $Id: alpha_mach_dep.s,v 1.2 1993/01/18 22:54:51 dosser Exp $
-# define call_push(x) lda $16, 0(x); jsr $26, GC_push_one
-
+# define call_push(x) \
+ lda $16, 0(x); /* copy x to first argument register */ \
+ jsr $26, GC_push_one; /* call GC_push_one, ret addr in $26 */ \
+ ldgp $gp, 0($26) /* restore $gp register from $ra */
+
.text
.align 4
.globl GC_push_regs
.ent GC_push_regs 2
GC_push_regs:
- ldgp $gp, 0($27)
- lda $sp, -32($sp)
- stq $26, 8($sp)
+ ldgp $gp, 0($27) # set gp from the procedure value reg
+ lda $sp, -32($sp) # make stack frame
+ stq $26, 8($sp) # save return address
.mask 0x04000000, -8
.frame $sp, 16, $26, 0
@@ -51,8 +54,7 @@ GC_push_regs:
call_push($29) # Global Pointer
# call_push($30) # Stack Pointer
- ldgp $gp, 0($26)
- ldq $26, 8($sp)
- lda $sp, 32($sp)
- ret $31, ($26), 1
- .end GC_push_regs
+ ldq $26, 8($sp) # restore return address
+ lda $sp, 32($sp) # pop stack frame
+ ret $31, ($26), 1 # return ($31 == hardwired zero)
+ .end GC_push_regs