Commit 997809c8 authored by Russ Cox's avatar Russ Cox

runtime: fix solaris build

nanotime1 is not a Go function and must not store its result at 0(FP).
That overwrites some data owned by the caller.

TBR=aram
CC=golang-codereviews
https://golang.org/cl/138730043
parent c548cc2e
...@@ -18,6 +18,7 @@ TEXT runtime·settls(SB),NOSPLIT,$8 ...@@ -18,6 +18,7 @@ TEXT runtime·settls(SB),NOSPLIT,$8
// Set the TLS errno pointer in M. // Set the TLS errno pointer in M.
// //
// Called using runtime·asmcgocall from os_solaris.c:/minit. // Called using runtime·asmcgocall from os_solaris.c:/minit.
// NOT USING GO CALLING CONVENTION.
TEXT runtime·miniterrno(SB),NOSPLIT,$0 TEXT runtime·miniterrno(SB),NOSPLIT,$0
// asmcgocall will put first argument into DI. // asmcgocall will put first argument into DI.
CALL DI // SysV ABI so returns in AX CALL DI // SysV ABI so returns in AX
...@@ -33,6 +34,7 @@ TEXT runtime·miniterrno(SB),NOSPLIT,$0 ...@@ -33,6 +34,7 @@ TEXT runtime·miniterrno(SB),NOSPLIT,$0
// runtime·nanotime stack. // runtime·nanotime stack.
// //
// Called using runtime·sysvicall6 from os_solaris.c:/nanotime. // Called using runtime·sysvicall6 from os_solaris.c:/nanotime.
// NOT USING GO CALLING CONVENTION.
TEXT runtime·nanotime1(SB),NOSPLIT,$0 TEXT runtime·nanotime1(SB),NOSPLIT,$0
// need space for the timespec argument. // need space for the timespec argument.
SUBQ $64, SP // 16 bytes will do, but who knows in the future? SUBQ $64, SP // 16 bytes will do, but who knows in the future?
...@@ -44,10 +46,10 @@ TEXT runtime·nanotime1(SB),NOSPLIT,$0 ...@@ -44,10 +46,10 @@ TEXT runtime·nanotime1(SB),NOSPLIT,$0
IMULQ $1000000000, AX // multiply into nanoseconds IMULQ $1000000000, AX // multiply into nanoseconds
ADDQ 8(SP), AX // tv_nsec, offset should be stable. ADDQ 8(SP), AX // tv_nsec, offset should be stable.
ADDQ $64, SP ADDQ $64, SP
MOVQ AX, ret+0(FP)
RET RET
// pipe(3c) wrapper that returns fds in AX, DX. // pipe(3c) wrapper that returns fds in AX, DX.
// NOT USING GO CALLING CONVENTION.
TEXT runtime·pipe1(SB),NOSPLIT,$0 TEXT runtime·pipe1(SB),NOSPLIT,$0
SUBQ $16, SP // 8 bytes will do, but stack has to be 16-byte alligned SUBQ $16, SP // 8 bytes will do, but stack has to be 16-byte alligned
MOVQ SP, DI MOVQ SP, DI
...@@ -67,6 +69,7 @@ TEXT runtime·pipe1(SB),NOSPLIT,$0 ...@@ -67,6 +69,7 @@ TEXT runtime·pipe1(SB),NOSPLIT,$0
// section 3.2.3. // section 3.2.3.
// //
// Called by runtime·asmcgocall or runtime·cgocall. // Called by runtime·asmcgocall or runtime·cgocall.
// NOT USING GO CALLING CONVENTION.
TEXT runtime·asmsysvicall6(SB),NOSPLIT,$0 TEXT runtime·asmsysvicall6(SB),NOSPLIT,$0
// asmcgocall will put first argument into DI. // asmcgocall will put first argument into DI.
PUSHQ DI // save for later PUSHQ DI // save for later
......
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