diff options
author | Wilco Dijkstra <wdijkstr@arm.com> | 2021-01-07 15:26:26 +0000 |
---|---|---|
committer | Wilco Dijkstra <wdijkstr@arm.com> | 2021-01-07 15:26:26 +0000 |
commit | 9e97f239eae1f2b1d2e694d844c0f6fd7c4dd271 (patch) | |
tree | a9a2828381bf838da12fa738da4f1bda4bee161c /sysdeps/ieee754/dbl-64/s_totalordermag.c | |
parent | caa884dda78ff226243f8cb344915152052a5118 (diff) | |
download | glibc-9e97f239eae1f2b1d2e694d844c0f6fd7c4dd271.tar.gz glibc-9e97f239eae1f2b1d2e694d844c0f6fd7c4dd271.tar.xz glibc-9e97f239eae1f2b1d2e694d844c0f6fd7c4dd271.zip |
Remove dbl-64/wordsize-64 (part 2)
Remove the wordsize-64 implementations by merging them into the main dbl-64 directory. The second patch just moves all wordsize-64 files and removes a few wordsize-64 uses in comments and Implies files. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/ieee754/dbl-64/s_totalordermag.c')
-rw-r--r-- | sysdeps/ieee754/dbl-64/s_totalordermag.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/sysdeps/ieee754/dbl-64/s_totalordermag.c b/sysdeps/ieee754/dbl-64/s_totalordermag.c index e6efc387a2..fd8aade28c 100644 --- a/sysdeps/ieee754/dbl-64/s_totalordermag.c +++ b/sysdeps/ieee754/dbl-64/s_totalordermag.c @@ -1,4 +1,4 @@ -/* Total order operation on absolute values. dbl-64 version. +/* Total order operation on absolute values. Copyright (C) 2016-2021 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -18,8 +18,8 @@ #include <math.h> #include <math_private.h> -#include <libm-alias-double.h> #include <nan-high-order-bit.h> +#include <libm-alias-double.h> #include <stdint.h> #include <shlib-compat.h> #include <first-versions.h> @@ -27,25 +27,23 @@ int __totalordermag (const double *x, const double *y) { - uint32_t hx, hy; - uint32_t lx, ly; - EXTRACT_WORDS (hx, lx, *x); - EXTRACT_WORDS (hy, ly, *y); - hx &= 0x7fffffff; - hy &= 0x7fffffff; + uint64_t ix, iy; + EXTRACT_WORDS64 (ix, *x); + EXTRACT_WORDS64 (iy, *y); + ix &= 0x7fffffffffffffffULL; + iy &= 0x7fffffffffffffffULL; #if HIGH_ORDER_BIT_IS_SET_FOR_SNAN /* For the preferred quiet NaN convention, this operation is a comparison of the representations of the absolute values of the arguments. If both arguments are NaNs, invert the quiet/signaling bit so comparing that way works. */ - if ((hx > 0x7ff00000 || (hx == 0x7ff00000 && lx != 0)) - && (hy > 0x7ff00000 || (hy == 0x7ff00000 && ly != 0))) + if (ix > 0x7ff0000000000000ULL && iy > 0x7ff0000000000000ULL) { - hx ^= 0x00080000; - hy ^= 0x00080000; + ix ^= 0x0008000000000000ULL; + iy ^= 0x0008000000000000ULL; } #endif - return hx < hy || (hx == hy && lx <= ly); + return ix <= iy; } #ifdef SHARED # define CONCATX(x, y) x ## y |