diff options
author | Xiangdong Ji <xiangdong.ji@arm.com> | 2019-11-21 07:46:37 +0000 |
---|---|---|
committer | Tobias Klauser <tobias.klauser@gmail.com> | 2020-03-03 09:29:47 +0000 |
commit | 52b457d6f320c3491ab14a71afc3c7416b36430c (patch) | |
tree | 0329451487e1e9383912627557b11a6cbee6f750 /src/runtime/rt0_linux_arm64.s | |
parent | 34830beffa6396129bd9d9da58afb7a046775d49 (diff) | |
download | go-52b457d6f320c3491ab14a71afc3c7416b36430c.tar.gz go-52b457d6f320c3491ab14a71afc3c7416b36430c.zip |
runtime: use CBZ/CBNZ in linux/arm64 assembly code
Replace compare and branch on zero/non-zero instructions in linux/arm64
assembly files with CBZ/CBNZ.
Change-Id: I4dbf56678f85827e83b5863804368bc28a4603b5
Reviewed-on: https://go-review.googlesource.com/c/go/+/209617
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Diffstat (limited to 'src/runtime/rt0_linux_arm64.s')
-rw-r--r-- | src/runtime/rt0_linux_arm64.s | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/runtime/rt0_linux_arm64.s b/src/runtime/rt0_linux_arm64.s index a6bc99df56..f48a8d6190 100644 --- a/src/runtime/rt0_linux_arm64.s +++ b/src/runtime/rt0_linux_arm64.s @@ -44,8 +44,7 @@ TEXT _rt0_arm64_linux_lib(SB),NOSPLIT,$184 // Create a new thread to do the runtime initialization and return. MOVD _cgo_sys_thread_create(SB), R4 - CMP $0, R4 - BEQ nocgo + CBZ R4, nocgo MOVD $_rt0_arm64_linux_lib_go(SB), R0 MOVD $0, R1 SUB $16, RSP // reserve 16 bytes for sp-8 where fp may be saved. |