runtime: Plan 9: fix errstr
The call to the C function runtime.findnull() requires
that we provide the argument at 0(SP).
R=rsc, rminnich, ality
CC=golang-dev
https://golang.org/cl/7559047
diff --git a/src/pkg/runtime/sys_plan9_386.s b/src/pkg/runtime/sys_plan9_386.s
index 09211e8..1f860a9 100644
--- a/src/pkg/runtime/sys_plan9_386.s
+++ b/src/pkg/runtime/sys_plan9_386.s
@@ -187,6 +187,13 @@
MOVL $ERRMAX, 8(SP)
MOVL $41, AX
INT $64
+
+ // syscall requires caller-save
+ MOVL 4(SP), CX
+
+ // push the argument
+ PUSHL CX
CALL runtime·findnull(SB)
+ POPL CX
MOVL AX, 8(SP)
RET