mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-13 14:50:17 +00:00
Work around mtfsb0 syntax limitation with clang
This commit is contained in:
parent
e04e10b431
commit
960ba7975c
@ -42,7 +42,11 @@ ENTRY (__nearbyint, 4)
|
||||
fcmpu cr7,fp1,fp12 /* if (x > 0.0) */
|
||||
ble cr7, L(lessthanzero)
|
||||
mffs fp11
|
||||
#if defined __clang__
|
||||
mtfsb0 31 /* Disable FE_INEXACT exception */
|
||||
#else
|
||||
mtfsb0 4*cr7+lt /* Disable FE_INEXACT exception */
|
||||
#endif
|
||||
fadd fp1,fp1,fp13 /* x+= TWO52 */
|
||||
fsub fp1,fp1,fp13 /* x-= TWO52 */
|
||||
fabs fp1,fp1 /* if (x == 0.0) */
|
||||
@ -51,7 +55,11 @@ ENTRY (__nearbyint, 4)
|
||||
L(lessthanzero):
|
||||
bgelr cr7 /* if (x < 0.0) */
|
||||
mffs fp11
|
||||
#if defined __clang__
|
||||
mtfsb0 31
|
||||
#else
|
||||
mtfsb0 4*cr7+lt
|
||||
#endif
|
||||
fsub fp1,fp1,fp13 /* x -= TWO52 */
|
||||
fadd fp1,fp1,fp13 /* x += TWO52 */
|
||||
fnabs fp1,fp1 /* if (x == 0.0) */
|
||||
|
@ -43,7 +43,11 @@ ENTRY (__nearbyintf, 4)
|
||||
fcmpu cr7,fp1,fp12 /* if (x > 0.0) */
|
||||
ble cr7, L(lessthanzero)
|
||||
mffs fp11
|
||||
#if defined __clang__
|
||||
mtfsb0 31 /* Disable FE_INEXACT exception */
|
||||
#else
|
||||
mtfsb0 4*cr7+lt /* Disable FE_INEXACT exception */
|
||||
#endif
|
||||
fadds fp1,fp1,fp13 /* x += TWO23 */
|
||||
fsubs fp1,fp1,fp13 /* x -= TWO23 */
|
||||
fabs fp1,fp1 /* if (x == 0.0) */
|
||||
@ -52,7 +56,11 @@ ENTRY (__nearbyintf, 4)
|
||||
L(lessthanzero):
|
||||
bgelr cr7 /* if (x < 0.0) */
|
||||
mffs fp11
|
||||
#if defined __clang__
|
||||
mtfsb0 31 /* Disable FE_INEXACT exception */
|
||||
#else
|
||||
mtfsb0 4*cr7+lt /* Disable FE_INEXACT exception */
|
||||
#endif
|
||||
fsubs fp1,fp1,fp13 /* x -= TWO23 */
|
||||
fadds fp1,fp1,fp13 /* x += TWO23 */
|
||||
fnabs fp1,fp1 /* if (x == 0.0) */
|
||||
|
Loading…
Reference in New Issue
Block a user