Use CBZ to replace the comparison and branch of arm64 and the zero instruction in the assembly file.
Change-Id: Id6c03e9af13aadafc3ad3953f82d2ffa29c12926
Reviewed-on: https://go-review.googlesource.com/c/go/+/237497
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
// 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_freebsd_lib_go(SB), R0
MOVD $0, R1
SUB $16, RSP // reserve 16 bytes for sp-8 where fp may be saved.
// 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_netbsd_lib_go(SB), R0
MOVD $0, R1
SUB $16, RSP // reserve 16 bytes for sp-8 where fp may be saved.
// 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_openbsd_lib_go(SB), R0
MOVD $0, R1
SUB $16, RSP // reserve 16 bytes for sp-8 where fp may be saved.