]> Cypherpunks repositories - gostls13.git/commitdiff
test: migrate plan9 tests to codegen
authorGiovanni Bajo <rasky@develer.com>
Sun, 15 Apr 2018 17:17:41 +0000 (19:17 +0200)
committerGiovanni Bajo <rasky@develer.com>
Sun, 15 Apr 2018 20:02:30 +0000 (20:02 +0000)
And remove it from asmtest. Next CL will remove the whole
asmtest infrastructure.

Change-Id: I5851bf7c617456d62a3c6cffacf70252df7b056b
Reviewed-on: https://go-review.googlesource.com/107335
Run-TryBot: Giovanni Bajo <rasky@develer.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/asm_test.go
test/codegen/floats.go

index b71dc208897acb946eba142a236c85a5dd2016cd..27dbfd865b21c771c699365068e28242a8831711 100644 (file)
@@ -220,39 +220,7 @@ func (ats *asmTests) runGo(t *testing.T, args ...string) string {
        return stdout.String()
 }
 
-var allAsmTests = []*asmTests{
-       {
-               arch:  "amd64",
-               os:    "plan9",
-               tests: plan9AMD64Tests,
-       },
-}
-
-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
-       // operations are not allowed in the note handler.
-       // Array zeroing.
-       {
-               fn: `
-               func $() [16]byte {
-                       var a [16]byte
-                       return a
-               }
-               `,
-               pos: []string{"\tMOVQ\t\\$0, \"\""},
-       },
-       // Array copy.
-       {
-               fn: `
-               func $(a [16]byte) (b [16]byte) {
-                       b = a
-                       return
-               }
-               `,
-               pos: []string{"\tMOVQ\t\"\"\\.a\\+[0-9]+\\(SP\\), (AX|CX)", "\tMOVQ\t(AX|CX), \"\"\\.b\\+[0-9]+\\(SP\\)"},
-       },
-}
+var allAsmTests = []*asmTests{}
 
 // TestLineNumber checks to make sure the generated assembly has line numbers
 // see issue #16214
index cab63488f48e1514de879ef7a08e05a54f9e1654..c2847dd93914d443c0ac51fc36738be8ecd55057 100644 (file)
@@ -71,3 +71,25 @@ func FusedSub64(x, y, z float64) float64 {
        // ppc64le:"FMSUB\t"
        return x*y - z
 }
+
+// ---------------- //
+//    Non-floats    //
+// ---------------- //
+
+// We should make sure that the compiler doesn't generate floating point
+// instructions for non-float operations on Plan 9, because floating point
+// operations are not allowed in the note handler.
+
+func ArrayZero() [16]byte {
+       // amd64:"MOVUPS"
+       // plan9/amd64/:-"MOVUPS"
+       var a [16]byte
+       return a
+}
+
+func ArrayCopy(a [16]byte) (b [16]byte) {
+       // amd64:"MOVUPS"
+       // plan9/amd64/:-"MOVUPS"
+       b = a
+       return
+}