]> Cypherpunks repositories - gostls13.git/commit
runtime: don't use R11 in nanotime1/walltime1 on ARM
authorCherry Zhang <cherryyz@google.com>
Mon, 30 Dec 2019 16:26:17 +0000 (11:26 -0500)
committerCherry Zhang <cherryyz@google.com>
Sat, 4 Jan 2020 01:24:42 +0000 (01:24 +0000)
commit2ee2c6232c3cb7e2927b964701a81c1591c410db
treeb577ef3de93df53b73f36e3e0ed766ca9590a6c5
parent9df93e4d6d31674ee9ca7725bcf9dea2423d4aea
runtime: don't use R11 in nanotime1/walltime1 on ARM

R11 a.k.a. REGTMP is the temp register used by the assembler. It
may be clobbered if the assembler needs to synthesize
instructions. In particular, in nanotime1/walltime1, the load of
global variable runtime.iscgo clobbers it. So, avoid using R11
to hold a long-lived value.

Fixes #36309.

Change-Id: Iec2ab9d664532cad8fbf58da17f580e64a744f62
Reviewed-on: https://go-review.googlesource.com/c/go/+/212641
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Andrew G. Morgan <agm@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/runtime/sys_linux_arm.s