diff options
| author | Paul E. Murphy <murp@ibm.com> | 2024-05-14 10:05:00 -0500 |
|---|---|---|
| committer | Paul Murphy <murp@ibm.com> | 2024-05-22 18:17:17 +0000 |
| commit | cc673d2ec5df9e0894ea2cc3e16a9c309c219bd8 (patch) | |
| tree | 15a41e809178a1db303ea4e656e0e313349570ea /src/runtime/asm_ppc64x.s | |
| parent | 41884dcd05546ced3634496d931d0b005fc8c2e6 (diff) | |
| download | go-cc673d2ec5df9e0894ea2cc3e16a9c309c219bd8.tar.xz | |
all: convert PPC64 CMPx ...,R0,... to CMPx Rx,$0
Cleanup all remaining trivial compares against $0 in ppc64x assembly.
In math, SRD ...,Rx; CMP Rx, $0 is further simplified to SRDCC.
Change-Id: Ia2bc204953e32f08ee142bfd06a91965f30f99b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/587016
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime/asm_ppc64x.s')
| -rw-r--r-- | src/runtime/asm_ppc64x.s | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/asm_ppc64x.s b/src/runtime/asm_ppc64x.s index 98002bccf6..2b8c4d42a3 100644 --- a/src/runtime/asm_ppc64x.s +++ b/src/runtime/asm_ppc64x.s @@ -40,7 +40,7 @@ TEXT runtime·rt0_go(SB),NOSPLIT|TOPFRAME,$0 // If there is a _cgo_init, call it using the gcc ABI. MOVD _cgo_init(SB), R12 - CMP R0, R12 + CMP R12, $0 BEQ nocgo #ifdef GO_PPC64X_HAS_FUNCDESC @@ -466,7 +466,7 @@ callfn: \ #ifdef GOOS_aix \ /* AIX won't trigger a SIGSEGV if R11 = nil */ \ /* So it manually triggers it */ \ - CMP R0, R11 \ + CMP R11, $0 \ BNE 2(PC) \ MOVD R0, 0(R0) \ #endif \ @@ -564,7 +564,7 @@ TEXT gosave_systemstack_switch<>(SB),NOSPLIT|NOFRAME,$0 MOVD R0, (g_sched+gobuf_ret)(g) // Assert ctxt is zero. See func save. MOVD (g_sched+gobuf_ctxt)(g), R31 - CMP R0, R31 + CMP R31, $0 BEQ 2(PC) BL runtime·abort(SB) RET @@ -1235,7 +1235,7 @@ TEXT runtime·debugCallV2<ABIInternal>(SB), NOSPLIT|NOFRAME, $0-0 CALL runtime·debugCallCheck(SB) MOVD 40(R1), R22 XOR R0, R0 - CMP R22, R0 + CMP R22, $0 BEQ good MOVD 48(R1), R22 MOVD $8, R20 |
