ref: 75658ff682f476ca448dc4734a1b6da0c1c4132a
parent: b56e495ba86c5fdded2486b15c1ac04fed79608f
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Dec 2 14:39:34 EST 2016
Fix top of stack pointer on 9front. We weren't setting it up right.
--- a/lib/sys/util+plan9-x64.s
+++ b/lib/sys/util+plan9-x64.s
@@ -57,8 +57,6 @@
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)
--- a/rt/_myrrt-plan9.s
+++ b/rt/_myrrt-plan9.s
@@ -38,7 +38,7 @@
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 @@
JMP broke
GLOBL argv0(SB), $8
-GLOBL _tos(SB), $8
+GLOBL sys$tosptr(SB), $8
GLOBL _privates(SB), $8
GLOBL _nprivates(SB), $4