]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/sys: allow unaligned loads on big-endian ppc64
authorKeith Randall <khr@golang.org>
Fri, 22 Nov 2024 23:24:54 +0000 (15:24 -0800)
committerKeith Randall <khr@golang.org>
Tue, 4 Feb 2025 17:39:01 +0000 (09:39 -0800)
According to https://go.dev/wiki/MinimumRequirements, we've required
power8 since Go 1.9.

Before that, we supported power5 which couldn't do unaligned loads.
But power8 should be able to (it does for ppc64le).

In fact, I think we already support unaligned loads in some cases,
for instance cmd/compile/internal/ssa/config.go lists big-endian ppc64
as having unaligned loads.

Change-Id: I4a75f09d4b5199a889e0e8db0b3b7a1fa23145f3
Reviewed-on: https://go-review.googlesource.com/c/go/+/631318
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Jayanth Krishnamurthy <jayanth.krishnamurthy@ibm.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/internal/sys/arch.go

index 2e35284137833a8cd980c45f5ffb7bc0f2b03273..ee7089b544f57ad81d3d71630bdf3b8b2e7e3f5a 100644 (file)
@@ -208,7 +208,7 @@ var ArchPPC64 = &Arch{
        RegSize:       8,
        MinLC:         4,
        Alignment:     1,
-       CanMergeLoads: false,
+       CanMergeLoads: true,
        HasLR:         true,
        // PIC code on ppc64le requires 32 bytes of stack, and it's
        // easier to just use that much stack always.