Print this page
6648 illumos build should be explicit about C standards

*** 44,78 **** #define _LO_WORD(x) ((uint32_t *)&x)[0] #define _HI_WORD(x) ((uint32_t *)&x)[1] #define _HIER_WORD(x) ((uint32_t *)&x)[2] ! extern __inline__ double __inline_sqrt(double a) { double ret; __asm__ __volatile__("fsqrt\n\t" : "=t" (ret) : "0" (a) : "cc"); return (ret); } ! extern __inline__ double __ieee754_sqrt(double a) { return (__inline_sqrt(a)); } ! extern __inline__ float __inline_sqrtf(float a) { float ret; __asm__ __volatile__("fsqrt\n\t" : "=t" (ret) : "0" (a) : "cc"); return (ret); } ! extern __inline__ double __inline_rint(double a) { __asm__ __volatile__( "andl $0x7fffffff,%1\n\t" "cmpl $0x43300000,%1\n\t" --- 44,78 ---- #define _LO_WORD(x) ((uint32_t *)&x)[0] #define _HI_WORD(x) ((uint32_t *)&x)[1] #define _HIER_WORD(x) ((uint32_t *)&x)[2] ! extern __GNU_INLINE double __inline_sqrt(double a) { double ret; __asm__ __volatile__("fsqrt\n\t" : "=t" (ret) : "0" (a) : "cc"); return (ret); } ! extern __GNU_INLINE double __ieee754_sqrt(double a) { return (__inline_sqrt(a)); } ! extern __GNU_INLINE float __inline_sqrtf(float a) { float ret; __asm__ __volatile__("fsqrt\n\t" : "=t" (ret) : "0" (a) : "cc"); return (ret); } ! extern __GNU_INLINE double __inline_rint(double a) { __asm__ __volatile__( "andl $0x7fffffff,%1\n\t" "cmpl $0x43300000,%1\n\t"
*** 90,100 **** * 00 - 24 bits * 01 - reserved * 10 - 53 bits * 11 - 64 bits */ ! extern __inline__ int __swapRP(int i) { int ret; uint16_t cw; --- 90,100 ---- * 00 - 24 bits * 01 - reserved * 10 - 53 bits * 11 - 64 bits */ ! extern __GNU_INLINE int __swapRP(int i) { int ret; uint16_t cw;
*** 112,122 **** * 00 - Round to nearest, with even preferred * 01 - Round down * 10 - Round up * 11 - Chop */ ! extern __inline__ enum fp_direction_type __swap87RD(enum fp_direction_type i) { int ret; uint16_t cw; --- 112,122 ---- * 00 - Round to nearest, with even preferred * 01 - Round down * 10 - Round up * 11 - Chop */ ! extern __GNU_INLINE enum fp_direction_type __swap87RD(enum fp_direction_type i) { int ret; uint16_t cw;
*** 128,138 **** __asm__ __volatile__("fldcw %0\n\t" : : "m" (cw)); return (ret); } ! extern __inline__ double ceil(double d) { /* * Let's set a Rounding Control (RC) bits from x87 FPU Control Word * to fp_positive and save old bits in rd. --- 128,138 ---- __asm__ __volatile__("fldcw %0\n\t" : : "m" (cw)); return (ret); } ! extern __GNU_INLINE double ceil(double d) { /* * Let's set a Rounding Control (RC) bits from x87 FPU Control Word * to fp_positive and save old bits in rd.
*** 155,165 **** __swap87RD(rd); return (d); } ! extern __inline__ double copysign(double d1, double d2) { __asm__ __volatile__( "andl $0x7fffffff,%0\n\t" /* %0 <-- hi_32(abs(d)) */ "andl $0x80000000,%1\n\t" /* %1[31] <-- sign_bit(d2) */ --- 155,165 ---- __swap87RD(rd); return (d); } ! extern __GNU_INLINE double copysign(double d1, double d2) { __asm__ __volatile__( "andl $0x7fffffff,%0\n\t" /* %0 <-- hi_32(abs(d)) */ "andl $0x80000000,%1\n\t" /* %1[31] <-- sign_bit(d2) */
*** 169,200 **** : "cc"); return (d1); } ! extern __inline__ double fabs(double d) { __asm__ __volatile__("fabs\n\t" : "+t" (d) : : "cc"); return (d); } ! extern __inline__ float fabsf(float d) { __asm__ __volatile__("fabs\n\t" : "+t" (d) : : "cc"); return (d); } ! extern __inline__ long double fabsl(long double d) { __asm__ __volatile__("fabs\n\t" : "+t" (d) : : "cc"); return (d); } ! extern __inline__ int finite(double d) { int ret = _HI_WORD(d); __asm__ __volatile__( --- 169,200 ---- : "cc"); return (d1); } ! extern __GNU_INLINE double fabs(double d) { __asm__ __volatile__("fabs\n\t" : "+t" (d) : : "cc"); return (d); } ! extern __GNU_INLINE float fabsf(float d) { __asm__ __volatile__("fabs\n\t" : "+t" (d) : : "cc"); return (d); } ! extern __GNU_INLINE long double fabsl(long double d) { __asm__ __volatile__("fabs\n\t" : "+t" (d) : : "cc"); return (d); } ! extern __GNU_INLINE int finite(double d) { int ret = _HI_WORD(d); __asm__ __volatile__(
*** 206,216 **** : : "cc"); return (ret); } ! extern __inline__ double floor(double d) { short rd = __swap87RD(fp_negative); __asm__ __volatile__("frndint" : "+t" (d), "+r" (rd) : : "cc"); --- 206,216 ---- : : "cc"); return (ret); } ! extern __GNU_INLINE double floor(double d) { short rd = __swap87RD(fp_negative); __asm__ __volatile__("frndint" : "+t" (d), "+r" (rd) : : "cc");
*** 221,231 **** /* * branchless __isnan * ((0x7ff00000-[((lx|-lx)>>31)&1]|ahx)>>31)&1 = 1 iff x is NaN */ ! extern __inline__ int isnan(double d) { int ret; __asm__ __volatile__( --- 221,231 ---- /* * branchless __isnan * ((0x7ff00000-[((lx|-lx)>>31)&1]|ahx)>>31)&1 = 1 iff x is NaN */ ! extern __GNU_INLINE int isnan(double d) { int ret; __asm__ __volatile__(
*** 243,253 **** : "ecx"); return (ret); } ! extern __inline__ int isnanf(float f) { __asm__ __volatile__( "andl $0x7fffffff,%0\n\t" "negl %0\n\t" --- 243,253 ---- : "ecx"); return (ret); } ! extern __GNU_INLINE int isnanf(float f) { __asm__ __volatile__( "andl $0x7fffffff,%0\n\t" "negl %0\n\t"
*** 258,273 **** : "cc"); return (f); } ! extern __inline__ double rint(double a) { return (__inline_rint(a)); } ! extern __inline__ double scalbn(double d, int n) { double dummy; __asm__ __volatile__( --- 258,273 ---- : "cc"); return (f); } ! extern __GNU_INLINE double rint(double a) { return (__inline_rint(a)); } ! extern __GNU_INLINE double scalbn(double d, int n) { double dummy; __asm__ __volatile__(
*** 279,320 **** : "cc"); return (d); } ! extern __inline__ int signbit(double d) { return (_HI_WORD(d) >> 31); } ! extern __inline__ int signbitf(float f) { return ((*(uint32_t *)&f) >> 31); } ! extern __inline__ double sqrt(double d) { return (__inline_sqrt(d)); } ! extern __inline__ float sqrtf(float f) { return (__inline_sqrtf(f)); } ! extern __inline__ long double sqrtl(long double ld) { __asm__ __volatile__("fsqrt" : "+t" (ld) : : "cc"); return (ld); } ! extern __inline__ int isnanl(long double ld) { int ret = _HIER_WORD(ld); __asm__ __volatile__( --- 279,320 ---- : "cc"); return (d); } ! extern __GNU_INLINE int signbit(double d) { return (_HI_WORD(d) >> 31); } ! extern __GNU_INLINE int signbitf(float f) { return ((*(uint32_t *)&f) >> 31); } ! extern __GNU_INLINE double sqrt(double d) { return (__inline_sqrt(d)); } ! extern __GNU_INLINE float sqrtf(float f) { return (__inline_sqrtf(f)); } ! extern __GNU_INLINE long double sqrtl(long double ld) { __asm__ __volatile__("fsqrt" : "+t" (ld) : : "cc"); return (ld); } ! extern __GNU_INLINE int isnanl(long double ld) { int ret = _HIER_WORD(ld); __asm__ __volatile__(