Commit 8ee0fd86 authored by Matthew Dempsky's avatar Matthew Dempsky

runtime: replace is{plan9,solaris,windows} with GOOS tests

Change-Id: I27589395f547c5837dc7536a0ab5bc7cc23a4ff6
Reviewed-on: https://go-review.googlesource.com/10872
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent e4feb18f
...@@ -67,13 +67,15 @@ nocpuinfo: ...@@ -67,13 +67,15 @@ nocpuinfo:
MOVL AX, g_stackguard0(CX) MOVL AX, g_stackguard0(CX)
MOVL AX, g_stackguard1(CX) MOVL AX, g_stackguard1(CX)
#ifndef GOOS_windows
// skip runtime·ldt0setup(SB) and tls test after _cgo_init for non-windows // skip runtime·ldt0setup(SB) and tls test after _cgo_init for non-windows
CMPL runtime·iswindows(SB), $0 JMP ok
JEQ ok #endif
needtls: needtls:
#ifdef GOOS_plan9
// skip runtime·ldt0setup(SB) and tls test on Plan 9 in all cases // skip runtime·ldt0setup(SB) and tls test on Plan 9 in all cases
CMPL runtime·isplan9(SB), $1 JMP ok
JEQ ok #endif
// set up %gs // set up %gs
CALL runtime·ldt0setup(SB) CALL runtime·ldt0setup(SB)
......
...@@ -65,15 +65,18 @@ nocpuinfo: ...@@ -65,15 +65,18 @@ nocpuinfo:
MOVQ AX, g_stackguard0(CX) MOVQ AX, g_stackguard0(CX)
MOVQ AX, g_stackguard1(CX) MOVQ AX, g_stackguard1(CX)
CMPL runtime·iswindows(SB), $0 #ifndef GOOS_windows
JEQ ok JMP ok
#endif
needtls: needtls:
#ifdef GOOS_plan9
// skip TLS setup on Plan 9 // skip TLS setup on Plan 9
CMPL runtime·isplan9(SB), $1 JMP ok
JEQ ok #endif
#ifdef GOOS_solaris
// skip TLS setup on Solaris // skip TLS setup on Solaris
CMPL runtime·issolaris(SB), $1 JMP ok
JEQ ok #endif
LEAQ runtime·tls0(SB), DI LEAQ runtime·tls0(SB), DI
CALL runtime·settls(SB) CALL runtime·settls(SB)
......
...@@ -16,8 +16,6 @@ TEXT _rt0_386_plan9(SB),NOSPLIT,$12 ...@@ -16,8 +16,6 @@ TEXT _rt0_386_plan9(SB),NOSPLIT,$12
MOVL AX, 4(SP) MOVL AX, 4(SP)
CALL runtime·rt0_go(SB) CALL runtime·rt0_go(SB)
DATA runtime·isplan9(SB)/4, $1
GLOBL runtime·isplan9(SB), NOPTR, $4
GLOBL _tos(SB), NOPTR, $4 GLOBL _tos(SB), NOPTR, $4
GLOBL _privates(SB), NOPTR, $4 GLOBL _privates(SB), NOPTR, $4
GLOBL _nprivates(SB), NOPTR, $4 GLOBL _nprivates(SB), NOPTR, $4
...@@ -14,8 +14,6 @@ TEXT _rt0_amd64_plan9(SB),NOSPLIT,$24 ...@@ -14,8 +14,6 @@ TEXT _rt0_amd64_plan9(SB),NOSPLIT,$24
MOVQ $runtime·rt0_go(SB), AX MOVQ $runtime·rt0_go(SB), AX
JMP AX JMP AX
DATA runtime·isplan9(SB)/4, $1
GLOBL runtime·isplan9(SB), NOPTR, $4
GLOBL _tos(SB), NOPTR, $8 GLOBL _tos(SB), NOPTR, $8
GLOBL _privates(SB), NOPTR, $8 GLOBL _privates(SB), NOPTR, $8
GLOBL _nprivates(SB), NOPTR, $4 GLOBL _nprivates(SB), NOPTR, $4
...@@ -13,6 +13,3 @@ TEXT _rt0_amd64_solaris(SB),NOSPLIT,$-8 ...@@ -13,6 +13,3 @@ TEXT _rt0_amd64_solaris(SB),NOSPLIT,$-8
TEXT main(SB),NOSPLIT,$-8 TEXT main(SB),NOSPLIT,$-8
MOVQ $runtime·rt0_go(SB), AX MOVQ $runtime·rt0_go(SB), AX
JMP AX JMP AX
DATA runtime·issolaris(SB)/4, $1
GLOBL runtime·issolaris(SB), NOPTR, $4
...@@ -14,7 +14,3 @@ TEXT _rt0_386_windows(SB),NOSPLIT,$12 ...@@ -14,7 +14,3 @@ TEXT _rt0_386_windows(SB),NOSPLIT,$12
TEXT _main(SB),NOSPLIT,$0 TEXT _main(SB),NOSPLIT,$0
JMP runtime·rt0_go(SB) JMP runtime·rt0_go(SB)
DATA runtime·iswindows(SB)/4, $1
GLOBL runtime·iswindows(SB), NOPTR, $4
...@@ -15,6 +15,3 @@ TEXT _rt0_amd64_windows(SB),NOSPLIT,$-8 ...@@ -15,6 +15,3 @@ TEXT _rt0_amd64_windows(SB),NOSPLIT,$-8
TEXT main(SB),NOSPLIT,$-8 TEXT main(SB),NOSPLIT,$-8
MOVQ $runtime·rt0_go(SB), AX MOVQ $runtime·rt0_go(SB), AX
JMP AX JMP AX
DATA runtime·iswindows(SB)/4, $1
GLOBL runtime·iswindows(SB), NOPTR, $4
...@@ -51,13 +51,6 @@ func args(c int32, v **byte) { ...@@ -51,13 +51,6 @@ func args(c int32, v **byte) {
sysargs(c, v) sysargs(c, v)
} }
var (
// TODO: Retire in favor of GOOS== checks.
isplan9 int32
issolaris int32
iswindows int32
)
func goargs() { func goargs() {
if GOOS == "windows" { if GOOS == "windows" {
return return
......
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