mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
Fix spurious "inexact" exceptions from x86 pow with NaN argument (bug 16167).
This commit is contained in:
parent
b46d046e7b
commit
6629449166
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2013-11-16 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
[BZ #16167]
|
||||
* sysdeps/i386/fpu/e_pow.S (__ieee754_pow): Check for first
|
||||
argument being NaN and avoid computations with second argument in
|
||||
that case.
|
||||
* sysdeps/i386/fpu/e_powf.S (__ieee754_powf): Likewise.
|
||||
* sysdeps/i386/fpu/e_powl.S (__ieee754_powl): Likewise.
|
||||
* sysdeps/x86_64/fpu/e_powl.S (__ieee754_powl): Likewise.
|
||||
|
||||
2013-11-15 Arun Kumar Pyasi <arun@chitwanix.com>
|
||||
|
||||
* locale/iso-639.def: Add Chitwani Tharu (the).
|
||||
|
2
NEWS
2
NEWS
@ -18,7 +18,7 @@ Version 2.19
|
||||
15887, 15890, 15892, 15893, 15895, 15897, 15905, 15909, 15917, 15919,
|
||||
15921, 15923, 15939, 15948, 15963, 15966, 15985, 15988, 15997, 16032,
|
||||
16034, 16036, 16037, 16041, 16071, 16072, 16074, 16078, 16103, 16112,
|
||||
16143, 16150, 16151, 16153, 16172.
|
||||
16143, 16150, 16151, 16153, 16167, 16172.
|
||||
|
||||
* CVE-2012-4412 The strcoll implementation caches indices and rules for
|
||||
large collation sequences to optimize multiple passes. This cache
|
||||
|
@ -98,6 +98,9 @@ ENTRY(__ieee754_pow)
|
||||
cmpb $0x05, %ah
|
||||
je 15f // x is ±inf
|
||||
|
||||
cmpb $0x01, %ah
|
||||
je 32f // x is NaN
|
||||
|
||||
fxch // y : x
|
||||
|
||||
/* fistpll raises invalid exception for |y| >= 1L<<63. */
|
||||
@ -165,6 +168,12 @@ ENTRY(__ieee754_pow)
|
||||
31: fstp %st(1)
|
||||
ret
|
||||
|
||||
cfi_adjust_cfa_offset (8)
|
||||
32: addl $8, %esp
|
||||
cfi_adjust_cfa_offset (-8)
|
||||
fstp %st(1)
|
||||
ret
|
||||
|
||||
cfi_adjust_cfa_offset (8)
|
||||
.align ALIGNARG(4)
|
||||
2: // y is a large integer (absolute value at least 1L<<10), but
|
||||
|
@ -95,6 +95,9 @@ ENTRY(__ieee754_powf)
|
||||
cmpb $0x05, %ah
|
||||
je 15f // x is ±inf
|
||||
|
||||
cmpb $0x01, %ah
|
||||
je 32f // x is NaN
|
||||
|
||||
fxch // y : x
|
||||
|
||||
/* fistpl raises invalid exception for |y| >= 1L<<31. */
|
||||
@ -180,7 +183,7 @@ ENTRY(__ieee754_powf)
|
||||
f2xm1 // 2^fract(y*log2(x))-1 : int(y*log2(x))
|
||||
faddl MO(one) // 2^fract(y*log2(x)) : int(y*log2(x))
|
||||
fscale // 2^fract(y*log2(x))*2^int(y*log2(x)) : int(y*log2(x))
|
||||
addl $4, %esp
|
||||
32: addl $4, %esp
|
||||
cfi_adjust_cfa_offset (-4)
|
||||
fstp %st(1) // 2^fract(y*log2(x))*2^int(y*log2(x))
|
||||
ret
|
||||
|
@ -104,6 +104,9 @@ ENTRY(__ieee754_powl)
|
||||
cmpb $0x05, %ah
|
||||
je 15f // x is ±inf
|
||||
|
||||
cmpb $0x01, %ah
|
||||
je 32f // x is NaN
|
||||
|
||||
fxch // y : x
|
||||
|
||||
/* fistpll raises invalid exception for |y| >= 1L<<63. */
|
||||
@ -187,6 +190,12 @@ ENTRY(__ieee754_powl)
|
||||
31: fstp %st(1)
|
||||
ret
|
||||
|
||||
cfi_adjust_cfa_offset (8)
|
||||
32: addl $8, %esp
|
||||
cfi_adjust_cfa_offset (-8)
|
||||
fstp %st(1)
|
||||
ret
|
||||
|
||||
cfi_adjust_cfa_offset (8)
|
||||
.align ALIGNARG(4)
|
||||
2: // y is a large integer (absolute value at least 8), but
|
||||
|
@ -96,6 +96,9 @@ ENTRY(__ieee754_powl)
|
||||
cmpb $0x05, %ah
|
||||
je 15f // x is ±inf
|
||||
|
||||
cmpb $0x01, %ah
|
||||
je 31f // x is NaN
|
||||
|
||||
fxch // y : x
|
||||
|
||||
/* fistpll raises invalid exception for |y| >= 1L<<63. */
|
||||
|
Loading…
Reference in New Issue
Block a user