powerpc: Fix logbl on power7 [BZ# 21280]
commitc064f6a613844181f411aabb2662384a6aefb69e
authorTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Fri, 28 Apr 2017 22:45:52 +0000 (28 19:45 -0300)
committerTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Fri, 28 Apr 2017 22:45:52 +0000 (28 19:45 -0300)
tree87eddafe48fccaed565604fd1f405ad0437858f5
parent2f7f3cd8cd302bb10908c86f3f7b349df0a78e6a
powerpc: Fix logbl on power7 [BZ# 21280]

 1. Fix the results for negative subnormals by ignoring the signal when
    normalizing the value.
 2. Fix the output when the high part is a power of 2 and the low part
    is a nonzero number with opposite sign.  This fix is based on commit
    380bd0fd2418f8988217de950f8b8ff18af0cb2b.

After applying this patch, logbl() tests pass cleanly on POWER >= 7.

Tested on powerpc, powerpc64 and powerpc64le

[BZ #21280]
* sysdeps/powerpc/power7/fpu/s_logbl.c (__logbl): Ignore the
signal of subnormals and adjust the exponent of power of 2 down
when low part has opposite sign.
ChangeLog
sysdeps/powerpc/power7/fpu/s_logbl.c