]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix arm5 softfloat build
authorDave Cheney <dave@cheney.net>
Thu, 28 Aug 2014 02:41:32 +0000 (12:41 +1000)
committerDave Cheney <dave@cheney.net>
Thu, 28 Aug 2014 02:41:32 +0000 (12:41 +1000)
runtime._sfloat2 now returns the lr value on the stack, not R0.

Credit to Russ Cox for the fix.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/133120045

src/pkg/runtime/vlop_arm.s

index 3b5243c3d2e1a90dd439976fe89d0085e38b7a41..9dfb295e8720154006e9d89745cb82dc6084138b 100644 (file)
@@ -47,12 +47,12 @@ TEXT _mulv(SB), NOSPLIT, $0
 // trampoline for _sfloat2. passes LR as arg0 and
 // saves registers R0-R13 and CPSR on the stack. R0-R12 and CPSR flags can
 // be changed by _sfloat2.
-TEXT _sfloat(SB), NOSPLIT, $64-0 // 4 arg + 14*4 saved regs + cpsr
+TEXT _sfloat(SB), NOSPLIT, $68-0 // 4 arg + 14*4 saved regs + cpsr + return value
        MOVW    R14, 4(R13)
        MOVW    R0, 8(R13)
        MOVW    $12(R13), R0
        MOVM.IA.W       [R1-R12], (R0)
-       MOVW    $68(R13), R1 // correct for frame size
+       MOVW    $72(R13), R1 // correct for frame size
        MOVW    R1, 60(R13)
        WORD    $0xe10f1000 // mrs r1, cpsr
        MOVW    R1, 64(R13)
@@ -78,6 +78,7 @@ TEXT _sfloat(SB), NOSPLIT, $64-0 // 4 arg + 14*4 saved regs + cpsr
        MOVW    $1, R1
        MOVW    R1, m_softfloat(R8)
        BL      runtimeĀ·_sfloat2(SB)
+       MOVW    68(R13), R0
        MOVW    g_m(g), R8
        MOVW    m_locks(R8), R1
        SUB     $1, R1