aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/regalloc.go
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2021-02-17 10:38:03 -0500
committerDavid Chase <drchase@google.com>2021-03-03 15:00:48 +0000
commit9f33dc3ca1b7b6bdb1a8e83c24d490f579bbbdc8 (patch)
tree2b3ff2bdfd9e48e78cdd1570c86c2957a093b5b1 /src/cmd/compile/internal/ssa/regalloc.go
parentc4e3f6c4c78f52060d409a549b83b72644069137 (diff)
downloadgo-9f33dc3ca1b7b6bdb1a8e83c24d490f579bbbdc8.tar.gz
go-9f33dc3ca1b7b6bdb1a8e83c24d490f579bbbdc8.zip
cmd/compile: handle aggregate OpArg in registers
Also handles case where OpArg does not escape but has its address taken. May have exposed a lurking bug in 1.16 expandCalls, if e.g., loading len(someArrayOfstructThing[0].secondStringField) from a local. Maybe. For #40724. Change-Id: I0298c4ad5d652b5e3d7ed6a62095d59e2d8819c7 Reviewed-on: https://go-review.googlesource.com/c/go/+/293396 Trust: David Chase <drchase@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/regalloc.go')
-rw-r--r--src/cmd/compile/internal/ssa/regalloc.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ssa/regalloc.go b/src/cmd/compile/internal/ssa/regalloc.go
index 74dd70c3d9..c11138bf4e 100644
--- a/src/cmd/compile/internal/ssa/regalloc.go
+++ b/src/cmd/compile/internal/ssa/regalloc.go
@@ -1517,6 +1517,9 @@ func (s *regAllocState) regalloc(f *Func) {
}
s.f.setHome(v, outLocs)
// Note that subsequent SelectX instructions will do the assignReg calls.
+ } else if v.Type.IsResults() {
+ // TODO register arguments need to make this work
+ panic("Oops, implement this.")
} else {
if r := outRegs[0]; r != noRegister {
s.assignReg(r, v, v)