1diff --git a/modules/fdlibm/src/math_private.h b/modules/fdlibm/src/math_private.h 2--- a/modules/fdlibm/src/math_private.h 3+++ b/modules/fdlibm/src/math_private.h 4@@ -617,95 +617,32 @@ rnint(double x) 5 * magic number would need to be variable. Assuming that the 6 * rounding precision is always the default is too fragile. This 7 * and many other complications will move when the default is 8 * changed to FP_PE. 9 */ 10 return ((double)(x + 0x1.8p52) - 0x1.8p52); 11 } 12 13-static inline float 14-rnintf(__float_t x) 15-{ 16- /* 17- * As for rnint(), except we could just call that to handle the 18- * extra precision case, usually without losing efficiency. 19- */ 20- return ((float)(x + 0x1.8p23F) - 0x1.8p23F); 21-} 22- 23-#ifdef LDBL_MANT_DIG 24-/* 25- * The complications for extra precision are smaller for rnintl() since it 26- * can safely assume that the rounding precision has been increased from 27- * its default to FP_PE on x86. We don't exploit that here to get small 28- * optimizations from limiting the rangle to double. We just need it for 29- * the magic number to work with long doubles. ld128 callers should use 30- * rnint() instead of this if possible. ld80 callers should prefer 31- * rnintl() since for amd64 this avoids swapping the register set, while 32- * for i386 it makes no difference (assuming FP_PE), and for other arches 33- * it makes little difference. 34- */ 35-static inline long double 36-rnintl(long double x) 37-{ 38- return (x + __CONCAT(0x1.8p, LDBL_MANT_DIG) / 2 - 39- __CONCAT(0x1.8p, LDBL_MANT_DIG) / 2); 40-} 41-#endif /* LDBL_MANT_DIG */ 42- 43 /* 44 * irint() and i64rint() give the same result as casting to their integer 45 * return type provided their arg is a floating point integer. They can 46 * sometimes be more efficient because no rounding is required. 47 */ 48 #if (defined(amd64) || defined(__i386__)) && defined(__GNUCLIKE_ASM) 49 #define irint(x) \ 50 (sizeof(x) == sizeof(float) && \ 51 sizeof(__float_t) == sizeof(long double) ? irintf(x) : \ 52 sizeof(x) == sizeof(double) && \ 53 sizeof(__double_t) == sizeof(long double) ? irintd(x) : \ 54 sizeof(x) == sizeof(long double) ? irintl(x) : (int)(x)) 55 #else 56 #define irint(x) ((int)(x)) 57 #endif 58 59-#define i64rint(x) ((int64_t)(x)) /* only needed for ld128 so not opt. */ 60- 61-#if defined(__i386__) && defined(__GNUCLIKE_ASM) 62-static __inline int 63-irintf(float x) 64-{ 65- int n; 66- 67- __asm("fistl %0" : "=m" (n) : "t" (x)); 68- return (n); 69-} 70- 71-static __inline int 72-irintd(double x) 73-{ 74- int n; 75- 76- __asm("fistl %0" : "=m" (n) : "t" (x)); 77- return (n); 78-} 79-#endif 80- 81-#if (defined(__amd64__) || defined(__i386__)) && defined(__GNUCLIKE_ASM) 82-static __inline int 83-irintl(long double x) 84-{ 85- int n; 86- 87- __asm("fistl %0" : "=m" (n) : "t" (x)); 88- return (n); 89-} 90-#endif 91- 92 #ifdef DEBUG 93 #if defined(__amd64__) || defined(__i386__) 94 #define breakpoint() asm("int $3") 95 #else 96 #include <signal.h> 97 98 #define breakpoint() raise(SIGTRAP) 99 #endif 100