aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2020-10-01 14:49:33 -0700
committerKeith Randall <khr@golang.org>2020-10-02 00:00:51 +0000
commitfe2cfb74ba6352990f5b41260b99e80f78e4a90a (patch)
treeeb0fe4e5c26627df259f080b14c2dc00750af8b2 /test
parent41df0e22184a0fcfb1e67e994c993239e9c2efc7 (diff)
downloadgo-fe2cfb74ba6352990f5b41260b99e80f78e4a90a.tar.xz
all: drop 387 support
My last 387 CL. So sad ... ... ... ... not! Fixes #40255 Change-Id: I8d4ddb744b234b8adc735db2f7c3c7b6d8bbdfa4 Reviewed-on: https://go-review.googlesource.com/c/go/+/258957 Trust: Keith Randall <khr@golang.org> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'test')
-rw-r--r--test/codegen/arithmetic.go6
-rw-r--r--test/codegen/floats.go19
-rw-r--r--test/codegen/math.go2
-rw-r--r--test/codegen/memops.go32
-rw-r--r--test/run.go12
5 files changed, 30 insertions, 41 deletions
diff --git a/test/codegen/arithmetic.go b/test/codegen/arithmetic.go
index 0bdb66a376..30f39a8da1 100644
--- a/test/codegen/arithmetic.go
+++ b/test/codegen/arithmetic.go
@@ -125,7 +125,7 @@ func Mul_n120(n int) int {
func MulMemSrc(a []uint32, b []float32) {
// 386:`IMULL\s4\([A-Z]+\),\s[A-Z]+`
a[0] *= a[1]
- // 386/sse2:`MULSS\s4\([A-Z]+\),\sX[0-9]+`
+ // 386:`MULSS\s4\([A-Z]+\),\sX[0-9]+`
// amd64:`MULSS\s4\([A-Z]+\),\sX[0-9]+`
b[0] *= b[1]
}
@@ -167,7 +167,7 @@ func MergeMuls5(a, n int) int {
// -------------- //
func DivMemSrc(a []float64) {
- // 386/sse2:`DIVSD\s8\([A-Z]+\),\sX[0-9]+`
+ // 386:`DIVSD\s8\([A-Z]+\),\sX[0-9]+`
// amd64:`DIVSD\s8\([A-Z]+\),\sX[0-9]+`
a[0] /= a[1]
}
@@ -211,7 +211,7 @@ func ConstDivs(n1 uint, n2 int) (uint, int) {
func FloatDivs(a []float32) float32 {
// amd64:`DIVSS\s8\([A-Z]+\),\sX[0-9]+`
- // 386/sse2:`DIVSS\s8\([A-Z]+\),\sX[0-9]+`
+ // 386:`DIVSS\s8\([A-Z]+\),\sX[0-9]+`
return a[1] / a[2]
}
diff --git a/test/codegen/floats.go b/test/codegen/floats.go
index 3fae1a327c..d115800a67 100644
--- a/test/codegen/floats.go
+++ b/test/codegen/floats.go
@@ -6,8 +6,6 @@
package codegen
-import "math"
-
// This file contains codegen tests related to arithmetic
// simplifications and optimizations on float types.
// For codegen tests on integer types, see arithmetic.go.
@@ -17,8 +15,7 @@ import "math"
// --------------------- //
func Mul2(f float64) float64 {
- // 386/sse2:"ADDSD",-"MULSD"
- // 386/387:"FADDDP",-"FMULDP"
+ // 386:"ADDSD",-"MULSD"
// amd64:"ADDSD",-"MULSD"
// arm/7:"ADDD",-"MULD"
// arm64:"FADDD",-"FMULD"
@@ -28,8 +25,7 @@ func Mul2(f float64) float64 {
}
func DivPow2(f1, f2, f3 float64) (float64, float64, float64) {
- // 386/sse2:"MULSD",-"DIVSD"
- // 386/387:"FMULDP",-"FDIVDP"
+ // 386:"MULSD",-"DIVSD"
// amd64:"MULSD",-"DIVSD"
// arm/7:"MULD",-"DIVD"
// arm64:"FMULD",-"FDIVD"
@@ -37,8 +33,7 @@ func DivPow2(f1, f2, f3 float64) (float64, float64, float64) {
// ppc64le:"FMUL",-"FDIV"
x := f1 / 16.0
- // 386/sse2:"MULSD",-"DIVSD"
- // 386/387:"FMULDP",-"FDIVDP"
+ // 386:"MULSD",-"DIVSD"
// amd64:"MULSD",-"DIVSD"
// arm/7:"MULD",-"DIVD"
// arm64:"FMULD",-"FDIVD"
@@ -46,8 +41,7 @@ func DivPow2(f1, f2, f3 float64) (float64, float64, float64) {
// ppc64le:"FMUL",-"FDIVD"
y := f2 / 0.125
- // 386/sse2:"ADDSD",-"DIVSD",-"MULSD"
- // 386/387:"FADDDP",-"FDIVDP",-"FMULDP"
+ // 386:"ADDSD",-"DIVSD",-"MULSD"
// amd64:"ADDSD",-"DIVSD",-"MULSD"
// arm/7:"ADDD",-"MULD",-"DIVD"
// arm64:"FADDD",-"FMULD",-"FDIVD"
@@ -58,11 +52,6 @@ func DivPow2(f1, f2, f3 float64) (float64, float64, float64) {
return x, y, z
}
-func getPi() float64 {
- // 386/387:"FLDPI"
- return math.Pi
-}
-
func indexLoad(b0 []float32, b1 float32, idx int) float32 {
// arm64:`FMOVS\s\(R[0-9]+\)\(R[0-9]+\),\sF[0-9]+`
return b0[idx] * b1
diff --git a/test/codegen/math.go b/test/codegen/math.go
index 1ebfda0405..fe678eea23 100644
--- a/test/codegen/math.go
+++ b/test/codegen/math.go
@@ -46,7 +46,7 @@ func approx(x float64) {
func sqrt(x float64) float64 {
// amd64:"SQRTSD"
- // 386/387:"FSQRT" 386/sse2:"SQRTSD"
+ // 386:"SQRTSD"
// arm64:"FSQRTD"
// arm/7:"SQRTD"
// mips/hardfloat:"SQRTD" mips/softfloat:-"SQRTD"
diff --git a/test/codegen/memops.go b/test/codegen/memops.go
index a234283146..4b003ad861 100644
--- a/test/codegen/memops.go
+++ b/test/codegen/memops.go
@@ -175,33 +175,33 @@ func idxInt64(x, y []int64, i int) {
func idxFloat32(x, y []float32, i int) {
var t float32
- // amd64: `MOVSS\t4\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*4\), X[0-9]+`
- // 386/sse2: `MOVSS\t4\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*4\), X[0-9]+`
+ // amd64: `MOVSS\t4\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*4\), X[0-9]+`
+ // 386: `MOVSS\t4\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*4\), X[0-9]+`
t = x[i+1]
- // amd64: `MOVSS\tX[0-9]+, 4\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*4\)`
- // 386/sse2: `MOVSS\tX[0-9]+, 4\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*4\)`
+ // amd64: `MOVSS\tX[0-9]+, 4\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*4\)`
+ // 386: `MOVSS\tX[0-9]+, 4\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*4\)`
y[i+1] = t
- // amd64: `MOVSS\t4\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*[14]\), X[0-9]+`
- // 386/sse2: `MOVSS\t4\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*[14]\), X[0-9]+`
+ // amd64: `MOVSS\t4\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*[14]\), X[0-9]+`
+ // 386: `MOVSS\t4\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*[14]\), X[0-9]+`
t = x[16*i+1]
- // amd64: `MOVSS\tX[0-9]+, 4\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*[14]\)`
- // 386/sse2: `MOVSS\tX[0-9]+, 4\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*[14]\)`
+ // amd64: `MOVSS\tX[0-9]+, 4\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*[14]\)`
+ // 386: `MOVSS\tX[0-9]+, 4\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*[14]\)`
y[16*i+1] = t
}
func idxFloat64(x, y []float64, i int) {
var t float64
- // amd64: `MOVSD\t8\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*8\), X[0-9]+`
- // 386/sse2: `MOVSD\t8\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*8\), X[0-9]+`
+ // amd64: `MOVSD\t8\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*8\), X[0-9]+`
+ // 386: `MOVSD\t8\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*8\), X[0-9]+`
t = x[i+1]
- // amd64: `MOVSD\tX[0-9]+, 8\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*8\)`
- // 386/sse2: `MOVSD\tX[0-9]+, 8\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*8\)`
+ // amd64: `MOVSD\tX[0-9]+, 8\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*8\)`
+ // 386: `MOVSD\tX[0-9]+, 8\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*8\)`
y[i+1] = t
- // amd64: `MOVSD\t8\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*[18]\), X[0-9]+`
- // 386/sse2: `MOVSD\t8\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*[18]\), X[0-9]+`
+ // amd64: `MOVSD\t8\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*[18]\), X[0-9]+`
+ // 386: `MOVSD\t8\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*[18]\), X[0-9]+`
t = x[16*i+1]
- // amd64: `MOVSD\tX[0-9]+, 8\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*[18]\)`
- // 386/sse2: `MOVSD\tX[0-9]+, 8\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*[18]\)`
+ // amd64: `MOVSD\tX[0-9]+, 8\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*[18]\)`
+ // 386: `MOVSD\tX[0-9]+, 8\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*[18]\)`
y[16*i+1] = t
}
diff --git a/test/run.go b/test/run.go
index 95b94b7277..77710fd89a 100644
--- a/test/run.go
+++ b/test/run.go
@@ -1489,7 +1489,7 @@ var (
// value[0] is the variant-changing environment variable, and values[1:]
// are the supported variants.
archVariants = map[string][]string{
- "386": {"GO386", "387", "sse2"},
+ "386": {},
"amd64": {},
"arm": {"GOARM", "5", "6", "7"},
"arm64": {},
@@ -1511,12 +1511,12 @@ type wantedAsmOpcode struct {
found bool // true if the opcode check matched at least one in the output
}
-// A build environment triplet separated by slashes (eg: linux/386/sse2).
+// A build environment triplet separated by slashes (eg: linux/arm/7).
// The third field can be empty if the arch does not support variants (eg: "plan9/amd64/")
type buildEnv string
// Environ returns the environment it represents in cmd.Environ() "key=val" format
-// For instance, "linux/386/sse2".Environ() returns {"GOOS=linux", "GOARCH=386", "GO386=sse2"}
+// For instance, "linux/arm/7".Environ() returns {"GOOS=linux", "GOARCH=arm", "GOARM=7"}
func (b buildEnv) Environ() []string {
fields := strings.Split(string(b), "/")
if len(fields) != 3 {
@@ -1571,11 +1571,11 @@ func (t *test) wantedAsmOpcodes(fn string) asmChecks {
var arch, subarch, os string
switch {
- case archspec[2] != "": // 3 components: "linux/386/sse2"
+ case archspec[2] != "": // 3 components: "linux/arm/7"
os, arch, subarch = archspec[0], archspec[1][1:], archspec[2][1:]
- case archspec[1] != "": // 2 components: "386/sse2"
+ case archspec[1] != "": // 2 components: "arm/7"
os, arch, subarch = "linux", archspec[0], archspec[1][1:]
- default: // 1 component: "386"
+ default: // 1 component: "arm"
os, arch, subarch = "linux", archspec[0], ""
if arch == "wasm" {
os = "js"