diff options
Diffstat (limited to 'src/math')
-rw-r--r-- | src/math/abs_power64x.s | 14 | ||||
-rw-r--r-- | src/math/big/arith_power64x.s | 46 | ||||
-rw-r--r-- | src/math/stubs_power64x.s | 91 |
3 files changed, 151 insertions, 0 deletions
diff --git a/src/math/abs_power64x.s b/src/math/abs_power64x.s new file mode 100644 index 000000000..3ba8201b3 --- /dev/null +++ b/src/math/abs_power64x.s @@ -0,0 +1,14 @@ +// Copyright 2011 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. + +// +build power64 power64le + +#include "textflag.h" + +TEXT ·Abs(SB),NOSPLIT,$0-16 + MOVD x+0(FP), R3 + MOVD $((1<<63)-1), R4 + AND R4, R3 + MOVD R3, ret+8(FP) + RETURN diff --git a/src/math/big/arith_power64x.s b/src/math/big/arith_power64x.s new file mode 100644 index 000000000..c33a9209f --- /dev/null +++ b/src/math/big/arith_power64x.s @@ -0,0 +1,46 @@ +// Copyright 2013 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. + +// +build power64 power64le + +#include "textflag.h" + +// This file provides fast assembly versions for the elementary +// arithmetic operations on vectors implemented in arith.go. + +TEXT ·mulWW(SB),NOSPLIT,$0 + BR ·mulWW_g(SB) + +TEXT ·divWW(SB),NOSPLIT,$0 + BR ·divWW_g(SB) + +TEXT ·addVV(SB),NOSPLIT,$0 + BR ·addVV_g(SB) + +TEXT ·subVV(SB),NOSPLIT,$0 + BR ·subVV_g(SB) + +TEXT ·addVW(SB),NOSPLIT,$0 + BR ·addVW_g(SB) + +TEXT ·subVW(SB),NOSPLIT,$0 + BR ·subVW_g(SB) + +TEXT ·shlVU(SB),NOSPLIT,$0 + BR ·shlVU_g(SB) + +TEXT ·shrVU(SB),NOSPLIT,$0 + BR ·shrVU_g(SB) + +TEXT ·mulAddVWW(SB),NOSPLIT,$0 + BR ·mulAddVWW_g(SB) + +TEXT ·addMulVVW(SB),NOSPLIT,$0 + BR ·addMulVVW_g(SB) + +TEXT ·divWVW(SB),NOSPLIT,$0 + BR ·divWVW_g(SB) + +TEXT ·bitLen(SB),NOSPLIT,$0 + BR ·bitLen_g(SB) diff --git a/src/math/stubs_power64x.s b/src/math/stubs_power64x.s new file mode 100644 index 000000000..0cb86144a --- /dev/null +++ b/src/math/stubs_power64x.s @@ -0,0 +1,91 @@ +// Copyright 2014 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. + +// +build power64 power64le + +#include "../../cmd/ld/textflag.h" + +TEXT ·Asin(SB),NOSPLIT,$0 + BR ·asin(SB) + +TEXT ·Acos(SB),NOSPLIT,$0 + BR ·acos(SB) + +TEXT ·Atan2(SB),NOSPLIT,$0 + BR ·atan2(SB) + +TEXT ·Atan(SB),NOSPLIT,$0 + BR ·atan(SB) + +TEXT ·Dim(SB),NOSPLIT,$0 + BR ·dim(SB) + +TEXT ·Min(SB),NOSPLIT,$0 + BR ·min(SB) + +TEXT ·Max(SB),NOSPLIT,$0 + BR ·max(SB) + +TEXT ·Exp2(SB),NOSPLIT,$0 + BR ·exp2(SB) + +TEXT ·Expm1(SB),NOSPLIT,$0 + BR ·expm1(SB) + +TEXT ·Exp(SB),NOSPLIT,$0 + BR ·exp(SB) + +TEXT ·Floor(SB),NOSPLIT,$0 + BR ·floor(SB) + +TEXT ·Ceil(SB),NOSPLIT,$0 + BR ·ceil(SB) + +TEXT ·Trunc(SB),NOSPLIT,$0 + BR ·trunc(SB) + +TEXT ·Frexp(SB),NOSPLIT,$0 + BR ·frexp(SB) + +TEXT ·Hypot(SB),NOSPLIT,$0 + BR ·hypot(SB) + +TEXT ·Ldexp(SB),NOSPLIT,$0 + BR ·ldexp(SB) + +TEXT ·Log10(SB),NOSPLIT,$0 + BR ·log10(SB) + +TEXT ·Log2(SB),NOSPLIT,$0 + BR ·log2(SB) + +TEXT ·Log1p(SB),NOSPLIT,$0 + BR ·log1p(SB) + +TEXT ·Log(SB),NOSPLIT,$0 + BR ·log(SB) + +TEXT ·Modf(SB),NOSPLIT,$0 + BR ·modf(SB) + +TEXT ·Mod(SB),NOSPLIT,$0 + BR ·mod(SB) + +TEXT ·Remainder(SB),NOSPLIT,$0 + BR ·remainder(SB) + +TEXT ·Sincos(SB),NOSPLIT,$0 + BR ·sincos(SB) + +TEXT ·Sin(SB),NOSPLIT,$0 + BR ·sin(SB) + +TEXT ·Cos(SB),NOSPLIT,$0 + BR ·cos(SB) + +TEXT ·Sqrt(SB),NOSPLIT,$0 + BR ·sqrt(SB) + +TEXT ·Tan(SB),NOSPLIT,$0 + BR ·tan(SB) |