Print this page
6648 illumos build should be explicit about C standards
*** 43,71 ****
#endif
#include <sys/types.h>
#include <sys/ieeefp.h>
! extern __inline__ float
__inline_sqrtf(float a)
{
float ret;
__asm__ __volatile__("sqrtss %1, %0\n\t" : "=x" (ret) : "x" (a));
return (ret);
}
! extern __inline__ double
__inline_sqrt(double a)
{
double ret;
__asm__ __volatile__("sqrtsd %1, %0\n\t" : "=x" (ret) : "x" (a));
return (ret);
}
! extern __inline__ double
__ieee754_sqrt(double a)
{
return (__inline_sqrt(a));
}
--- 43,71 ----
#endif
#include <sys/types.h>
#include <sys/ieeefp.h>
! extern __GNU_INLINE float
__inline_sqrtf(float a)
{
float ret;
__asm__ __volatile__("sqrtss %1, %0\n\t" : "=x" (ret) : "x" (a));
return (ret);
}
! extern __GNU_INLINE double
__inline_sqrt(double a)
{
double ret;
__asm__ __volatile__("sqrtsd %1, %0\n\t" : "=x" (ret) : "x" (a));
return (ret);
}
! extern __GNU_INLINE double
__ieee754_sqrt(double a)
{
return (__inline_sqrt(a));
}
*** 73,83 ****
* 00 - 24 bits
* 01 - reserved
* 10 - 53 bits
* 11 - 64 bits
*/
! extern __inline__ int
__swapRP(int i)
{
int ret;
uint16_t cw;
--- 73,83 ----
* 00 - 24 bits
* 01 - reserved
* 10 - 53 bits
* 11 - 64 bits
*/
! extern __GNU_INLINE int
__swapRP(int i)
{
int ret;
uint16_t cw;
*** 95,105 ****
* 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;
--- 95,105 ----
* 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;
*** 111,121 ****
__asm__ __volatile__("fldcw %0\n\t" : : "m" (cw));
return (ret);
}
! extern __inline__ int
abs(int i)
{
int ret;
__asm__ __volatile__(
"movl %1, %0\n\t"
--- 111,121 ----
__asm__ __volatile__("fldcw %0\n\t" : : "m" (cw));
return (ret);
}
! extern __GNU_INLINE int
abs(int i)
{
int ret;
__asm__ __volatile__(
"movl %1, %0\n\t"
*** 125,135 ****
:
: "cc");
return (ret);
}
! extern __inline__ double
copysign(double d1, double d2)
{
double tmpd;
__asm__ __volatile__(
--- 125,135 ----
:
: "cc");
return (ret);
}
! extern __GNU_INLINE double
copysign(double d1, double d2)
{
double tmpd;
__asm__ __volatile__(
*** 141,151 ****
: "x" (d2), "r" (0x7fffffffffffffff));
return (d1);
}
! extern __inline__ double
fabs(double d)
{
double tmp;
__asm__ __volatile__(
--- 141,151 ----
: "x" (d2), "r" (0x7fffffffffffffff));
return (d1);
}
! extern __GNU_INLINE double
fabs(double d)
{
double tmp;
__asm__ __volatile__(
*** 155,176 ****
: "r" (0x7fffffffffffffff));
return (d);
}
! extern __inline__ float
fabsf(float d)
{
__asm__ __volatile__(
"andpd %1, %0"
: "+x" (d)
: "x" (0x7fffffff));
return (d);
}
! extern __inline__ int
finite(double d)
{
long ret = 0x7fffffffffffffff;
uint64_t tmp;
--- 155,176 ----
: "r" (0x7fffffffffffffff));
return (d);
}
! extern __GNU_INLINE float
fabsf(float d)
{
__asm__ __volatile__(
"andpd %1, %0"
: "+x" (d)
: "x" (0x7fffffff));
return (d);
}
! extern __GNU_INLINE int
finite(double d)
{
long ret = 0x7fffffffffffffff;
uint64_t tmp;
*** 185,195 ****
: "cc");
return (ret);
}
! extern __inline__ int
signbit(double d)
{
long ret;
__asm__ __volatile__(
"movmskpd %1, %0\n\t"
--- 185,195 ----
: "cc");
return (ret);
}
! extern __GNU_INLINE int
signbit(double d)
{
long ret;
__asm__ __volatile__(
"movmskpd %1, %0\n\t"
*** 198,214 ****
: "x" (d)
: "cc");
return (ret);
}
! extern __inline__ double
sqrt(double d)
{
return (__inline_sqrt(d));
}
! extern __inline__ float
sqrtf(float f)
{
return (__inline_sqrtf(f));
}
--- 198,214 ----
: "x" (d)
: "cc");
return (ret);
}
! extern __GNU_INLINE double
sqrt(double d)
{
return (__inline_sqrt(d));
}
! extern __GNU_INLINE float
sqrtf(float f)
{
return (__inline_sqrtf(f));
}