aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ia64/fpu/e_atan2f.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ia64/fpu/e_atan2f.S')
-rw-r--r--sysdeps/ia64/fpu/e_atan2f.S86
1 files changed, 33 insertions, 53 deletions
diff --git a/sysdeps/ia64/fpu/e_atan2f.S b/sysdeps/ia64/fpu/e_atan2f.S
index 03a4fed..67618f0 100644
--- a/sysdeps/ia64/fpu/e_atan2f.S
+++ b/sysdeps/ia64/fpu/e_atan2f.S
@@ -1,10 +1,10 @@
.file "atan2f.s"
-// Copyright (C) 2000, 2001, Intel Corporation
+
+// Copyright (c) 2000 - 2003, Intel Corporation
// All rights reserved.
//
-// Contributed 6/1/2000 by John Harrison, Ted Kubaska, Bob Norin, Shane Story,
-// and Ping Tak Peter Tang of the Computational Software Lab, Intel Corporation.
+// Contributed 2000 by the Intel Numerics Group, Intel Corporation
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -20,7 +20,7 @@
// * The name of Intel Corporation may not be used to endorse or promote
// products derived from this software without specific prior written
// permission.
-//
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -35,18 +35,21 @@
//
// Intel Corporation is the author of this code, and requests that all
// problem reports or change requests be submitted to it directly at
-// http://developer.intel.com/opensource.
+// http://www.intel.com/software/products/opensource/libraries/num.htm.
// History
//==============================================================
-// 6/01/00 Initial version
-// 8/15/00 Bundle added after call to __libm_error_support to properly
+// 06/01/00 Initial version
+// 08/15/00 Bundle added after call to __libm_error_support to properly
// set [the previously overwritten] GR_Parameter_RESULT.
-// 8/17/00 Changed predicate register macro-usage to direct predicate
+// 08/17/00 Changed predicate register macro-usage to direct predicate
// names due to an assembler bug.
-// 1/05/01 Fixed flag settings for denormal input.
-// 1/19/01 Added documentation
-// 1/30/01 Improved speed
+// 01/05/01 Fixed flag settings for denormal input.
+// 01/19/01 Added documentation
+// 01/30/01 Improved speed
+// 02/06/02 Corrected .section statement
+// 05/20/02 Cleaned up namespace and sf0 syntax
+// 02/06/03 Reordered header: .section, .global, .proc, .align
// Description
//=========================================
@@ -226,7 +229,6 @@
// atan2f(+-0/+-0) sets single error tag to 38
// These are domain errors.
-#include "libm_support.h"
//
// Assembly macros
@@ -324,22 +326,20 @@ atan2f_poly_atan_U = f88
//atan2f_Pred_Xneg = p9 // x < 0
-.data
+RODATA
.align 16
-atan2f_coef_table1:
-ASM_TYPE_DIRECTIVE(atan2f_coef_table1,@object)
+LOCAL_OBJECT_START(atan2f_coef_table1)
data8 0xBFD5555512191621 // p1
data8 0x3F522E5D33BC9BAA // p10
data8 0xBFA6E10BA401393F // p7
data8 0x3FB142A73D7C54E3 // p6
data8 0xBFC2473C5145EE38 // p3
data8 0x3FC9997E7AFBFF4E // p2
-ASM_SIZE_DIRECTIVE(atan2f_coef_table1)
+LOCAL_OBJECT_END(atan2f_coef_table1)
-atan2f_coef_table2:
-ASM_TYPE_DIRECTIVE(atan2f_coef_table2,@object)
+LOCAL_OBJECT_START(atan2f_coef_table2)
data8 0xBF7DEAADAA336451 // p9
data8 0x3F97105B4160F86B // p8
data8 0xBFB68EED6A8CFA32 // p5
@@ -348,29 +348,12 @@ data8 0x3ff921fb54442d18 // pi/2
data8 0x400921fb54442d18 // pi
data8 0x3fe921fb54442d18 // pi/4
data8 0x4002d97c7f3321d2 // 3pi/4
-ASM_SIZE_DIRECTIVE(atan2f_coef_table2)
-
+LOCAL_OBJECT_END(atan2f_coef_table2)
-.global atan2f
-#ifdef _LIBC
-.global __atan2f
-.global __ieee754_atan2f
-#endif
-.text
-.align 32
-
-atan2f:
-.proc atan2f
-#ifdef _LIBC
-.proc __atan2f
-__atan2f:
-.proc __ieee754_atan2f
-__ieee754_atan2f:
-#endif
-
-
+.section .text
+GLOBAL_IEEE754_ENTRY(atan2f)
{ .mfi
alloc r32 = ar.pfs,1,5,4,0
@@ -724,7 +707,7 @@ ATAN2F_XY_INF_NAN_ZERO:
}
{ .mfb
nop.m 999
-(p10) fma.s f8 = f9,f8,f0 // Result quietized y if y is nan
+(p10) fma.s.s0 f8 = f9,f8,f0 // Result quietized y if y is nan
(p10) br.ret.spnt b0 // Exit if y is nan
}
;;
@@ -737,7 +720,7 @@ ATAN2F_XY_INF_NAN_ZERO:
}
{ .mfb
nop.m 999
-(p12) fnorm.s f8 = f9 // Result quietized x if x is nan, y not nan
+(p12) fnorm.s.s0 f8 = f9 // Result quietized x if x is nan, y not nan
(p12) br.ret.spnt b0 // Exit if x is nan, y not nan
}
;;
@@ -757,7 +740,7 @@ ATAN2F_XY_INF_NAN_ZERO:
}
{ .mfb
nop.m 999
-(p7) fma.s f8 = atan2f_sgn_Y, atan2f_const_piby4,f0 // Result +-pi/4
+(p7) fma.s.s0 f8 = atan2f_sgn_Y, atan2f_const_piby4,f0 // Result +-pi/4
(p7) br.ret.spnt b0 // Exit if x +inf and y inf
}
;;
@@ -790,19 +773,19 @@ ATAN2F_XY_INF_NAN_ZERO:
}
{ .mfb
nop.m 999
-(p13) fma.s f8 = atan2f_sgn_Y, atan2f_const_piby2,f0 // Result +-pi/2
+(p13) fma.s.s0 f8 = atan2f_sgn_Y, atan2f_const_piby2,f0 // Result +-pi/2
(p13) br.ret.spnt b0 // Exit if x not -inf and y inf
}
;;
{ .mfi
nop.m 999
-(p14) fma.s f8 = atan2f_sgn_Y, atan2f_const_3piby4,f0 // Result +-3pi/4
+(p14) fma.s.s0 f8 = atan2f_sgn_Y, atan2f_const_3piby4,f0 // Result +-3pi/4
nop.i 999
}
{ .mfb
nop.m 999
-(p15) fma.s f8 = atan2f_sgn_Y, atan2f_const_pi,f0 // Result +-pi
+(p15) fma.s.s0 f8 = atan2f_sgn_Y, atan2f_const_pi,f0 // Result +-pi
(p11) br.ret.spnt b0 // Exit if x -inf
}
;;
@@ -829,31 +812,29 @@ ATAN2F_XY_INF_NAN_ZERO:
}
{ .mfb
nop.m 999
-(p9) fma.s f8 = atan2f_sgn_Y, atan2f_const_pi,f0 // x < 0, y 0, result +-pi
+(p9) fma.s.s0 f8 = atan2f_sgn_Y, atan2f_const_pi,f0 // x < 0, y 0, result +-pi
(p10) br.cond.spnt __libm_error_region // Branch if x zero and y zero
}
;;
{ .mfb
nop.m 999
-(p11) fma.s f8 = atan2f_sgn_Y, atan2f_const_piby2,f0 // x zero, y not zero
+(p11) fma.s.s0 f8 = atan2f_sgn_Y, atan2f_const_piby2,f0 // x zero, y not zero
br.ret.sptk b0 // Final special case exit
}
;;
-.endp atan2f
-ASM_SIZE_DIRECTIVE(atan2f)
+GLOBAL_IEEE754_END(atan2f)
-.proc __libm_error_region
-__libm_error_region:
+LOCAL_LIBM_ENTRY(__libm_error_region)
.prologue
mov GR_Parameter_TAG = 38
fclass.m p10,p11 = f9,0x5 // @zero | @pos
;;
(p10) fmerge.s f10 = f8, f0
-(p11) fma.s f10 = atan2f_sgn_Y, atan2f_const_pi,f0
+(p11) fma.s.s0 f10 = atan2f_sgn_Y, atan2f_const_pi,f0
;;
{ .mfi
@@ -913,8 +894,7 @@ __libm_error_region:
}
;;
-.endp __libm_error_region
-ASM_SIZE_DIRECTIVE(__libm_error_region)
+LOCAL_LIBM_END(__libm_error_region)
.type __libm_error_support#,@function
.global __libm_error_support#