// if there is a _cgo_init, call it using the gcc ABI.
MOVD _cgo_init(SB), R12
- CMP $0, R12
- BEQ nocgo
+ CBZ R12, nocgo
MRS_TPIDR_R0 // load TLS base pointer
MOVD R0, R3 // arg 3: TLS base pointer
MOVD ZR, gobuf_ret(R3)
// Assert ctxt is zero. See func save.
MOVD gobuf_ctxt(R3), R0
- CMP $0, R0
- BEQ 2(PC)
+ CBZ R0, 2(PC)
CALL runtime·badctxt(SB)
RET
// func memhash32(p unsafe.Pointer, h uintptr) uintptr
TEXT runtime·memhash32(SB),NOSPLIT|NOFRAME,$0-24
MOVB runtime·useAeshash(SB), R0
- CMP $0, R0
- BEQ noaes
+ CBZ R0, noaes
MOVD p+0(FP), R0
MOVD h+8(FP), R1
MOVD $ret+16(FP), R2
// func memhash64(p unsafe.Pointer, h uintptr) uintptr
TEXT runtime·memhash64(SB),NOSPLIT|NOFRAME,$0-24
MOVB runtime·useAeshash(SB), R0
- CMP $0, R0
- BEQ noaes
+ CBZ R0, noaes
MOVD p+0(FP), R0
MOVD h+8(FP), R1
MOVD $ret+16(FP), R2
// func memhash(p unsafe.Pointer, h, size uintptr) uintptr
TEXT runtime·memhash(SB),NOSPLIT|NOFRAME,$0-32
MOVB runtime·useAeshash(SB), R0
- CMP $0, R0
- BEQ noaes
+ CBZ R0, noaes
MOVD p+0(FP), R0
MOVD s+16(FP), R1
MOVD h+8(FP), R3
// func strhash(p unsafe.Pointer, h uintptr) uintptr
TEXT runtime·strhash(SB),NOSPLIT|NOFRAME,$0-24
MOVB runtime·useAeshash(SB), R0
- CMP $0, R0
- BEQ noaes
+ CBZ R0, noaes
MOVD p+0(FP), R10 // string pointer
LDP (R10), (R0, R1) //string data/ length
MOVD h+8(FP), R3
B aes129plus
aes0to15:
- CMP $0, R1
- BEQ aes0
+ CBZ R1, aes0
VEOR V2.B16, V2.B16, V2.B16
TBZ $3, R1, less_than_8
VLD1.P 8(R0), V2.D[0]
MOVD $0, (g_sched+gobuf_ret)(g)
// Assert ctxt is zero. See func save.
MOVD (g_sched+gobuf_ctxt)(g), R0
- CMP $0, R0
- BEQ 2(PC)
+ CBZ R0, 2(PC)
CALL runtime·badctxt(SB)
RET
MOVD arg+8(FP), R0
MOVD RSP, R2 // save original stack pointer
- CMP $0, g
- BEQ nosave
+ CBZ g, nosave
MOVD g, R4
// Figure out if we need to switch to m->g0 stack.
// Load g from thread-local storage.
MOVB runtime·iscgo(SB), R3
- CMP $0, R3
- BEQ nocgo
+ CBZ R3, nocgo
BL runtime·load_g(SB)
nocgo:
// In this case, we're running on the thread stack, so there's
// lots of space, but the linker doesn't know. Hide the call from
// the linker analysis by using an indirect call.
- CMP $0, g
- BEQ needm
+ CBZ g, needm
MOVD g_m(g), R8
MOVD R8, savedm-8(SP)
// If the m on entry was nil, we called needm above to borrow an m
// for the duration of the call. Since the call is over, return it with dropm.
MOVD savedm-8(SP), R6
- CMP $0, R6
- BNE droppedm
+ CBNZ R6, droppedm
MOVD $runtime·dropm(SB), R0
BL (R0)
droppedm: