]> Cypherpunks repositories - gostls13.git/commit
runtime: YIELD in procyield on ARM
authorAustin Clements <austin@google.com>
Fri, 9 Jun 2017 19:46:08 +0000 (15:46 -0400)
committerAustin Clements <austin@google.com>
Fri, 9 Jun 2017 20:33:29 +0000 (20:33 +0000)
commitbdc64183c83fbf5c595d1b18eb9addff1bf2be8d
treec8eed0a5f2ddc3d8df56de979d6754f3c93c336a
parentaf2ac479fc9e4833357a3281a67cd517d2da07ad
runtime: YIELD in procyield on ARM

ARM currently does not use a hardware yield instruction in the spin
loop in procyield because the YIELD instruction was only added in
ARMv6K. However, it appears earlier ARM chips will interpret the YIELD
encoding as an effective NOP (specifically an MSR instruction that
ultimately has no effect on the CPSR register).

Hence, use YIELD in procyield on ARM since it should be, at worst,
harmless.

Fixes #16663.

Change-Id: Id1787ac48862b785b92c28f1ac84cb4908d2173d
Reviewed-on: https://go-review.googlesource.com/45250
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/runtime/asm_arm.s