From: Keith Randall Date: Fri, 22 Nov 2024 23:24:54 +0000 (-0800) Subject: cmd/internal/sys: allow unaligned loads on big-endian ppc64 X-Git-Tag: go1.25rc1~1178 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3981b446ddba60108572606a74bc27bff1936d9e;p=gostls13.git cmd/internal/sys: allow unaligned loads on big-endian ppc64 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 Reviewed-by: Keith Randall Reviewed-by: Jayanth Krishnamurthy Reviewed-by: Keith Randall Reviewed-by: Cherry Mui --- diff --git a/src/cmd/internal/sys/arch.go b/src/cmd/internal/sys/arch.go index 2e35284137..ee7089b544 100644 --- a/src/cmd/internal/sys/arch.go +++ b/src/cmd/internal/sys/arch.go @@ -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.