mirror of
https://github.com/golang/go
synced 2024-11-17 19:04:47 -07:00
runtime: use the CBZ instruction in the assembler
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>
This commit is contained in:
parent
e6d0bd2b89
commit
a61a3c378d
@ -45,8 +45,7 @@ TEXT _rt0_arm64_freebsd_lib(SB),NOSPLIT,$184
|
|||||||
|
|
||||||
// Create a new thread to do the runtime initialization and return.
|
// Create a new thread to do the runtime initialization and return.
|
||||||
MOVD _cgo_sys_thread_create(SB), R4
|
MOVD _cgo_sys_thread_create(SB), R4
|
||||||
CMP $0, R4
|
CBZ R4, nocgo
|
||||||
BEQ nocgo
|
|
||||||
MOVD $_rt0_arm64_freebsd_lib_go(SB), R0
|
MOVD $_rt0_arm64_freebsd_lib_go(SB), R0
|
||||||
MOVD $0, R1
|
MOVD $0, R1
|
||||||
SUB $16, RSP // reserve 16 bytes for sp-8 where fp may be saved.
|
SUB $16, RSP // reserve 16 bytes for sp-8 where fp may be saved.
|
||||||
|
@ -44,8 +44,7 @@ TEXT _rt0_arm64_netbsd_lib(SB),NOSPLIT,$184
|
|||||||
|
|
||||||
// Create a new thread to do the runtime initialization and return.
|
// Create a new thread to do the runtime initialization and return.
|
||||||
MOVD _cgo_sys_thread_create(SB), R4
|
MOVD _cgo_sys_thread_create(SB), R4
|
||||||
CMP $0, R4
|
CBZ R4, nocgo
|
||||||
BEQ nocgo
|
|
||||||
MOVD $_rt0_arm64_netbsd_lib_go(SB), R0
|
MOVD $_rt0_arm64_netbsd_lib_go(SB), R0
|
||||||
MOVD $0, R1
|
MOVD $0, R1
|
||||||
SUB $16, RSP // reserve 16 bytes for sp-8 where fp may be saved.
|
SUB $16, RSP // reserve 16 bytes for sp-8 where fp may be saved.
|
||||||
|
@ -50,8 +50,7 @@ TEXT _rt0_arm64_openbsd_lib(SB),NOSPLIT,$184
|
|||||||
|
|
||||||
// Create a new thread to do the runtime initialization and return.
|
// Create a new thread to do the runtime initialization and return.
|
||||||
MOVD _cgo_sys_thread_create(SB), R4
|
MOVD _cgo_sys_thread_create(SB), R4
|
||||||
CMP $0, R4
|
CBZ R4, nocgo
|
||||||
BEQ nocgo
|
|
||||||
MOVD $_rt0_arm64_openbsd_lib_go(SB), R0
|
MOVD $_rt0_arm64_openbsd_lib_go(SB), R0
|
||||||
MOVD $0, R1
|
MOVD $0, R1
|
||||||
SUB $16, RSP // reserve 16 bytes for sp-8 where fp may be saved.
|
SUB $16, RSP // reserve 16 bytes for sp-8 where fp may be saved.
|
||||||
|
Loading…
Reference in New Issue
Block a user