]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix int64 reconstruction in semasleep
authorRuss Cox <rsc@golang.org>
Thu, 4 Sep 2014 05:38:49 +0000 (01:38 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 4 Sep 2014 05:38:49 +0000 (01:38 -0400)
I had this right in one of my clients, but apparently not the one I submitted from.

Fixes 386 builds.

TBR=dfc
CC=golang-codereviews
https://golang.org/cl/138000045

src/pkg/runtime/os_darwin.c

index 19181d60dff1e30a453d310921d6d2008287b16a..d3890eee52bc6361a67e50ea305335c486a2d0d8 100644 (file)
@@ -418,7 +418,7 @@ semasleep(void)
        int32 r, secs, nsecs;
        int64 ns;
        
-       ns = g->m->scalararg[0] | g->m->scalararg[1]<<32;
+       ns = (int64)(uint32)g->m->scalararg[0] | (int64)(uint32)g->m->scalararg[1]<<32;
        g->m->scalararg[0] = 0;
        g->m->scalararg[1] = 0;