glibc/sysdeps
Matheus Castanho 1c252f0e7e powerpc: Fix feraiseexcept and feclearexcept macros
A recent change to fenvinline.h modified the check if __e is a
a power of 2 inside feraiseexcept and feclearexcept macros.  It
introduced the use of the powerof2 macro but also removed the
if statement checking whether __e != 0 before issuing an mtfsb*
instruction.  This is problematic because powerof2 (0) evaluates
to 1 and without the removed if __e is allowed to be 0 when
__builtin_clz is called.  In that case the value 32 is passed
to __MTFSB*, which is invalid.

This commit uses __builtin_popcount instead of powerof2 to fix this
issue and avoid the extra check for __e != 0.  This was the approach
used by the initial versions of that previous patch.

Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
2020-03-06 11:10:12 -03:00
..
aarch64 Introduce <elf-initfini.h> and ELF_INITFINI for all architectures 2020-02-18 15:12:25 +01:00
alpha alpha: Do not build with -fpic 2020-03-03 15:42:36 +01:00
arm arm: Fix softp-fp Implies (BZ #25635) 2020-03-06 09:53:24 -03:00
csky Introduce <elf-initfini.h> and ELF_INITFINI for all architectures 2020-02-18 15:12:25 +01:00
generic ldbl-128ibm-compat: Provide ieee128 symbols to narrow functions 2020-02-20 17:12:14 -06:00
gnu Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
hppa Introduce <elf-initfini.h> and ELF_INITFINI for all architectures 2020-02-18 15:12:25 +01:00
htl pthread: Move robust mutex tests from nptl to sysdeps/pthread 2020-02-16 14:43:54 +00:00
hurd C11 threads: Move implementation to sysdeps/pthread 2020-02-09 13:56:48 +01:00
i386 i386: Use comdat instead of .gnu.linkonce for i386 setup pic register (BZ #20543) 2020-02-28 13:58:08 -03:00
ia64 Introduce <elf-initfini.h> and ELF_INITFINI for all architectures 2020-02-18 15:12:25 +01:00
ieee754 ldbl-128ibm-compat: link tst-ldbl-efgcvt against loader too 2020-02-28 08:20:02 -06:00
m68k Introduce <elf-initfini.h> and ELF_INITFINI for all architectures 2020-02-18 15:12:25 +01:00
mach posix: Remove posix waitid 2020-02-27 16:16:17 -03:00
microblaze Introduce <elf-initfini.h> and ELF_INITFINI for all architectures 2020-02-18 15:12:25 +01:00
mips Introduce <elf-initfini.h> and ELF_INITFINI for all architectures 2020-02-18 15:12:25 +01:00
nios2 Introduce <elf-initfini.h> and ELF_INITFINI for all architectures 2020-02-18 15:12:25 +01:00
nptl Linux: set_robust_list syscall number is always available 2020-03-03 12:49:44 +01:00
posix posix: Remove posix waitid 2020-02-27 16:16:17 -03:00
powerpc powerpc: Fix feraiseexcept and feclearexcept macros 2020-03-06 11:10:12 -03:00
pthread pthread: Fix building tst-robust8 with nptl 2020-02-16 23:53:45 +01:00
riscv Introduce <elf-initfini.h> and ELF_INITFINI for all architectures 2020-02-18 15:12:25 +01:00
s390 S390: Remove backchain-based fallback and use generic backtrace.c. 2020-03-05 12:52:19 +01:00
sh Introduce <elf-initfini.h> and ELF_INITFINI for all architectures 2020-02-18 15:12:25 +01:00
sparc elf: Add elf/check-wx-segment, a test for the presence of WX segments 2020-03-02 14:25:20 +01:00
unix linux/sysipc: Include linux/posix_types.h for __kernel_mode_t 2020-03-06 09:53:23 -03:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
wordsize-64 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
x86 Introduce <elf-initfini.h> and ELF_INITFINI for all architectures 2020-02-18 15:12:25 +01:00
x86_64 x86: Avoid single-argument _Static_assert in <tls.h> 2020-02-17 11:12:03 +01:00