diff options
Diffstat (limited to 'sysdeps/ia64/fpu/s_nearbyintl.S')
-rw-r--r-- | sysdeps/ia64/fpu/s_nearbyintl.S | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/sysdeps/ia64/fpu/s_nearbyintl.S b/sysdeps/ia64/fpu/s_nearbyintl.S index 9c4c2e4f16..95ba6ab260 100644 --- a/sysdeps/ia64/fpu/s_nearbyintl.S +++ b/sysdeps/ia64/fpu/s_nearbyintl.S @@ -1,10 +1,11 @@ .file "nearbyintl.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 10/19/2000 by John Harrison, Cristina Iordache, Ted Kubaska, +// Bob Norin, Tom Rowan, 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,19 +36,20 @@ // // 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 //============================================================== -// 10/19/00 Created -// 02/08/01 Corrected behavior for all rounding modes. -// 05/20/02 Cleaned up namespace and sf0 syntax -// 02/10/03 Reordered header: .section, .global, .proc, .align +// 10/19/2000: Created +// 2/08/01 Corrected behavior for all rounding modes. //============================================================== // // API //============================================================== // long double nearbyintl(long double x) + +#include "libm_support.h" + // // general registers used: // @@ -109,8 +111,15 @@ NEARBYINT_SIGNED_FLOAT_INT_f8 = f12 // 1 1 1 0 0 1 11 0xe7 +.align 32 +.global nearbyintl# + .section .text -GLOBAL_LIBM_ENTRY(nearbyintl) +.proc nearbyintl# +.align 32 + + +nearbyintl: { .mfi mov nearbyint_GR_fpsr = ar40 // Read the fpsr--need to check rc.s0 @@ -133,7 +142,7 @@ GLOBAL_LIBM_ENTRY(nearbyintl) { .mfb nop.m 999 -(p6) fnorm.s0 f8 = f8 +(p6) fnorm f8 = f8 (p6) br.ret.spnt b0 // Exit if x nan, inf, zero ;; } @@ -171,11 +180,11 @@ GLOBAL_LIBM_ENTRY(nearbyintl) // rounding mode to that of s0 and repeat conversions. // Must merge the original sign for cases where the result is zero or the input // is the largest that still has a fraction (0x1007dfffffffffff) -NEARBYINT_COMMON: +L(NEARBYINT_COMMON): { .mfb cmp.ne p11,p0 = nearbyint_GR_rcs0, r0 (p6) fmerge.s NEARBYINT_SIGNED_FLOAT_INT_f8 = f8, NEARBYINT_FLOAT_INT_f8 -(p11) br.cond.spnt NEARBYINT_NOT_ROUND_NEAREST // Branch if not round to nearest +(p11) br.cond.spnt L(NEARBYINT_NOT_ROUND_NEAREST) // Branch if not round to nearest ;; } @@ -188,13 +197,13 @@ NEARBYINT_COMMON: { .mfb nop.m 999 -(p6) fnorm.s0 f8 = NEARBYINT_SIGNED_FLOAT_INT_f8 +(p6) fnorm f8 = NEARBYINT_SIGNED_FLOAT_INT_f8 br.ret.sptk b0 ;; } -NEARBYINT_NOT_ROUND_NEAREST: +L(NEARBYINT_NOT_ROUND_NEAREST): // Set rounding mode of s2 to that of s0 { .mfi mov nearbyint_GR_rcs0 = r0 // Clear so we don't come back here @@ -213,9 +222,10 @@ NEARBYINT_NOT_ROUND_NEAREST: { .mfb nop.m 999 fcvt.xf NEARBYINT_FLOAT_INT_f8 = NEARBYINT_INT_f8 - br.cond.sptk NEARBYINT_COMMON + br.cond.sptk L(NEARBYINT_COMMON) ;; } -GLOBAL_LIBM_END(nearbyintl) +.endp nearbyintl +ASM_SIZE_DIRECTIVE(nearbyintl) |