]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.power64] runtime: fix usleep not to smash saved LR
authorRuss Cox <rsc@golang.org>
Fri, 15 Aug 2014 19:28:08 +0000 (15:28 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 15 Aug 2014 19:28:08 +0000 (15:28 -0400)
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/130760043

src/pkg/runtime/sys_linux_power64x.s

index 1d985d1af1d3856b53e09029673223e6b36f2e3b..fbd59a052f129930b5999b46fe00e4aa93020012 100644 (file)
@@ -91,17 +91,17 @@ TEXT runtimeĀ·usleep(SB),NOSPLIT,$-8-16
        MOVD    R3, R5
        MOVW    $1000000, R4
        DIVD    R4, R3
-       MOVD    R3, 0(R1)
+       MOVD    R3, 8(R1)
        MULLD   R3, R4
        SUB     R4, R5
-       MOVD    R5, 8(R1)
+       MOVD    R5, 16(R1)
 
        // select(0, 0, 0, 0, &tv)
        MOVW    $0, R3
        MOVW    $0, R4
        MOVW    $0, R5
        MOVW    $0, R6
-       MOVD    R1, R7
+       ADD     $8, R1, R7
        SYSCALL $SYS_newselect
        RETURN