mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-13 14:50:17 +00:00
Remove old workaround in power7 logb functions, clang no longer crashes on the inline assembly
This commit is contained in:
parent
cb90884046
commit
c3064d5f50
@ -17,7 +17,6 @@
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <math_ldbl_opt.h>
|
||||
#include <math_private.h>
|
||||
#include <libm-alias-double.h>
|
||||
|
||||
/* This implementation avoids FP to INT conversions by using VSX
|
||||
@ -42,19 +41,11 @@ __logb (double x)
|
||||
return -1.0 / __builtin_fabs (x);
|
||||
|
||||
/* ret = x & 0x7ff0000000000000; */
|
||||
#if !defined __clang__
|
||||
asm (
|
||||
"xxland %x0,%x1,%x2\n"
|
||||
"fcfid %0,%0"
|
||||
: "=f" (ret)
|
||||
: "f" (x), "f" (mask.d));
|
||||
#else
|
||||
/* TODO(rtenneti): This is wrong. Handle double */
|
||||
int64_t inum;
|
||||
GET_FLOAT_WORD(inum, x);
|
||||
inum = (inum & 0x7ff0000000000000);
|
||||
SET_FLOAT_WORD(ret, inum);
|
||||
#endif
|
||||
/* ret = (ret >> 52) - 1023.0; */
|
||||
ret = (ret * two1div52) + two10m1;
|
||||
if (__builtin_expect (ret > -two10m1, 0))
|
||||
|
@ -43,18 +43,11 @@ __logbf (float x)
|
||||
return -1.0 / __builtin_fabsf (x);
|
||||
|
||||
/* ret = x & 0x7f800000; */
|
||||
#if !defined __clang__
|
||||
asm (
|
||||
"xxland %x0,%x1,%x2\n"
|
||||
"fcfid %0,%0"
|
||||
: "=f"(ret)
|
||||
: "f" (x), "f" (mask.d));
|
||||
#else
|
||||
int32_t inum;
|
||||
GET_FLOAT_WORD(inum, x);
|
||||
inum = (inum & 0x7ff0000000000000);
|
||||
SET_FLOAT_WORD(ret, inum);
|
||||
#endif
|
||||
/* ret = (ret >> 52) - 1023.0, since ret is double. */
|
||||
ret = (ret * two1div52) + two10m1;
|
||||
if (__builtin_expect (ret > -two7m1, 0))
|
||||
|
@ -46,19 +46,11 @@ __logbl (long double x)
|
||||
ldbl_unpack (x, &xh, &xl);
|
||||
EXTRACT_WORDS64 (hx, xh);
|
||||
/* ret = x & 0x7ff0000000000000; */
|
||||
#if !defined __clang__
|
||||
asm (
|
||||
"xxland %x0,%x1,%x2\n"
|
||||
"fcfid %0,%0"
|
||||
: "=f" (ret)
|
||||
: "f" (xh), "f" (mask.d));
|
||||
#else
|
||||
/* TODO(rtenneti): This is wrong. Handle double */
|
||||
int64_t inum;
|
||||
GET_FLOAT_WORD(inum, x);
|
||||
inum = (inum & 0x7ff0000000000000);
|
||||
SET_FLOAT_WORD(ret, inum);
|
||||
#endif
|
||||
/* ret = (ret >> 52) - 1023.0; */
|
||||
ret = (ret * two1div52) + two10m1;
|
||||
if (__builtin_expect (ret > -two10m1, 0))
|
||||
|
Loading…
Reference in New Issue
Block a user