From 2aa2ceb8730f5e0fff792b43a091a6fa2cfa8e0f Mon Sep 17 00:00:00 2001 From: Yuval Pavel Zholkover Date: Mon, 25 Jul 2011 12:25:41 -0400 Subject: [PATCH] =?UTF-8?q?runtime:=20Plan=209,=20skip=20calling=20runtime?= =?UTF-8?q?=C2=B7ldt0setup.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit R=golang-dev CC=alex.brainman, golang-dev https://golang.org/cl/4816049 --- src/pkg/runtime/386/asm.s | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pkg/runtime/386/asm.s b/src/pkg/runtime/386/asm.s index add14be964f..24e64a11e5a 100644 --- a/src/pkg/runtime/386/asm.s +++ b/src/pkg/runtime/386/asm.s @@ -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