aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlberto Donizetti <alb.donizetti@gmail.com>2018-04-11 17:03:14 +0200
committerAlberto Donizetti <alb.donizetti@gmail.com>2018-04-11 16:08:04 +0000
commit467eca607697b30ba4f0b58bceae002f87ce5097 (patch)
tree2136da896e41530163e5ae3c8f3c27a63b0eb2b9 /src
parente1040d79557de627b18c928a3c498e89f1dcd9da (diff)
downloadgo-467eca607697b30ba4f0b58bceae002f87ce5097.tar.xz
test/codegen: port last stack and memcombining tests
And delete them from asm_test. Also delete an arm64 cmov test has been already ported to the new test harness. Change-Id: I4458721e1f512bc9ecbbe1c22a2c9c7109ad68fe Reviewed-on: https://go-review.googlesource.com/106335 Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Giovanni Bajo <rasky@develer.com>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/compile/internal/gc/asm_test.go80
1 files changed, 0 insertions, 80 deletions
diff --git a/src/cmd/compile/internal/gc/asm_test.go b/src/cmd/compile/internal/gc/asm_test.go
index 1b7c94837f..b71dc20889 100644
--- a/src/cmd/compile/internal/gc/asm_test.go
+++ b/src/cmd/compile/internal/gc/asm_test.go
@@ -222,92 +222,12 @@ func (ats *asmTests) runGo(t *testing.T, args ...string) string {
var allAsmTests = []*asmTests{
{
- arch: "amd64",
- os: "linux",
- imports: []string{"runtime"},
- tests: linuxAMD64Tests,
- },
- {
- arch: "arm",
- os: "linux",
- imports: []string{"runtime"},
- tests: linuxARMTests,
- },
- {
- arch: "arm64",
- os: "linux",
- tests: linuxARM64Tests,
- },
- {
arch: "amd64",
os: "plan9",
tests: plan9AMD64Tests,
},
}
-var linuxAMD64Tests = []*asmTest{
- {
- // make sure assembly output has matching offset and base register.
- fn: `
- func f72(a, b int) int {
- runtime.GC() // use some frame
- return b
- }
- `,
- pos: []string{"b\\+24\\(SP\\)"},
- },
- // Make sure we don't put pointers in SSE registers across safe points.
- {
- fn: `
- func $(p, q *[2]*int) {
- a, b := p[0], p[1]
- runtime.GC()
- q[0], q[1] = a, b
- }
- `,
- neg: []string{"MOVUPS"},
- },
-}
-
-var linuxARMTests = []*asmTest{
- {
- // make sure assembly output has matching offset and base register.
- fn: `
- func f13(a, b int) int {
- runtime.GC() // use some frame
- return b
- }
- `,
- pos: []string{"b\\+4\\(FP\\)"},
- },
-}
-
-var linuxARM64Tests = []*asmTest{
- // Load-combining tests.
- {
- fn: `
- func $(s []byte) uint16 {
- return uint16(s[0]) | uint16(s[1]) << 8
- }
- `,
- pos: []string{"\tMOVHU\t\\(R[0-9]+\\)"},
- neg: []string{"ORR\tR[0-9]+<<8\t"},
- },
- {
- // make sure that CSEL is emitted for conditional moves
- fn: `
- func f37(c int) int {
- x := c + 4
- if c < 0 {
- x = 182
- }
- return x
- }
- `,
- pos: []string{"\tCSEL\t"},
- },
-}
-
var plan9AMD64Tests = []*asmTest{
// We should make sure that the compiler doesn't generate floating point
// instructions for non-float operations on Plan 9, because floating point