about summary refs log tree commit diff
path: root/sysdeps/ia64/fpu/e_remainderf.S
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
commit0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch)
tree2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /sysdeps/ia64/fpu/e_remainderf.S
parent7d58530341304d403a6626d7f7a1913165fe2f32 (diff)
downloadglibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.xz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip
2.5-18.1
Diffstat (limited to 'sysdeps/ia64/fpu/e_remainderf.S')
-rw-r--r--sysdeps/ia64/fpu/e_remainderf.S113
1 files changed, 49 insertions, 64 deletions
diff --git a/sysdeps/ia64/fpu/e_remainderf.S b/sysdeps/ia64/fpu/e_remainderf.S
index 40f9b32921..0e9bedd652 100644
--- a/sysdeps/ia64/fpu/e_remainderf.S
+++ b/sysdeps/ia64/fpu/e_remainderf.S
@@ -1,11 +1,10 @@
-  .file "remainderf.asm"
-// Copyright (C) 2000, 2001, Intel Corporation
+.file "remainderf.s"
+
+
+// Copyright (c) 2000 - 2003, Intel Corporation
 // All rights reserved.
 //
-// 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.
+// 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
@@ -21,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
@@ -36,17 +35,19 @@
 //
 // 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
 //====================================================================
-// 2/02/00 Initial version
-// 3/02/00 New algorithm  
-// 4/04/00 Unwind support added
-// 7/21/00 Fixed quotient=2^{24*m+23} bug
-// 8/15/00  Bundle added after call to __libm_error_support to properly
+// 02/02/00 Initial version
+// 03/02/00 New algorithm  
+// 04/04/00 Unwind support added
+// 07/21/00 Fixed quotient=2^{24*m+23} bug
+// 08/15/00 Bundle added after call to __libm_error_support to properly
 //          set [the previously overwritten] GR_Parameter_RESULT.
-//11/29/00  Set FR_Y to f9
+// 11/29/00 Set FR_Y to f9
+// 05/20/02 Cleaned up namespace and sf0 syntax
+// 02/10/03 Reordered header: .section, .global, .proc, .align
 //
 // API
 //====================================================================
@@ -78,9 +79,6 @@
 //====================================================================
 // a=+/- Inf, or b=+/-0: return NaN, call libm_error_support
 // a=NaN or b=NaN: return NaN
-
-#include "libm_support.h"
-
 //
 // Registers used
 //====================================================================
@@ -89,8 +87,6 @@
 // Floating point registers: f6-f15
 //
 
-.section .text
-
 GR_SAVE_B0                    = r33
 GR_SAVE_PFS                   = r34
 GR_SAVE_GP                    = r35 
@@ -106,17 +102,9 @@ FR_Y             = f9
 FR_RESULT        = f8
 
 
-  .proc  remainderf#
-  .align 32
-  .global remainderf#
-  .align 32
+.section .text
+GLOBAL_IEEE754_ENTRY(remainderf)
 
-remainderf:
-#ifdef _LIBC
-.global __remainderf
-.type __remainderf,@function
-__remainderf:
-#endif
 // inputs in f8, f9
 // result in f8
 
@@ -141,7 +129,7 @@ __remainderf:
 // Y +-NAN, +-inf, +-0?     p11
 { .mfi
       nop.m 999
-(p0)  fclass.m.unc  p11,p0 = f9, 0xe7           
+      fclass.m.unc  p11,p0 = f9, 0xe7           
       nop.i 999
 }
 // qnan snan inf norm     unorm 0 -+
@@ -150,7 +138,7 @@ __remainderf:
 // X +-NAN, +-inf, ?        p9
 { .mfi
       nop.m 999
-(p0)  fclass.m.unc  p9,p0 = f8, 0xe3           
+      fclass.m.unc  p9,p0 = f8, 0xe3           
       nop.i 999;; 
 }
 
@@ -168,8 +156,8 @@ __remainderf:
   nop.i 0;;
 } 
 {.bbb
-  (p9) br.cond.spnt L(FREM_X_NAN_INF)
-  (p11) br.cond.spnt L(FREM_Y_NAN_INF_ZERO)
+  (p9) br.cond.spnt FREM_X_NAN_INF
+  (p11) br.cond.spnt FREM_Y_NAN_INF_ZERO
   nop.b 0
 }  {.mfi
    nop.m 0
@@ -179,7 +167,7 @@ __remainderf:
 } 
 
 .align 32
-L(remloop24): 
+remloop24: 
   { .mfi
   // f12=2^{24}-2
   setf.s f12=r3
@@ -347,7 +335,7 @@ L(remloop24):
   // (p9) set r=r2 (new a, if not last iteration)
   // (p10) new a =r
   (p10) mov f13=f6
-  (p12) br.cond.sptk L(remloop24);;
+  (p12) br.cond.sptk remloop24;;
 } 
 
 // last iteration
@@ -408,7 +396,7 @@ L(remloop24):
 }
 
 
