diff options
| author | Paul E. Murphy <murp@ibm.com> | 2023-09-12 16:06:45 -0500 |
|---|---|---|
| committer | Paul Murphy <murp@ibm.com> | 2023-10-03 20:22:46 +0000 |
| commit | e9379a8f8bd5f00463f67fe7e052cbcb262b169a (patch) | |
| tree | 8d2819c08611c6fe6de87a0ee073aeaa6ee63448 /src/cmd/asm/internal | |
| parent | 6bcf1768291efaa1e6f72ff6159dced8746dc44e (diff) | |
| download | go-e9379a8f8bd5f00463f67fe7e052cbcb262b169a.tar.xz | |
cmd/internal/asm/ppc64: support 34b ADD/MOVD $const, Rx
For constant signed values which require 34b to represent,
the assembler will generate a pli instruction on
linux/power10/PPC64 instead of loading a constant.
Similarly, ADD is extended to support 34b signed constants.
On linux/power10/PPC64, this generates a paddi instruction.
For assembler consistency, a second form is added if paddi
cannot be used. The second form is provided for assembly
writers.
Change-Id: I98144306af766b02fbbe36b72856a23cdf51d247
Reviewed-on: https://go-review.googlesource.com/c/go/+/528317
TryBot-Result: Gopher Robot <gobot@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Eli Bendersky <eliben@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Diffstat (limited to 'src/cmd/asm/internal')
| -rw-r--r-- | src/cmd/asm/internal/asm/testdata/ppc64.s | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/asm/internal/asm/testdata/ppc64.s b/src/cmd/asm/internal/asm/testdata/ppc64.s index 2bf04971ed..6de8b13709 100644 --- a/src/cmd/asm/internal/asm/testdata/ppc64.s +++ b/src/cmd/asm/internal/asm/testdata/ppc64.s @@ -33,6 +33,10 @@ TEXT asmtest(SB),DUPOK|NOSPLIT,$0 MOVD $2147483649, R5 // 6405800060a50001 or 0600800038a00001 // Hex constant 0xFFFFFFFF80000001 MOVD $-2147483647, R5 // 3ca0800060a50001 or 0603800038a00001 + // Hex constant 0xFFFFFFFE00000000 (load of constant on < power10, pli on >= power10 + MOVD $-8589934592, R5 // 3ca00000e8a50000 or 0602000038a00000 + // Hex constant 0xFFFFFFFE00000000 + ADD $-8589934592, R5 // 3fe0fffe63ff00007bff83e463ff00007cbf2a14 or 0602000038a50000 MOVD 8(R3), R4 // e8830008 MOVD (R3)(R4), R5 // 7ca4182a MOVD (R3)(R0), R5 // 7ca0182a |
