From 3981b446ddba60108572606a74bc27bff1936d9e Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Fri, 22 Nov 2024 15:24:54 -0800 Subject: [PATCH] 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 --- src/cmd/internal/sys/arch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- 2.51.0