]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix arm build
authorDmitriy Vyukov <dvyukov@google.com>
Mon, 29 Jul 2013 20:08:30 +0000 (00:08 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Mon, 29 Jul 2013 20:08:30 +0000 (00:08 +0400)
The current failure is:
fatal error: runtime: stack split during syscall
goroutine 2 [stack split]:
_si2v(0xb6ebaebc, 0x3b9aca00)
        /usr/local/go/src/pkg/runtime/vlrt_arm.c:628 fp=0xb6ebae9c
runtime.timediv(0xf8475800, 0xd, 0x3b9aca00, 0xb6ebaef4)
        /usr/local/go/src/pkg/runtime/runtime.c:424 +0x1c fp=0xb6ebaed4

Just adding textflag 7 causes the following error:
notetsleep: nosplit stack overflow
        128 assumed on entry to notetsleep
        96 after notetsleep uses 32
        60 after runtime.futexsleep uses 36
        4 after runtime.timediv uses 56
        -4 after _si2v uses 8

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/12001045

src/pkg/runtime/vlrt_arm.c

index 614f35ad2663bb219358597176fe55b1252fd3dd..cc3b90963fc8e3840c2e70977e6faca0459bd495 100644 (file)
@@ -624,14 +624,12 @@ _ul2v(Vlong *ret, ulong ul)
        ret->hi = 0;
 }
 
+#pragma textflag 7
 void
 _si2v(Vlong *ret, int si)
 {
-       long t;
-
-       t = si;
-       ret->lo = t;
-       ret->hi = t >> 31;
+       ret->lo = (long)si;
+       ret->hi = (long)si >> 31;
 }
 
 void