aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_linux_arm.s
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2015-07-30 10:54:53 -0400
committerRuss Cox <rsc@golang.org>2015-07-30 15:48:29 +0000
commitc9d2c7f0d26a9619069a3cb2291333174b6db63f (patch)
treeb7f8960efe1ef2cccb7c5e495f5558ffc5be24cb /src/runtime/sys_linux_arm.s
parenta1e422071cd8122b4b93bbdeb02d0ea646519955 (diff)
downloadgo-c9d2c7f0d26a9619069a3cb2291333174b6db63f.tar.gz
go-c9d2c7f0d26a9619069a3cb2291333174b6db63f.zip
runtime: replace divide with multiply in runtime.usleep on arm
We want to adjust the DIV calling convention to use m, and usleep can be called without an m, so switch to a multiplication by the reciprocal (and test). Step toward a fix for #6699 and #10486. Change-Id: Iccf76a18432d835e48ec64a2fa34a0e4d6d4b955 Reviewed-on: https://go-review.googlesource.com/12898 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/sys_linux_arm.s')
-rw-r--r--src/runtime/sys_linux_arm.s5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/runtime/sys_linux_arm.s b/src/runtime/sys_linux_arm.s
index abdeb93e59..29eb8eb077 100644
--- a/src/runtime/sys_linux_arm.s
+++ b/src/runtime/sys_linux_arm.s
@@ -378,10 +378,7 @@ TEXT runtime·rt_sigaction(SB),NOSPLIT,$0
TEXT runtime·usleep(SB),NOSPLIT,$12
MOVW usec+0(FP), R0
- MOVW R0, R1
- MOVW $1000000, R2
- DIV R2, R0
- MOD R2, R1
+ CALL runtime·usplitR0(SB)
MOVW R0, 4(R13)
MOVW R1, 8(R13)
MOVW $0, R0