-
- Downloads
test: make codegen tests work with both ABIs
Some codegen tests were written with the assumption that arguments and results are in memory, and with a specific stack layout. With the register ABI, the assumption is no longer true. Adjust the tests to work with both cases. - For tests expecting in memory arguments/results, change to use global variables or memory-assigned argument/results. - Allow more registers. E.g. some tests expecting register names contain only letters (e.g. AX), but it can also contain numbers (e.g. R10). - Some instruction selection changes when operate on register vs. memory, e.g. ADDQ vs. LEAQ, MOVB vs. MOVL. Accept both. TODO: mathbits.go and memops.go still need fix. Change-Id: Ic5932b4b5dd3f5d30ed078d296476b641420c4c5 Reviewed-on: https://go-review.googlesource.com/c/go/+/309335 Trust: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by:David Chase <drchase@google.com>
Showing
- test/codegen/arithmetic.go 1 addition, 1 deletiontest/codegen/arithmetic.go
- test/codegen/bits.go 9 additions, 9 deletionstest/codegen/bits.go
- test/codegen/clobberdeadreg.go 2 additions, 2 deletionstest/codegen/clobberdeadreg.go
- test/codegen/comparisons.go 5 additions, 3 deletionstest/codegen/comparisons.go
- test/codegen/issue25378.go 4 additions, 4 deletionstest/codegen/issue25378.go
- test/codegen/maps.go 2 additions, 2 deletionstest/codegen/maps.go
- test/codegen/math.go 2 additions, 2 deletionstest/codegen/math.go
- test/codegen/memcombine.go 6 additions, 6 deletionstest/codegen/memcombine.go
- test/codegen/slices.go 1 addition, 1 deletiontest/codegen/slices.go
- test/codegen/stack.go 2 additions, 2 deletionstest/codegen/stack.go
- test/codegen/zerosize.go 5 additions, 5 deletionstest/codegen/zerosize.go
Loading
Please register or sign in to comment