aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types/type.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2022-06-20 17:06:09 -0700
committerHeschi Kreinick <heschi@google.com>2022-07-06 19:33:10 +0000
commit9ef614f5aa03ed30664c982c706c98c8b78c99bf (patch)
tree47852c0ef74e35124a8d4169b6948cc42a1aa17e /src/cmd/compile/internal/types/type.go
parentb1be664d64750bccd5081d51b585036c931b5cf0 (diff)
downloadgo-9ef614f5aa03ed30664c982c706c98c8b78c99bf.tar.gz
go-9ef614f5aa03ed30664c982c706c98c8b78c99bf.zip
[release-branch.go1.17] cmd/compile: allow 128-bit values to be spilled
We sometimes use 16-byte load+store to move values around in memory. In rare circumstances, the loaded value must be spilled because the store can't happen yet. In that case, we need to be able to spill the 16-byte value. Fixes #53470 Change-Id: I09fd08e11a63c6ba3ef781d3f5ede237e9b0132e Reviewed-on: https://go-review.googlesource.com/c/go/+/413294 Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> (cherry picked from commit c2d373d5d1802d7479f3c81dcf01d41bef3646dd) Reviewed-on: https://go-review.googlesource.com/c/go/+/413456 Reviewed-by: Carlos Amedee <carlos@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/types/type.go')
-rw-r--r--src/cmd/compile/internal/types/type.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/types/type.go b/src/cmd/compile/internal/types/type.go
index 1a9aa6916a2..15d40e753f2 100644
--- a/src/cmd/compile/internal/types/type.go
+++ b/src/cmd/compile/internal/types/type.go
@@ -1661,6 +1661,11 @@ var (
TypeResultMem = newResults([]*Type{TypeMem})
)
+func init() {
+ TypeInt128.Width = 16
+ TypeInt128.Align = 8
+}
+
// NewNamed returns a new named type for the given type name. obj should be an
// ir.Name. The new type is incomplete (marked as TFORW kind), and the underlying
// type should be set later via SetUnderlying(). References to the type are