18966, 18967, 18969, 18970, 18977, 18980, 18981, 18985, 19003, 19007,
19012, 19016, 19018, 19032, 19046, 19049, 19050, 19059, 19071, 19074,
19076, 19077, 19078, 19079, 19085, 19086, 19088, 19094, 19095, 19124,
- 19125, 19129
+ 19125, 19129, 19134
* The obsolete header <regexp.h> has been removed. Programs that require
this header must be updated to use <regex.h> instead.
.align 2
.LC0: /* 0.5 */
.long 0x3f000000
+.LC1: /* 2^52. */
+ .long 0x59800000
+ .section .rodata.cst8,"aM",@progbits,8
+ .align 3
+.LC2: /* 0x7fffffff.8p0. */
+ .long 0x41dfffff
+ .long 0xffe00000
+.LC3: /* -0x80000000.8p0. */
+ .long 0xc1e00000
+ .long 0x00100000
.section ".text"
/* long [r3] lround (float x [fp1])
mflr r11
cfi_register(lr,r11)
SETUP_GOT_ACCESS(r9,got_label)
- addis r9,r9,.LC0-got_label@ha
- lfs fp10,.LC0-got_label@l(r9)
+ addis r10,r9,.LC0-got_label@ha
+ lfs fp10,.LC0-got_label@l(r10)
+ addis r10,r9,.LC1-got_label@ha
+ lfs fp11,.LC1-got_label@l(r10)
+ addis r10,r9,.LC2-got_label@ha
+ lfd fp9,.LC2-got_label@l(r10)
+ addis r10,r9,.LC3-got_label@ha
+ lfd fp8,.LC3-got_label@l(r10)
mtlr r11
cfi_same_value (lr)
#else
lis r9,.LC0@ha
lfs fp10,.LC0@l(r9)
+ lis r9,.LC1@ha
+ lfs fp11,.LC1@l(r9)
+ lis r9,.LC2@ha
+ lfd fp9,.LC2@l(r9)
+ lis r9,.LC3@ha
+ lfd fp8,.LC3@l(r9)
#endif
fabs fp2, fp1 /* Get the absolute value of x. */
fsub fp12,fp10,fp10 /* Compute 0.0. */
fcmpu cr6, fp2, fp10 /* if |x| < 0.5 */
+ fcmpu cr5, fp1, fp9 /* if x >= 0x7fffffff.8p0 */
+ fcmpu cr1, fp1, fp8 /* if x <= -0x80000000.8p0 */
fcmpu cr7, fp1, fp12 /* x is negative? x < 0.0 */
blt- cr6,.Lretzero
+ bge- cr5,.Loflow
+ ble- cr1,.Loflow
+ /* Test whether an integer to avoid spurious "inexact". */
+ fadd fp3,fp2,fp11
+ fsub fp3,fp3,fp11
+ fcmpu cr5, fp2, fp3
+ beq cr5,.Lnobias
fadd fp3,fp2,fp10 /* |x|+=0.5 bias to prepare to round. */
bge cr7,.Lconvert /* x is positive so don't negate x. */
fnabs fp3,fp3 /* -(|x|+=0.5) */
.Lretzero: /* when 0.5 > x > -0.5 */
li r3,0 /* return 0. */
b .Lout
+.Lnobias:
+ fmr fp3,fp1
+ b .Lconvert
+.Loflow:
+ fmr fp3,fp11
+ bge cr7,.Lconvert
+ fnabs fp3,fp3
+ b .Lconvert
END (__lround)
weak_alias (__lround, lround)