about summary refs log tree commit diff
path: root/sysdeps/ia64/fpu/s_modf.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ia64/fpu/s_modf.S')
-rw-r--r--sysdeps/ia64/fpu/s_modf.S47
1 files changed, 27 insertions, 20 deletions
diff --git a/sysdeps/ia64/fpu/s_modf.S b/sysdeps/ia64/fpu/s_modf.S
index 2008bbfc5c..e8e672adfe 100644
--- a/sysdeps/ia64/fpu/s_modf.S
+++ b/sysdeps/ia64/fpu/s_modf.S
@@ -1,10 +1,10 @@
 .file "modf.s"
 
-
-// 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, 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 +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,16 +35,14 @@
 // 
 // 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 Initial version
-// 04/04/00 Improved speed, corrected result for NaN input
+// 2/02/00: Initial version
+// 4/04/00: Improved speed, corrected result for NaN input
 // 12/22/00 Fixed so inexact flag is never set, and invalid is not set for 
 //            qnans nor for inputs larger than 2^63.
-// 05/20/02 Cleaned up namespace and sf0 syntax
-// 02/10/03 Reordered header: .section, .global, .proc, .align
 //
 // API
 //==============================================================
@@ -99,6 +97,8 @@
 //    p13 --------------------------------------------------->|
 //
 
+#include "libm_support.h"
+
 // floating-point registers used: 
 MODF_NORM_F8               = f9
 MODF_FRACTION_PART         = f10
@@ -115,17 +115,23 @@ modf_exp        = r18
 // r33 = iptr
      
 
+.align 32
+.global modf#
+
 .section .text
-GLOBAL_LIBM_ENTRY(modf)
+.proc  modf#
+.align 32
+
 
 // Main path is p9, p11, p8 FALSE and p12 TRUE
 
 // Assume input is normalized and get signexp
 // Normalize input just in case
 // Form exponent bias 
+modf: 
 { .mfi
       getf.exp  modf_signexp = f8
-      fnorm.s0          MODF_NORM_F8  = f8
+      fnorm          MODF_NORM_F8  = f8
       addl           modf_GR_FFFF  = 0xffff, r0
 }
 // Get integer part of input
@@ -170,10 +176,10 @@ GLOBAL_LIBM_ENTRY(modf)
 { .mfb
 (p10) cmp.ge.unc p9,p12  = modf_exp, modf_GR_no_frac
 (p6)  fclass.m.unc p6,p7 = f8, 0x23
-(p8)  br.cond.spnt MODF_DENORM ;;
+(p8)  br.cond.spnt L(MODF_DENORM) ;;
 }
 
-MODF_COMMON:
+L(MODF_COMMON):
 // For HUGE set fraction to signed 0
 { .mfi
       nop.m 999
@@ -183,7 +189,7 @@ MODF_COMMON:
 // For HUGE set integer part to normalized input
 { .mfi
       nop.m 999
-(p9)  fnorm.d.s0 MODF_INTEGER_PART = MODF_NORM_F8
+(p9)  fnorm.d MODF_INTEGER_PART = MODF_NORM_F8
       nop.i 999 ;;
 }
 
@@ -195,7 +201,7 @@ MODF_COMMON:
 }
 { .mfi
       nop.m 999
-(p11) fnorm.d.s0 f8 = MODF_NORM_F8
+(p11) fnorm.d f8 = MODF_NORM_F8
       nop.i 999 ;;
 }
 
@@ -236,7 +242,7 @@ MODF_COMMON:
 // For NORMAL test if fraction part is zero; if so append correct sign
 { .mfi
       nop.m 999
-(p12) fcmp.eq.unc.s0 p7,p0 = MODF_NORM_F8, MODF_INTEGER_PART
+(p12) fcmp.eq.unc p7,p0 = MODF_NORM_F8, MODF_INTEGER_PART
       nop.i 999 ;;
 }
 
@@ -253,7 +259,7 @@ MODF_COMMON:
       br.ret.sptk    b0 ;;
 }
 
-MODF_DENORM:
+L(MODF_DENORM):
 // If x unorm get signexp from normalized input
 // If x unorm get integer part from normalized input
 { .mfi
@@ -272,7 +278,8 @@ MODF_DENORM:
 { .mfb
 (p10) cmp.ge.unc p9,p12  = modf_exp, modf_GR_no_frac
       nop.f 999
-      br.cond.spnt MODF_COMMON ;;
+      br.cond.spnt L(MODF_COMMON) ;;
 }
 
-GLOBAL_LIBM_END(modf)
+.endp modf
+ASM_SIZE_DIRECTIVE(modf)