about summary refs log tree commit diff
path: root/sysdeps/ia64/fpu/e_hypot.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ia64/fpu/e_hypot.S')
-rw-r--r--sysdeps/ia64/fpu/e_hypot.S75
1 files changed, 43 insertions, 32 deletions
diff --git a/sysdeps/ia64/fpu/e_hypot.S b/sysdeps/ia64/fpu/e_hypot.S
index 36cfd1e667..113aac3461 100644
--- a/sysdeps/ia64/fpu/e_hypot.S
+++ b/sysdeps/ia64/fpu/e_hypot.S
@@ -1,10 +1,11 @@
-.file "hypot.s"
+.file "hypot.asm"
 
-
-// Copyright (c) 2000 - 2003, Intel Corporation
+// Copyright (C) 2000, 2001, Intel Corporation
 // All rights reserved.
-//
-// Contributed 2000 by the Intel Numerics Group, Intel Corporation
+// 
+// Contributed 2/2/2000 by John Harrison, Cristina Iordache, Ted Kubaska, 
+// Bob Norin, Shane Story, and Ping Tak Peter Tang of the 
+// Computational Software Lab, Intel Corporation.
 //
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are
@@ -20,7 +21,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,27 +36,24 @@
 // 
 // Intel Corporation is the author of this code, and requests that all
 // problem reports or change requests be submitted to it directly at 
-// http://www.intel.com/software/products/opensource/libraries/num.htm.
+// http://developer.intel.com/opensource.
 //
-//*********************************************************************
+// *********************************************************************
 //
 // History: 
-// 02/02/00 hand-optimized
-// 04/04/00 Unwind support added
-// 06/20/00 new version
-// 08/15/00 Bundle added after call to __libm_error_support to properly
+// 2/02/00  hand-optimized
+// 4/04/00  Unwind support added
+// 6/20/00  new version
+// 8/15/00  Bundle added after call to __libm_error_support to properly
 //          set [the previously overwritten] GR_Parameter_RESULT.
-// 05/20/02 Cleaned up namespace and sf0 syntax
-// 02/10/03 Reordered header: .section, .global, .proc, .align
-// 04/17/03 Added missing mutex directive
 //
-//*********************************************************************
+// *********************************************************************
 //                           ___________
 // Function:   hypot(x,y) = |(x^2 + y^2) = for double precision values
 //             x and y
 //             Also provides cabs functionality.
 //
-//*********************************************************************
+// *********************************************************************
 //
 // Resources Used:
 //
@@ -70,7 +68,7 @@
 //
 //    Predicate Registers:      p6 - p10
 //
-//*********************************************************************
+// *********************************************************************
 //
 // IEEE Special Conditions:
 //
@@ -80,7 +78,7 @@
 //    hypot(QNaN and anything) = QNaN
 //    hypot(SNaN and anything ) = QNaN
 //
-//*********************************************************************
+// *********************************************************************
 //
 // Implementation:
 //  x2 = x * x   in double-extended
@@ -88,7 +86,9 @@
 //  temp = x2 + y2   in double-extended
 //  sqrt(temp) rounded to double 
 //
-//*********************************************************************
+// *********************************************************************
+
+#include "libm_support.h"
 
 GR_SAVE_PFS         = r33
 GR_SAVE_B0          = r34
@@ -103,12 +103,23 @@ FR_Y                = f33
 FR_RESULT           = f8
 
 .section .text
-
-LOCAL_LIBM_ENTRY(cabs)
-LOCAL_LIBM_END(cabs)
-
-GLOBAL_IEEE754_ENTRY(hypot)
-
+#ifndef _LIBC
+.proc cabs#
+.global cabs#
+cabs: 
+.endp cabs
+#endif
+.proc hypot#
+.global hypot#
+.align 64 
+
+hypot:
+#ifdef _LIBC
+.global __hypot
+__hypot:
+.global __ieee754_hypot
+__ieee754_hypot:
+#endif 
 {.mfi
   alloc r32= ar.pfs,0,4,4,0
   // Compute x*x
@@ -210,7 +221,6 @@ GLOBAL_IEEE754_ENTRY(hypot)
   mov r2=0x107fb;;
 }
 
-.pred.rel "mutex",p7,p8
 {.mfb
   nop.m 0
   // if f8=Infinity or f9=Zero, return |f8|
@@ -384,9 +394,11 @@ GLOBAL_IEEE754_ENTRY(hypot)
 	 // No overflow
 (p9) br.ret.sptk b0;; 
 }
-GLOBAL_IEEE754_END(hypot)
+.endp hypot
+ASM_SIZE_DIRECTIVE(hypot)
 
-LOCAL_LIBM_ENTRY(__libm_error_region)
+.proc __libm_error_region
+__libm_error_region:
 .prologue
 { .mfi
         add   GR_Parameter_Y=-32,sp             // Parameter 2 value
@@ -433,8 +445,7 @@ LOCAL_LIBM_ENTRY(__libm_error_region)
         mov   ar.pfs = GR_SAVE_PFS             // Restore ar.pfs
         br.ret.sptk     b0                     // Return
 };;
-LOCAL_LIBM_END(__libm_error_region#)
+.endp __libm_error_region
+ASM_SIZE_DIRECTIVE(__libm_error_region) 
 .type   __libm_error_support#,@function
 .global __libm_error_support#
-
-