summaryrefslogtreecommitdiff
path: root/sysdeps/ia64/fpu/s_modfl.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ia64/fpu/s_modfl.S')
-rw-r--r--sysdeps/ia64/fpu/s_modfl.S49
1 files changed, 28 insertions, 21 deletions
diff --git a/sysdeps/ia64/fpu/s_modfl.S b/sysdeps/ia64/fpu/s_modfl.S
index eaf410cb6c..b5eb509adf 100644
--- a/sysdeps/ia64/fpu/s_modfl.S
+++ b/sysdeps/ia64/fpu/s_modfl.S
@@ -1,10 +1,10 @@
.file "modfl.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,17 +35,15 @@
//
// 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
-// 05/30/00 Fixed bug for exponent 0x1003e
+// 2/02/00: Initial version
+// 4/04/00: Improved speed, corrected result for NaN input
+// 5/30/00 Fixed bug for exponent 0x1003e
// 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
//==============================================================
@@ -94,6 +92,8 @@
// p13 --------------------------------------------------->|
//
+#include "libm_support.h"
+
// floating-point registers used:
MODF_NORM_F8 = f9
MODF_FRACTION_PART = f10
@@ -110,17 +110,23 @@ modf_exp = r18
// r34 = iptr
+.align 32
+.global modfl#
+
.section .text
-GLOBAL_LIBM_ENTRY(modfl)
+.proc modfl#
+.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
+modfl:
{ .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
@@ -165,10 +171,10 @@ GLOBAL_LIBM_ENTRY(modfl)
{ .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
@@ -178,7 +184,7 @@ MODF_COMMON:
// For HUGE set integer part to normalized input
{ .mfi
nop.m 999
-(p9) fnorm.s0 MODF_INTEGER_PART = MODF_NORM_F8
+(p9) fnorm MODF_INTEGER_PART = MODF_NORM_F8
nop.i 999 ;;
}
@@ -190,7 +196,7 @@ MODF_COMMON:
}
{ .mfi
nop.m 999
-(p11) fnorm.s0 f8 = MODF_NORM_F8
+(p11) fnorm f8 = MODF_NORM_F8
nop.i 999 ;;
}
@@ -231,7 +237,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 ;;
}
@@ -248,7 +254,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
@@ -267,7 +273,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(modfl)
+.endp modfl
+ASM_SIZE_DIRECTIVE(modfl)