aboutsummaryrefslogtreecommitdiff
path: root/src/internal/bytealg
diff options
context:
space:
mode:
authorJayanth Krishnamurthy <jayanth.krishnamurthy@ibm.com>2024-09-11 09:44:16 -0500
committerPaul Murphy <murp@ibm.com>2024-10-29 13:14:38 +0000
commitfdfb3067a8a27a7491c3b0f6eddedbd467495329 (patch)
treed17dd79cb49f28e0300ef5fc5480fea66c178cb8 /src/internal/bytealg
parentb03b1acfb0bb6c605a70987dfaf5bb922c792e82 (diff)
downloadgo-fdfb3067a8a27a7491c3b0f6eddedbd467495329.tar.xz
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 <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Paul Murphy <murp@ibm.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/internal/bytealg')
-rw-r--r--src/internal/bytealg/compare_ppc64x.s10
1 files changed, 5 insertions, 5 deletions
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<ABIInternal>(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<ABIInternal>(SB),NOSPLIT|NOFRAME,$0-40
@@ -83,7 +83,7 @@ TEXT runtime·cmpstring<ABIInternal>(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