mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
41df0e2218
commit
fe2cfb74ba
36 changed files with 97 additions and 796 deletions
|
|
@ -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]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue