mirror of
https://github.com/golang/go
synced 2024-11-26 10:18:12 -07:00
1d20a362d0
Currently almost all math functions have the following pattern: func Sin(x float64) float64 func sin(x float64) float64 { // ... pure Go implementation ... } Architectures that implement a function in assembly provide the assembly implementation directly as the exported function (e.g., Sin), and architectures that don't implement it in assembly use a small stub to jump back to the Go code, like: TEXT ·Sin(SB), NOSPLIT, $0 JMP ·sin(SB) However, most functions are not implemented in assembly on most architectures, so this jump through assembly is a waste. It defeats compiler optimizations like inlining. And, with regabi, it actually adds a small but non-trivial overhead because the jump from assembly back to Go must go through an ABI0->ABIInternal bridge function. Hence, this CL reorganizes this structure across the entire package. It now leans on inlining to achieve peak performance, but allows the compiler to see all the way through the pure Go implementation. Now, functions follow this pattern: func Sin(x float64) float64 { if haveArchSin { return archSin(x) } return sin(x) } func sin(x float64) float64 { // ... pure Go implementation ... } Architectures that have assembly implementations use build-tagged files to set haveArchX to true an provide an archX implementation. That implementation can also still call back into the Go implementation (some of them do this). Prior to this change, enabling ABI wrappers results in a geomean slowdown of the math benchmarks of 8.77% (full results: https://perf.golang.org/search?q=upload:20210415.6) and of the Tile38 benchmarks by ~4%. After this change, enabling ABI wrappers is completely performance-neutral on Tile38 and all but one math benchmark (full results: https://perf.golang.org/search?q=upload:20210415.7). ABI wrappers slow down SqrtIndirectLatency-12 by 2.09%, which makes sense because that call must still go through an ABI wrapper. With ABI wrappers disabled (which won't be an option on amd64 much longer), on linux/amd64, this change is largely performance-neutral and slightly improves the performance of a few benchmarks: (Because there are so many benchmarks, I've applied the Šidák correction to the alpha threshold. It makes relatively little difference in which benchmarks are statistically significant.) name old time/op new time/op delta Acos-12 22.3ns ± 0% 18.8ns ± 1% -15.44% (p=0.000 n=18+16) Acosh-12 28.2ns ± 0% 28.2ns ± 0% ~ (p=0.404 n=18+20) Asin-12 18.1ns ± 0% 18.2ns ± 0% +0.20% (p=0.000 n=18+16) Asinh-12 32.8ns ± 0% 32.9ns ± 1% ~ (p=0.891 n=18+20) Atan-12 9.92ns ± 0% 9.90ns ± 1% -0.24% (p=0.000 n=17+16) Atanh-12 27.7ns ± 0% 27.5ns ± 0% -0.72% (p=0.000 n=16+20) Atan2-12 18.5ns ± 0% 18.4ns ± 0% -0.59% (p=0.000 n=19+19) Cbrt-12 22.1ns ± 0% 22.1ns ± 0% ~ (p=0.804 n=16+17) Ceil-12 0.84ns ± 0% 0.84ns ± 0% ~ (p=0.663 n=18+16) Copysign-12 0.84ns ± 0% 0.84ns ± 0% ~ (p=0.762 n=16+19) Cos-12 12.7ns ± 0% 12.7ns ± 1% ~ (p=0.145 n=19+18) Cosh-12 22.2ns ± 0% 22.5ns ± 0% +1.60% (p=0.000 n=17+19) Erf-12 11.1ns ± 1% 11.1ns ± 1% ~ (p=0.010 n=19+19) Erfc-12 12.6ns ± 1% 12.7ns ± 0% ~ (p=0.066 n=19+15) Erfinv-12 16.1ns ± 0% 16.1ns ± 0% ~ (p=0.462 n=17+20) Erfcinv-12 16.0ns ± 1% 16.0ns ± 1% ~ (p=0.015 n=17+16) Exp-12 16.3ns ± 0% 16.5ns ± 1% +1.25% (p=0.000 n=19+16) ExpGo-12 36.2ns ± 1% 36.1ns ± 1% ~ (p=0.242 n=20+18) Expm1-12 18.6ns ± 0% 18.7ns ± 0% +0.25% (p=0.000 n=16+19) Exp2-12 34.7ns ± 0% 34.6ns ± 1% ~ (p=0.010 n=19+18) Exp2Go-12 34.8ns ± 1% 34.8ns ± 1% ~ (p=0.372 n=19+19) Abs-12 0.56ns ± 0% 0.56ns ± 0% ~ (p=0.766 n=18+16) Dim-12 0.84ns ± 1% 0.84ns ± 1% ~ (p=0.167 n=17+19) Floor-12 0.84ns ± 0% 0.84ns ± 0% ~ (p=0.993 n=18+16) Max-12 3.35ns ± 0% 3.35ns ± 0% ~ (p=0.894 n=17+19) Min-12 3.35ns ± 0% 3.36ns ± 1% ~ (p=0.214 n=18+18) Mod-12 35.2ns ± 0% 34.7ns ± 0% -1.45% (p=0.000 n=18+17) Frexp-12 5.31ns ± 0% 4.75ns ± 0% -10.51% (p=0.000 n=19+18) Gamma-12 14.8ns ± 0% 16.2ns ± 1% +9.21% (p=0.000 n=20+19) Hypot-12 6.16ns ± 0% 6.17ns ± 0% +0.26% (p=0.000 n=19+20) HypotGo-12 7.79ns ± 1% 7.78ns ± 0% ~ (p=0.497 n=18+17) Ilogb-12 4.47ns ± 0% 4.47ns ± 0% ~ (p=0.167 n=19+19) J0-12 76.0ns ± 0% 76.3ns ± 0% +0.35% (p=0.000 n=19+18) J1-12 76.8ns ± 1% 75.9ns ± 0% -1.14% (p=0.000 n=18+18) Jn-12 167ns ± 1% 168ns ± 1% ~ (p=0.038 n=18+18) Ldexp-12 6.98ns ± 0% 6.43ns ± 0% -7.97% (p=0.000 n=17+18) Lgamma-12 15.9ns ± 0% 16.0ns ± 1% ~ (p=0.011 n=20+17) Log-12 13.3ns ± 0% 13.4ns ± 1% +0.37% (p=0.000 n=15+18) Logb-12 4.75ns ± 0% 4.75ns ± 0% ~ (p=0.831 n=16+18) Log1p-12 19.5ns ± 0% 19.5ns ± 1% ~ (p=0.851 n=18+17) Log10-12 15.9ns ± 0% 14.0ns ± 0% -11.92% (p=0.000 n=17+16) Log2-12 7.88ns ± 1% 8.01ns ± 0% +1.72% (p=0.000 n=20+20) Modf-12 4.75ns ± 0% 4.34ns ± 0% -8.66% (p=0.000 n=19+17) Nextafter32-12 5.31ns ± 0% 5.31ns ± 0% ~ (p=0.389 n=17+18) Nextafter64-12 5.03ns ± 1% 5.03ns ± 0% ~ (p=0.774 n=17+18) PowInt-12 29.9ns ± 0% 28.5ns ± 0% -4.69% (p=0.000 n=18+19) PowFrac-12 91.0ns ± 0% 91.1ns ± 0% ~ (p=0.029 n=19+19) Pow10Pos-12 1.12ns ± 0% 1.12ns ± 0% ~ (p=0.363 n=20+20) Pow10Neg-12 3.90ns ± 0% 3.90ns ± 0% ~ (p=0.921 n=17+18) Round-12 2.31ns ± 0% 2.31ns ± 1% ~ (p=0.390 n=18+18) RoundToEven-12 0.84ns ± 0% 0.84ns ± 0% ~ (p=0.280 n=18+19) Remainder-12 31.6ns ± 0% 29.6ns ± 0% -6.16% (p=0.000 n=18+17) Signbit-12 0.56ns ± 0% 0.56ns ± 0% ~ (p=0.385 n=19+18) Sin-12 12.5ns ± 0% 12.5ns ± 0% ~ (p=0.080 n=18+18) Sincos-12 16.4ns ± 2% 16.4ns ± 2% ~ (p=0.253 n=20+19) Sinh-12 26.1ns ± 0% 26.1ns ± 0% +0.18% (p=0.000 n=17+19) SqrtIndirect-12 3.91ns ± 0% 3.90ns ± 0% ~ (p=0.133 n=19+19) SqrtLatency-12 2.79ns ± 0% 2.79ns ± 0% ~ (p=0.226 n=16+19) SqrtIndirectLatency-12 6.68ns ± 0% 6.37ns ± 2% -4.66% (p=0.000 n=17+20) SqrtGoLatency-12 49.4ns ± 0% 49.4ns ± 0% ~ (p=0.289 n=18+16) SqrtPrime-12 3.18µs ± 0% 3.18µs ± 0% ~ (p=0.084 n=17+18) Tan-12 13.8ns ± 0% 13.9ns ± 2% ~ (p=0.292 n=19+20) Tanh-12 25.4ns ± 0% 25.4ns ± 0% ~ (p=0.101 n=17+17) Trunc-12 0.84ns ± 0% 0.84ns ± 0% ~ (p=0.765 n=18+16) Y0-12 75.8ns ± 0% 75.9ns ± 1% ~ (p=0.805 n=16+18) Y1-12 76.3ns ± 0% 75.3ns ± 1% -1.34% (p=0.000 n=19+17) Yn-12 164ns ± 0% 164ns ± 2% ~ (p=0.356 n=18+20) Float64bits-12 0.56ns ± 0% 0.56ns ± 0% ~ (p=0.383 n=18+18) Float64frombits-12 0.56ns ± 0% 0.56ns ± 0% ~ (p=0.066 n=18+19) Float32bits-12 0.56ns ± 0% 0.56ns ± 0% ~ (p=0.889 n=16+19) Float32frombits-12 0.56ns ± 0% 0.56ns ± 0% ~ (p=0.007 n=18+19) FMA-12 23.9ns ± 0% 24.0ns ± 0% +0.31% (p=0.000 n=16+17) [Geo mean] 9.86ns 9.77ns -0.87% (https://perf.golang.org/search?q=upload:20210415.5) For #40724. Change-Id: I44fbba2a17be930ec9daeb0a8222f55cd50555a0 Reviewed-on: https://go-review.googlesource.com/c/go/+/310331 Trust: Austin Clements <austin@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
469 lines
12 KiB
ArmAsm
469 lines
12 KiB
ArmAsm
// Copyright 2016 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
#include "textflag.h"
|
|
|
|
TEXT ·archLog10(SB), NOSPLIT, $0
|
|
MOVD ·log10vectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·log10TrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·log10vectorfacility+0x00(SB), R1
|
|
MOVD $·log10(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·log10(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·log10vectorfacility+0x00(SB), R1
|
|
MOVD $·log10Asm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·log10Asm(SB)
|
|
|
|
GLOBL ·log10vectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·log10vectorfacility+0x00(SB)/8, $·log10TrampolineSetup(SB)
|
|
|
|
TEXT ·archCos(SB), NOSPLIT, $0
|
|
MOVD ·cosvectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·cosTrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·cosvectorfacility+0x00(SB), R1
|
|
MOVD $·cos(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·cos(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·cosvectorfacility+0x00(SB), R1
|
|
MOVD $·cosAsm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·cosAsm(SB)
|
|
|
|
GLOBL ·cosvectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·cosvectorfacility+0x00(SB)/8, $·cosTrampolineSetup(SB)
|
|
|
|
TEXT ·archCosh(SB), NOSPLIT, $0
|
|
MOVD ·coshvectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·coshTrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·coshvectorfacility+0x00(SB), R1
|
|
MOVD $·cosh(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·cosh(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·coshvectorfacility+0x00(SB), R1
|
|
MOVD $·coshAsm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·coshAsm(SB)
|
|
|
|
GLOBL ·coshvectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·coshvectorfacility+0x00(SB)/8, $·coshTrampolineSetup(SB)
|
|
|
|
TEXT ·archSin(SB), NOSPLIT, $0
|
|
MOVD ·sinvectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·sinTrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·sinvectorfacility+0x00(SB), R1
|
|
MOVD $·sin(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·sin(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·sinvectorfacility+0x00(SB), R1
|
|
MOVD $·sinAsm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·sinAsm(SB)
|
|
|
|
GLOBL ·sinvectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·sinvectorfacility+0x00(SB)/8, $·sinTrampolineSetup(SB)
|
|
|
|
TEXT ·archSinh(SB), NOSPLIT, $0
|
|
MOVD ·sinhvectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·sinhTrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·sinhvectorfacility+0x00(SB), R1
|
|
MOVD $·sinh(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·sinh(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·sinhvectorfacility+0x00(SB), R1
|
|
MOVD $·sinhAsm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·sinhAsm(SB)
|
|
|
|
GLOBL ·sinhvectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·sinhvectorfacility+0x00(SB)/8, $·sinhTrampolineSetup(SB)
|
|
|
|
TEXT ·archTanh(SB), NOSPLIT, $0
|
|
MOVD ·tanhvectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·tanhTrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·tanhvectorfacility+0x00(SB), R1
|
|
MOVD $·tanh(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·tanh(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·tanhvectorfacility+0x00(SB), R1
|
|
MOVD $·tanhAsm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·tanhAsm(SB)
|
|
|
|
GLOBL ·tanhvectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·tanhvectorfacility+0x00(SB)/8, $·tanhTrampolineSetup(SB)
|
|
|
|
TEXT ·archLog1p(SB), NOSPLIT, $0
|
|
MOVD ·log1pvectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·log1pTrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·log1pvectorfacility+0x00(SB), R1
|
|
MOVD $·log1p(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·log1p(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·log1pvectorfacility+0x00(SB), R1
|
|
MOVD $·log1pAsm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·log1pAsm(SB)
|
|
|
|
GLOBL ·log1pvectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·log1pvectorfacility+0x00(SB)/8, $·log1pTrampolineSetup(SB)
|
|
|
|
TEXT ·archAtanh(SB), NOSPLIT, $0
|
|
MOVD ·atanhvectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·atanhTrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·atanhvectorfacility+0x00(SB), R1
|
|
MOVD $·atanh(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·atanh(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·atanhvectorfacility+0x00(SB), R1
|
|
MOVD $·atanhAsm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·atanhAsm(SB)
|
|
|
|
GLOBL ·atanhvectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·atanhvectorfacility+0x00(SB)/8, $·atanhTrampolineSetup(SB)
|
|
|
|
TEXT ·archAcos(SB), NOSPLIT, $0
|
|
MOVD ·acosvectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·acosTrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·acosvectorfacility+0x00(SB), R1
|
|
MOVD $·acos(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·acos(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·acosvectorfacility+0x00(SB), R1
|
|
MOVD $·acosAsm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·acosAsm(SB)
|
|
|
|
GLOBL ·acosvectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·acosvectorfacility+0x00(SB)/8, $·acosTrampolineSetup(SB)
|
|
|
|
TEXT ·archAsin(SB), NOSPLIT, $0
|
|
MOVD ·asinvectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·asinTrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·asinvectorfacility+0x00(SB), R1
|
|
MOVD $·asin(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·asin(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·asinvectorfacility+0x00(SB), R1
|
|
MOVD $·asinAsm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·asinAsm(SB)
|
|
|
|
GLOBL ·asinvectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·asinvectorfacility+0x00(SB)/8, $·asinTrampolineSetup(SB)
|
|
|
|
TEXT ·archAsinh(SB), NOSPLIT, $0
|
|
MOVD ·asinhvectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·asinhTrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·asinhvectorfacility+0x00(SB), R1
|
|
MOVD $·asinh(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·asinh(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·asinhvectorfacility+0x00(SB), R1
|
|
MOVD $·asinhAsm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·asinhAsm(SB)
|
|
|
|
GLOBL ·asinhvectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·asinhvectorfacility+0x00(SB)/8, $·asinhTrampolineSetup(SB)
|
|
|
|
TEXT ·archAcosh(SB), NOSPLIT, $0
|
|
MOVD ·acoshvectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·acoshTrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·acoshvectorfacility+0x00(SB), R1
|
|
MOVD $·acosh(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·acosh(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·acoshvectorfacility+0x00(SB), R1
|
|
MOVD $·acoshAsm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·acoshAsm(SB)
|
|
|
|
GLOBL ·acoshvectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·acoshvectorfacility+0x00(SB)/8, $·acoshTrampolineSetup(SB)
|
|
|
|
TEXT ·archErf(SB), NOSPLIT, $0
|
|
MOVD ·erfvectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·erfTrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·erfvectorfacility+0x00(SB), R1
|
|
MOVD $·erf(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·erf(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·erfvectorfacility+0x00(SB), R1
|
|
MOVD $·erfAsm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·erfAsm(SB)
|
|
|
|
GLOBL ·erfvectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·erfvectorfacility+0x00(SB)/8, $·erfTrampolineSetup(SB)
|
|
|
|
TEXT ·archErfc(SB), NOSPLIT, $0
|
|
MOVD ·erfcvectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·erfcTrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·erfcvectorfacility+0x00(SB), R1
|
|
MOVD $·erfc(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·erfc(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·erfcvectorfacility+0x00(SB), R1
|
|
MOVD $·erfcAsm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·erfcAsm(SB)
|
|
|
|
GLOBL ·erfcvectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·erfcvectorfacility+0x00(SB)/8, $·erfcTrampolineSetup(SB)
|
|
|
|
TEXT ·archAtan(SB), NOSPLIT, $0
|
|
MOVD ·atanvectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·atanTrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·atanvectorfacility+0x00(SB), R1
|
|
MOVD $·atan(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·atan(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·atanvectorfacility+0x00(SB), R1
|
|
MOVD $·atanAsm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·atanAsm(SB)
|
|
|
|
GLOBL ·atanvectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·atanvectorfacility+0x00(SB)/8, $·atanTrampolineSetup(SB)
|
|
|
|
TEXT ·archAtan2(SB), NOSPLIT, $0
|
|
MOVD ·atan2vectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·atan2TrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·atan2vectorfacility+0x00(SB), R1
|
|
MOVD $·atan2(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·atan2(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·atan2vectorfacility+0x00(SB), R1
|
|
MOVD $·atan2Asm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·atan2Asm(SB)
|
|
|
|
GLOBL ·atan2vectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·atan2vectorfacility+0x00(SB)/8, $·atan2TrampolineSetup(SB)
|
|
|
|
TEXT ·archCbrt(SB), NOSPLIT, $0
|
|
MOVD ·cbrtvectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·cbrtTrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·cbrtvectorfacility+0x00(SB), R1
|
|
MOVD $·cbrt(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·cbrt(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·cbrtvectorfacility+0x00(SB), R1
|
|
MOVD $·cbrtAsm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·cbrtAsm(SB)
|
|
|
|
GLOBL ·cbrtvectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·cbrtvectorfacility+0x00(SB)/8, $·cbrtTrampolineSetup(SB)
|
|
|
|
TEXT ·archLog(SB), NOSPLIT, $0
|
|
MOVD ·logvectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·logTrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·logvectorfacility+0x00(SB), R1
|
|
MOVD $·log(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·log(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·logvectorfacility+0x00(SB), R1
|
|
MOVD $·logAsm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·logAsm(SB)
|
|
|
|
GLOBL ·logvectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·logvectorfacility+0x00(SB)/8, $·logTrampolineSetup(SB)
|
|
|
|
TEXT ·archTan(SB), NOSPLIT, $0
|
|
MOVD ·tanvectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·tanTrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·tanvectorfacility+0x00(SB), R1
|
|
MOVD $·tan(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·tan(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·tanvectorfacility+0x00(SB), R1
|
|
MOVD $·tanAsm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·tanAsm(SB)
|
|
|
|
GLOBL ·tanvectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·tanvectorfacility+0x00(SB)/8, $·tanTrampolineSetup(SB)
|
|
|
|
TEXT ·archExp(SB), NOSPLIT, $0
|
|
MOVD ·expvectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·expTrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·expvectorfacility+0x00(SB), R1
|
|
MOVD $·exp(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·exp(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·expvectorfacility+0x00(SB), R1
|
|
MOVD $·expAsm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·expAsm(SB)
|
|
|
|
GLOBL ·expvectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·expvectorfacility+0x00(SB)/8, $·expTrampolineSetup(SB)
|
|
|
|
TEXT ·archExpm1(SB), NOSPLIT, $0
|
|
MOVD ·expm1vectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·expm1TrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·expm1vectorfacility+0x00(SB), R1
|
|
MOVD $·expm1(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·expm1(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·expm1vectorfacility+0x00(SB), R1
|
|
MOVD $·expm1Asm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·expm1Asm(SB)
|
|
|
|
GLOBL ·expm1vectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·expm1vectorfacility+0x00(SB)/8, $·expm1TrampolineSetup(SB)
|
|
|
|
TEXT ·archPow(SB), NOSPLIT, $0
|
|
MOVD ·powvectorfacility+0x00(SB), R1
|
|
BR (R1)
|
|
|
|
TEXT ·powTrampolineSetup(SB), NOSPLIT, $0
|
|
MOVB ·hasVX(SB), R1
|
|
CMPBEQ R1, $1, vectorimpl // vectorfacility = 1, vector supported
|
|
MOVD $·powvectorfacility+0x00(SB), R1
|
|
MOVD $·pow(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·pow(SB)
|
|
|
|
vectorimpl:
|
|
MOVD $·powvectorfacility+0x00(SB), R1
|
|
MOVD $·powAsm(SB), R2
|
|
MOVD R2, 0(R1)
|
|
BR ·powAsm(SB)
|
|
|
|
GLOBL ·powvectorfacility+0x00(SB), NOPTR, $8
|
|
DATA ·powvectorfacility+0x00(SB)/8, $·powTrampolineSetup(SB)
|
|
|