-L(FREM_X_NAN_INF): 
+FREM_X_NAN_INF: 
 
 // Y zero ?
 {.mfi 
@@ -425,19 +413,19 @@ L(FREM_X_NAN_INF):
   nop.m 0
   nop.i 0
   // if Y zero
-  (p11) br.cond.spnt L(FREM_Y_ZERO);;                        
+  (p11) br.cond.spnt FREM_Y_ZERO;;                        
 }
 
 // X infinity? Return QNAN indefinite
 { .mfi
       nop.m 999
-(p0)  fclass.m.unc  p8,p0 = f8, 0x23 
+      fclass.m.unc  p8,p0 = f8, 0x23 
       nop.i 999
 }
 // X infinity? Return QNAN indefinite
 { .mfi
       nop.m 999
-(p0)  fclass.m.unc  p11,p0 = f8, 0x23 
+      fclass.m.unc  p11,p0 = f8, 0x23 
       nop.i 999;; 
 }
 // Y NaN ?
@@ -465,14 +453,14 @@ L(FREM_X_NAN_INF):
 }
 { .mfi
       nop.m 999
-(p8) fma.s f8=f8,f1,f0                     
+(p8) fma.s.s0 f8=f8,f1,f0                     
 	  nop.i 0 ;;                        
 }
 
 { .mfb
       nop.m 999
       frcpa.s0 f8,p7=f8,f9                     
-	  (p11) br.cond.spnt L(EXP_ERROR_RETURN);;                        
+	  (p11) br.cond.spnt EXP_ERROR_RETURN;;                        
 }
 { .mib
 	nop.m 0
@@ -481,35 +469,35 @@ L(FREM_X_NAN_INF):
 }
 
 
-L(FREM_Y_NAN_INF_ZERO): 
+FREM_Y_NAN_INF_ZERO: 
 
 // Y INF
 { .mfi
       nop.m 999
-(p0)  fclass.m.unc  p7,p0 = f9, 0x23           
+      fclass.m.unc  p7,p0 = f9, 0x23           
       nop.i 999 ;;
 }
 
 { .mfb
       nop.m 999
-(p7)  fma.s f8=f8,f1,f0                     
+(p7)  fma.s.s0 f8=f8,f1,f0                     
 (p7)  br.ret.spnt    b0 ;;                        
 }
 
 // Y NAN?
 { .mfi
       nop.m 999
-(p0)  fclass.m.unc  p9,p0 = f9, 0xc3           
+      fclass.m.unc  p9,p0 = f9, 0xc3           
       nop.i 999 ;;
 }
 
 { .mfb
       nop.m 999
-(p9)  fma.s f8=f9,f1,f0                     
+(p9)  fma.s.s0 f8=f9,f1,f0                     
 (p9)  br.ret.spnt    b0 ;;                        
 }
 
-L(FREM_Y_ZERO):
+FREM_Y_ZERO:
 // Y zero? Must be zero at this point
 // because it is the only choice left.
 // Return QNAN indefinite
@@ -517,7 +505,7 @@ L(FREM_Y_ZERO):
 // X NAN?
 { .mfi
       nop.m 999
-(p0)  fclass.m.unc  p9,p10 = f8, 0xc3           
+      fclass.m.unc  p9,p10 = f8, 0xc3           
       nop.i 999 ;;
 }
 { .mfi
@@ -528,47 +516,42 @@ L(FREM_Y_ZERO):
 
 {.mfi
  nop.m 999
- (p9) frcpa f11,p7=f8,f0
+ (p9) frcpa.s0 f11,p7=f8,f0
  nop.i 0;;
 }
 
 { .mfi
       nop.m 999
-(p10)  frcpa         f11,p7 = f0,f0           
+(p10)  frcpa.s0         f11,p7 = f0,f0           
 nop.i 999;;
 }
 
 { .mfi
       nop.m 999
-(p0)  fmerge.s      f10 = f8, f8             
+      fmerge.s      f10 = f8, f8             
       nop.i 999
 }
 
 { .mfi
       nop.m 999
-(p0)  fma.s f8=f11,f1,f0                     
+      fma.s.s0 f8=f11,f1,f0                     
       nop.i 999
 }
 
 
-L(EXP_ERROR_RETURN): 
+EXP_ERROR_RETURN: 
 
 { .mib
-(p0)  mov   GR_Parameter_TAG = 125                                
+      mov   GR_Parameter_TAG = 125                                
 	  nop.i 999
-(p0)  br.sptk __libm_error_region;; 
+      br.sptk __libm_error_region;; 
 }
 
-.endp remainderf
-ASM_SIZE_DIRECTIVE(remainderf)
-#ifdef _LIBC
-ASM_SIZE_DIRECTIVE(__remainderf)
-#endif
+GLOBAL_IEEE754_END(remainderf)
 
 
 
-.proc __libm_error_region
-__libm_error_region:
+LOCAL_LIBM_ENTRY(__libm_error_region)
 .prologue
 { .mfi
         add   GR_Parameter_Y=-32,sp             // Parameter 2 value
@@ -616,9 +599,11 @@ __libm_error_region:
         br.ret.sptk     b0                     // Return
 };; 
 
-.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#
+
+
+