From 288615ddb57a79fa78c6f13b829bd8daeeff8fa1 Mon Sep 17 00:00:00 2001 From: "Paul E. Murphy" Date: Mon, 27 Nov 2023 17:05:56 -0600 Subject: cmd/internal/obj/ppc64: generate smaller machine code for OR/XOR of uint32 values These binary operations can be done in two sequential instructions instead of loading a constant into REGTMP and doing the binary op. Change-Id: Ie0ab863f9e81afad140b92b265bca4d3f0fe90b1 Reviewed-on: https://go-review.googlesource.com/c/go/+/565215 Reviewed-by: Lynn Boger Reviewed-by: Carlos Amedee Reviewed-by: Michael Pratt TryBot-Result: Gopher Robot LUCI-TryBot-Result: Go LUCI Run-TryBot: Paul Murphy --- src/cmd/asm/internal/asm/testdata/ppc64.s | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/cmd/asm') diff --git a/src/cmd/asm/internal/asm/testdata/ppc64.s b/src/cmd/asm/internal/asm/testdata/ppc64.s index 01052b49e7..da0b25c1ac 100644 --- a/src/cmd/asm/internal/asm/testdata/ppc64.s +++ b/src/cmd/asm/internal/asm/testdata/ppc64.s @@ -230,10 +230,10 @@ TEXT asmtest(SB),DUPOK|NOSPLIT,$0 OR $-32767, R5, R6 // 3be080017fe62b78 OR $-32768, R6 // 3be080007fe63378 OR $-32768, R6, R7 // 3be080007fe73378 - OR $1234567, R5 // 641f001263ffd6877fe52b78 - OR $1234567, R5, R3 // 641f001263ffd6877fe32b78 + OR $1234567, R5 // 64a5001260a5d687 + OR $1234567, R5, R3 // 64a300126063d687 OR $2147483648, R5, R3 // 64a38000 - OR $2147483649, R5, R3 // 641f800063ff00017fe32b78 + OR $2147483649, R5, R3 // 64a3800060630001 ORIS $255, R3, R4 // 646400ff OR $16711680, R3, R4 // 646400ff @@ -249,8 +249,8 @@ TEXT asmtest(SB),DUPOK|NOSPLIT,$0 XOR $-32767, R5, R6 // 3be080017fe62a78 XOR $-32768, R6 // 3be080007fe63278 XOR $-32768, R6, R7 // 3be080007fe73278 - XOR $1234567, R5 // 641f001263ffd6877fe52a78 - XOR $1234567, R5, R3 // 641f001263ffd6877fe32a78 + XOR $1234567, R5 // 6ca5001268a5d687 + XOR $1234567, R5, R3 // 6ca300126863d687 XORIS $15, R3, R4 // 6c64000f XOR $983040, R3, R4 // 6c64000f -- cgit v1.3-5-g9baa