Commit ef7705f6 authored by Akshat Kumar's avatar Akshat Kumar Committed by Ron Minnich

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
parent cd94caba
......@@ -187,6 +187,13 @@ TEXT runtime·errstr(SB),7,$0
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
......@@ -224,6 +224,13 @@ TEXT runtime·errstr(SB),7,$0
MOVQ $0x8000, AX
MOVQ $41, BP
SYSCALL
// syscall requires caller-save
MOVQ 8(SP), CX
// push the argument
PUSHQ CX
CALL runtime·findnull(SB)
POPQ CX
MOVQ AX, 16(SP)
RET
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment