summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-12-02 19:39:34 -0800
committerOri Bernstein <ori@eigenstate.org>2016-12-02 19:39:34 -0800
commit75658ff682f476ca448dc4734a1b6da0c1c4132a (patch)
treed8c9d866e5e02a40696dd6adf5e610cd9a7a667d
parentb56e495ba86c5fdded2486b15c1ac04fed79608f (diff)
downloadmc-75658ff682f476ca448dc4734a1b6da0c1c4132a.tar.gz
Fix top of stack pointer on 9front.
We weren't setting it up right.
-rw-r--r--lib/sys/util+plan9-x64.s2
-rw-r--r--rt/_myrrt-plan9.s4
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/sys/util+plan9-x64.s b/lib/sys/util+plan9-x64.s
index f4b8586..0bf641b 100644
--- a/lib/sys/util+plan9-x64.s
+++ b/lib/sys/util+plan9-x64.s
@@ -57,8 +57,6 @@ TEXT sys$alloca+0(SB),$0
MOVQ R10,(SP) /* place ret addr */
RET
-GLOBL sys$tosptr+0(SB),$8
-DATA sys$tosptr+0(SB)/8,$_tos+0(SB)
GLOBL sys$curbrk+0(SB),$8
DATA sys$curbrk+0(SB)/8,$end+0(SB)
diff --git a/rt/_myrrt-plan9.s b/rt/_myrrt-plan9.s
index 2f91f2f..4b76fdf 100644
--- a/rt/_myrrt-plan9.s
+++ b/rt/_myrrt-plan9.s
@@ -38,7 +38,7 @@ TEXT cvt(SB),$0
TEXT _main(SB), 1, $(2*8+NPRIVATES*8)
- MOVQ AX, _tos(SB)
+ MOVQ AX, sys$tosptr(SB)
LEAQ 16(SP), AX
MOVQ AX, _privates(SB)
MOVL $NPRIVATES, _nprivates(SB)
@@ -76,6 +76,6 @@ broke:
JMP broke
GLOBL argv0(SB), $8
-GLOBL _tos(SB), $8
+GLOBL sys$tosptr(SB), $8
GLOBL _privates(SB), $8
GLOBL _nprivates(SB), $4