]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: Plan 9, skip calling runtime·ldt0setup.
authorYuval Pavel Zholkover <paulzhol@gmail.com>
Mon, 25 Jul 2011 16:25:41 +0000 (12:25 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 25 Jul 2011 16:25:41 +0000 (12:25 -0400)
R=golang-dev
CC=alex.brainman, golang-dev
https://golang.org/cl/4816049

src/pkg/runtime/386/asm.s

index add14be964f82c14dee3e7600d8f11a91d034a58..24e64a11e5a6479a30f8222f9fb6042a36fe30da 100644 (file)
@@ -28,15 +28,18 @@ TEXT _rt0_386(SB),7,$0
        TESTL   AX, AX
        JZ      4(PC)
        CALL    AX
+       // skip runtime·ldt0setup(SB) and tls test after initcgo for non-windows
        CMPL runtime·iswindows(SB), $0
        JEQ ok
 
+       // skip runtime·ldt0setup(SB) and tls test on Plan 9 in all cases
+       CMPL    runtime·isplan9(SB), $1
+       JEQ     ok
+
        // set up %gs
        CALL    runtime·ldt0setup(SB)
 
        // store through it, to make sure it works
-       CMPL    runtime·isplan9(SB), $1
-       JEQ     ok
        get_tls(BX)
        MOVL    $0x123, g(BX)
        MOVL    runtime·tls0(SB), AX