aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/test
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2021-02-09 18:09:47 -0500
committerDavid Chase <drchase@google.com>2021-02-27 22:39:54 +0000
commit5ff7ec98b7727b3641df25200345b1aa50b6ff35 (patch)
treef44ab4a7f0e117bbf01b0b310b9044d099e65a21 /src/cmd/compile/internal/test
parenta429926159232f2e127d46698633ffce5896ae30 (diff)
downloadgo-5ff7ec98b7727b3641df25200345b1aa50b6ff35.tar.xz
cmd/compile: check frame offsets against abi
this is in preparation for turning off calculation of frame offsets in types.CalcSize For #40724. Change-Id: I2c29fd289c014674076e5ec5170055dbca5ea64b Reviewed-on: https://go-review.googlesource.com/c/go/+/293392 Trust: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jeremy Faller <jeremy@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/test')
-rw-r--r--src/cmd/compile/internal/test/abiutilsaux_test.go32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/cmd/compile/internal/test/abiutilsaux_test.go b/src/cmd/compile/internal/test/abiutilsaux_test.go
index bac0c7639d..7eb273273d 100644
--- a/src/cmd/compile/internal/test/abiutilsaux_test.go
+++ b/src/cmd/compile/internal/test/abiutilsaux_test.go
@@ -129,36 +129,4 @@ func abitest(t *testing.T, ft *types.Type, exp expectedDump) {
strings.TrimSpace(exp.dump), regResString, reason)
}
- // Analyze again with empty register set.
- empty := abi.NewABIConfig(0, 0)
- emptyRes := empty.ABIAnalyze(ft)
- emptyResString := emptyRes.String()
-
- // Walk the results and make sure the offsets assigned match
- // up with those assiged by CalcSize. This checks to make sure that
- // when we have no available registers the ABI assignment degenerates
- // back to the original ABI0.
-
- // receiver
- failed := 0
- rfsl := ft.Recvs().Fields().Slice()
- poff := 0
- if len(rfsl) != 0 {
- failed |= verifyParamResultOffset(t, rfsl[0], emptyRes.InParams()[0], "receiver", 0)
- poff = 1
- }
- // params
- pfsl := ft.Params().Fields().Slice()
- for k, f := range pfsl {
- verifyParamResultOffset(t, f, emptyRes.InParams()[k+poff], "param", k)
- }
- // results
- ofsl := ft.Results().Fields().Slice()
- for k, f := range ofsl {
- failed |= verifyParamResultOffset(t, f, emptyRes.OutParams()[k], "result", k)
- }
-
- if failed != 0 {
- t.Logf("emptyres:\n%s\n", emptyResString)
- }
}