2011-10-17 Ulrich Drepper <drepper@gmail.com>
+ * sysdeps/x86_64/fpu/math_private.h: Relax asm requirements for
+ recently added interfaces.
+ * sysdeps/x86_64/fpu/bits/mathinline.h: Likewise.
+
* sysdeps/x86_64/fpu/math_private.h: Add some parenthesis to be safe
about macro parameter expansion.
__NTH (rint (double __x))
{
double __res;
- __asm ("roundsd $4, %1, %0" : "=x" (__res) : "x" (__x));
+ __asm ("roundsd $4, %1, %0" : "=x" (__res) : "xm" (__x));
return __res;
}
__MATH_INLINE float
__NTH (rintf (float __x))
{
float __res;
- __asm ("roundss $4, %1, %0" : "=x" (__res) : "x" (__x));
+ __asm ("roundss $4, %1, %0" : "=x" (__res) : "xm" (__x));
return __res;
}
__NTH (ceil (double __x))
{
double __res;
- __asm ("roundsd $2, %1, %0" : "=x" (__res) : "x" (__x));
+ __asm ("roundsd $2, %1, %0" : "=x" (__res) : "xm" (__x));
return __res;
}
__END_NAMESPACE_STD
__NTH (ceilf (float __x))
{
float __res;
- __asm ("roundss $2, %1, %0" : "=x" (__res) : "x" (__x));
+ __asm ("roundss $2, %1, %0" : "=x" (__res) : "xm" (__x));
return __res;
}
__END_NAMESPACE_C99
__NTH (floor (double __x))
{
double __res;
- __asm ("roundsd $1, %1, %0" : "=x" (__res) : "x" (__x));
+ __asm ("roundsd $1, %1, %0" : "=x" (__res) : "xm" (__x));
return __res;
}
__END_NAMESPACE_STD
__NTH (floorf (float __x))
{
float __res;
- __asm ("roundss $1, %1, %0" : "=x" (__res) : "x" (__x));
+ __asm ("roundss $1, %1, %0" : "=x" (__res) : "xm" (__x));
return __res;
}
__END_NAMESPACE_C99
# ifndef __rint
# define __rint(d) \
({ double __res; \
- asm ("roundsd $4, %1, %0" : "=x" (__res) : "x" ((double) (d))); \
+ asm ("roundsd $4, %1, %0" : "=x" (__res) : "xm" ((double) (d))); \
__res; })
# endif
# ifndef __rintf
# define __rintf(d) \
({ float __res; \
- asm ("roundss $4, %1, %0" : "=x" (__res) : "x" ((float) (d))); \
+ asm ("roundss $4, %1, %0" : "=x" (__res) : "xm" ((float) (d))); \
__res; })
# endif
# ifndef __floor
# define __floor(d) \
({ double __res; \
- asm ("roundsd $1, %1, %0" : "=x" (__res) : "x" ((double) (d))); \
+ asm ("roundsd $1, %1, %0" : "=x" (__res) : "xm" ((double) (d))); \
__res; })
# endif
# ifndef __floorf
# define __floorf(d) \
({ float __res; \
- asm ("roundss $1, %1, %0" : "=x" (__res) : "x" ((float) (d))); \
+ asm ("roundss $1, %1, %0" : "=x" (__res) : "xm" ((float) (d))); \
__res; })
# endif
#endif