[dev.power64] math: implement Abs, add power64/power64le forwarding assembly functions

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/119670043
This commit is contained in:
Shenghou Ma 2014-08-12 19:50:40 -04:00
parent ab29d5b4ae
commit e7e668d717
2 changed files with 105 additions and 0 deletions

View File

@ -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 "../../cmd/ld/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

View File

@ -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)