]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: replace is{plan9,solaris,windows} with GOOS tests
authorMatthew Dempsky <mdempsky@google.com>
Tue, 9 Jun 2015 22:24:38 +0000 (15:24 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Fri, 23 Oct 2015 18:11:17 +0000 (18:11 +0000)
Change-Id: I27589395f547c5837dc7536a0ab5bc7cc23a4ff6
Reviewed-on: https://go-review.googlesource.com/10872
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/runtime/asm_386.s
src/runtime/asm_amd64.s
src/runtime/rt0_plan9_386.s
src/runtime/rt0_plan9_amd64.s
src/runtime/rt0_solaris_amd64.s
src/runtime/rt0_windows_386.s
src/runtime/rt0_windows_amd64.s
src/runtime/runtime1.go

index fa7485367f80120010286da134a959ea82765bd1..d423df7924ba858ed4d42d97835dec84aece201b 100644 (file)
@@ -67,13 +67,15 @@ nocpuinfo:
        MOVL    AX, g_stackguard0(CX)
        MOVL    AX, g_stackguard1(CX)
 
+#ifndef GOOS_windows
        // skip runtime·ldt0setup(SB) and tls test after _cgo_init for non-windows
-       CMPL runtime·iswindows(SB), $0
-       JEQ ok
+       JMP ok
+#endif
 needtls:
+#ifdef GOOS_plan9
        // skip runtime·ldt0setup(SB) and tls test on Plan 9 in all cases
-       CMPL    runtime·isplan9(SB), $1
-       JEQ     ok
+       JMP     ok
+#endif
 
        // set up %gs
        CALL    runtime·ldt0setup(SB)
index 39602ec7dc581d8e84ab5d7e60ce917be58a642f..454789c5098da9f7f7e1d72e2897458b205506b6 100644 (file)
@@ -65,15 +65,18 @@ nocpuinfo:
        MOVQ    AX, g_stackguard0(CX)
        MOVQ    AX, g_stackguard1(CX)
 
-       CMPL    runtime·iswindows(SB), $0
-       JEQ ok
+#ifndef GOOS_windows
+       JMP ok
+#endif
 needtls:
+#ifdef GOOS_plan9
        // skip TLS setup on Plan 9
-       CMPL    runtime·isplan9(SB), $1
-       JEQ ok
+       JMP ok
+#endif
+#ifdef GOOS_solaris
        // skip TLS setup on Solaris
-       CMPL    runtime·issolaris(SB), $1
-       JEQ ok
+       JMP ok
+#endif
 
        LEAQ    runtime·tls0(SB), DI
        CALL    runtime·settls(SB)
index c451299eec5c10f8f5786a877e60c003b01e9635..cbbf245632cc9e32f1be7bb8513d5775dab78171 100644 (file)
@@ -16,8 +16,6 @@ TEXT _rt0_386_plan9(SB),NOSPLIT,$12
        MOVL    AX, 4(SP)
        CALL    runtime·rt0_go(SB)
 
-DATA  runtime·isplan9(SB)/4, $1
-GLOBL runtime·isplan9(SB), NOPTR, $4
 GLOBL _tos(SB), NOPTR, $4
 GLOBL _privates(SB), NOPTR, $4
 GLOBL _nprivates(SB), NOPTR, $4
index ec2d9ec827898a403d49597b6549bbd8c0ac7ab4..6fd493a50854102a2e9fabdb36f645aa70f52297 100644 (file)
@@ -14,8 +14,6 @@ TEXT _rt0_amd64_plan9(SB),NOSPLIT,$24
        MOVQ    $runtime·rt0_go(SB), AX
        JMP     AX
 
-DATA runtime·isplan9(SB)/4, $1
-GLOBL runtime·isplan9(SB), NOPTR, $4
 GLOBL _tos(SB), NOPTR, $8
 GLOBL _privates(SB), NOPTR, $8
 GLOBL _nprivates(SB), NOPTR, $4
index 5997cbf8e3d05ef94dc8249cc99de38321068eae..e2d1e71bb49cbf1d720d2586e3a7b43bfdc132cb 100644 (file)
@@ -13,6 +13,3 @@ TEXT _rt0_amd64_solaris(SB),NOSPLIT,$-8
 TEXT main(SB),NOSPLIT,$-8
        MOVQ    $runtime·rt0_go(SB), AX
        JMP     AX
-
-DATA runtime·issolaris(SB)/4, $1
-GLOBL runtime·issolaris(SB), NOPTR, $4
index 03f95d12ec3d354bb81145663178344e04083c12..0150cc2918eeb6c01adc13f5b8137c5041231ac3 100644 (file)
@@ -14,7 +14,3 @@ TEXT _rt0_386_windows(SB),NOSPLIT,$12
 
 TEXT _main(SB),NOSPLIT,$0
        JMP     runtime·rt0_go(SB)
-
-
-DATA  runtime·iswindows(SB)/4, $1
-GLOBL runtime·iswindows(SB), NOPTR, $4
index df956ba36ee47292b2e06ffe1515f72e16577845..95dce06d712ecbab01f4a0946b175cf994646e41 100644 (file)
@@ -15,6 +15,3 @@ TEXT _rt0_amd64_windows(SB),NOSPLIT,$-8
 TEXT main(SB),NOSPLIT,$-8
        MOVQ    $runtime·rt0_go(SB), AX
        JMP     AX
-
-DATA  runtime·iswindows(SB)/4, $1
-GLOBL runtime·iswindows(SB), NOPTR, $4
index 134c999088a221f66298cc62dc8ba48c0fe721ed..e476bca8e5f2d31af16315ef132f2d3a32a2155d 100644 (file)
@@ -51,13 +51,6 @@ func args(c int32, v **byte) {
        sysargs(c, v)
 }
 
-var (
-       // TODO: Retire in favor of GOOS== checks.
-       isplan9   int32
-       issolaris int32
-       iswindows int32
-)
-
 func goargs() {
        if GOOS == "windows" {
                return