From fdfb3067a8a27a7491c3b0f6eddedbd467495329 Mon Sep 17 00:00:00 2001 From: Jayanth Krishnamurthy Date: Wed, 11 Sep 2024 09:44:16 -0500 Subject: cmd/internal/obj/ppc64: support for extended mnemonics of BC BGT, BLT, BLE, BGE, BNE, BVS, BVC, and BEQ support by assembler. This will simplify the usage of BC constructs like BC 12, 30, LR <=> BEQ CR7, LR BC 12, 2, LR <=> BEQ CR0, LR BC 12, 0, target <=> BLT CR0, target BC 12, 2, target <=> BEQ CR0, target BC 12, 5, target <=> BGT CR1, target BC 12, 30, target <=> BEQ CR7, target BC 4, 6, target <=> BNE CR1, target BC 4, 5, target <=> BLE CR1, target code cleanup based on the above additions. Change-Id: I02fdb212b6fe3f85ce447e05f4d42118c9ce63b5 Cq-Include-Trybots: luci.golang.try:gotip-linux-ppc64_power10,gotip-linux-ppc64_power8,gotip-linux-ppc64le_power8,gotip-linux-ppc64le_power9,gotip-linux-ppc64le_power10 Reviewed-on: https://go-review.googlesource.com/c/go/+/612395 LUCI-TryBot-Result: Go LUCI Reviewed-by: Paul Murphy Reviewed-by: Carlos Amedee Reviewed-by: Dmitri Shuralyov Reviewed-by: Michael Pratt --- src/internal/bytealg/compare_ppc64x.s | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/internal/bytealg') diff --git a/src/internal/bytealg/compare_ppc64x.s b/src/internal/bytealg/compare_ppc64x.s index 2629251e43..a3d56cfd69 100644 --- a/src/internal/bytealg/compare_ppc64x.s +++ b/src/internal/bytealg/compare_ppc64x.s @@ -61,7 +61,7 @@ TEXT ·Compare(SB),NOSPLIT|NOFRAME,$0-56 CMP R3,R6,CR7 ISEL CR0LT,R4,R7,R9 SETB_CR0(R3) - BC $12,30,LR // beqlr cr7 + BEQ CR7,LR BR cmpbody<>(SB) TEXT runtime·cmpstring(SB),NOSPLIT|NOFRAME,$0-40 @@ -83,7 +83,7 @@ TEXT runtime·cmpstring(SB),NOSPLIT|NOFRAME,$0-40 MOVD R5,R6 MOVD R3,R5 SETB_CR0(R3) - BC $12,30,LR // beqlr cr7 + BEQ CR7,LR BR cmpbody<>(SB) #ifdef GOARCH_ppc64le @@ -143,7 +143,7 @@ cmp64_loop: ADD $64,R5,R5 // increment to next 64 bytes of A ADD $64,R6,R6 // increment to next 64 bytes of B BDNZ cmp64_loop - BC $12,2,LR // beqlr + BEQ CR0,LR // beqlr // Finish out tail with minimal overlapped checking. // Note, 0 tail is handled by beqlr above. @@ -215,7 +215,7 @@ cmp32: // 32 - 63B VCMPEQUDCC V3,V4,V1 BGE CR6,different - BC $12,2,LR // beqlr + BEQ CR0,LR ADD R9,R10,R10 LXVD2X (R9)(R5),V3 @@ -236,7 +236,7 @@ cmp16: // 16 - 31B LXVD2X (R0)(R6),V4 VCMPEQUDCC V3,V4,V1 BGE CR6,different - BC $12,2,LR // beqlr + BEQ CR0,LR LXVD2X (R9)(R5),V3 LXVD2X (R9)(R6),V4 -- cgit v1.3-5-g9baa