diff options
| author | Paul E. Murphy <murp@ibm.com> | 2023-11-27 17:05:56 -0600 |
|---|---|---|
| committer | Paul Murphy <murp@ibm.com> | 2024-02-28 22:57:39 +0000 |
| commit | 288615ddb57a79fa78c6f13b829bd8daeeff8fa1 (patch) | |
| tree | 4fc0c594d544b4a944ac8efdbec47c8eb1b5c062 /src/cmd/asm | |
| parent | a05ea985c5fdb22ef606706f2b1a99eec5574c9c (diff) | |
| download | go-288615ddb57a79fa78c6f13b829bd8daeeff8fa1.tar.xz | |
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 <laboger@linux.vnet.ibm.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
Diffstat (limited to 'src/cmd/asm')
| -rw-r--r-- | src/cmd/asm/internal/asm/testdata/ppc64.s | 10 |
1 files changed, 5 insertions, 5 deletions
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 |
