]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove cross-function jump in vlop_arm.s
authorRuss Cox <rsc@golang.org>
Mon, 9 Dec 2013 03:52:08 +0000 (22:52 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 9 Dec 2013 03:52:08 +0000 (22:52 -0500)
The new linker will disallow this on arm
(it is already disallowed on amd64 and 386)
in order to be able to lay out each function
separately.

The restriction is only for jumps into the middle
of a function; jumps to the beginning of a function
remain fine.

Prereq for linker cleanup (golang.org/s/go13linker).

R=iant, r, minux.ma
CC=golang-dev
https://golang.org/cl/35800043

src/pkg/runtime/vlop_arm.s

index d7c566afb87acbdc2b45221bf9cc0e99d7e77b20..941de3e8dbc75d3a81b1569560e8adcbdad3dbec 100644 (file)
@@ -255,7 +255,7 @@ TEXT _div(SB),NOSPLIT,$16
 d0:
        BL      udiv<>(SB)              /* none/both neg */
        MOVW    R(q), R(TMP)
-       B               out
+       B               out1
 d1:
        CMP     $0, R(q)
        BGE     d0
@@ -263,7 +263,12 @@ d1:
 d2:
        BL      udiv<>(SB)              /* one neg */
        RSB             $0, R(q), R(TMP)
-       B       out
+out1:
+       MOVW    4(R13), R(q)
+       MOVW    8(R13), R(r)
+       MOVW    12(R13), R(s)
+       MOVW    16(R13), R(M)
+       RET
 
 TEXT _mod(SB),NOSPLIT,$16
        MOVW    R(q), 4(R13)