Commit Graph

33867 Commits

Author SHA1 Message Date
Siddhesh Poyarekar 014efdd7ea benchtests: Clean up the alloc_bufs
Drop realloc_bufs in favour of making alloc_bufs transparently
reallocate the buffers if it had allocated before.  Also consolidate
computation of buffer lengths so that they don't get repeated on every
reallocation.

	* benchtests/bench-string.h (buf1_size, buf2_size): New
	variables.
	(init_sizes): New function.
	(test_init): Use it.
	(alloc_buf, exit_error): New functions.
	(alloc_bufs): Use ALLOC_BUF.
	(realloc_bufs): Remove.
	* benchtests/bench-memcmp.c (do_test): Adjust.
	* benchtests/bench-memset-large.c (do_test): Likewise.
	* benchtests/bench-memset-walk.c (do_test): Likewise.
	* benchtests/bench-memset.c (do_test): Likewise.
	* benchtests/bench-strncmp.c (do_test): Likewise.
2018-08-08 00:44:56 +05:30
Andreas Schwab 92a4cba760
RISC-V: Don't use ps_get_thread_area in libthread_db (bug 23402)
Since RISC-V stores the thread pointer in a general register libthread_db
can just ask the debugger for the register contents instead of trying to
call ps_get_thread_area.  This enables thread debugging in gdb.

	* sysdeps/riscv/nptl/tls.h (DB_THREAD_SELF): Use REGISTER instead
	of CONST_THREAD_AREA.
2018-08-06 12:51:59 -07:00
H.J. Lu fb4c32aef6 x86: Move STATE_SAVE_OFFSET/STATE_SAVE_MASK to sysdep.h
Move STATE_SAVE_OFFSET and STATE_SAVE_MASK to sysdep.h to make
sysdeps/x86/cpu-features.h a C header file.

	* sysdeps/x86/cpu-features.h (STATE_SAVE_OFFSET): Removed.
	(STATE_SAVE_MASK): Likewise.
	Don't check __ASSEMBLER__ to include <cpu-features-offsets.h>.
	* sysdeps/x86/sysdep.h (STATE_SAVE_OFFSET): New.
	(STATE_SAVE_MASK): Likewise.
	* sysdeps/x86_64/dl-trampoline.S: Include <cpu-features-offsets.h>
	instead of <cpu-features.h>.
2018-08-06 06:25:43 -07:00
DJ Delorie e5721f45f6 Improve ChangeLog message. 2018-08-03 19:24:14 -04:00
DJ Delorie bb17621ab8 Regen RISC-V rvd ULPs
* sysdeps/riscv/rv64/rvd/libm-test-ulps: Update.

Note: I regen'd these from scratch, but I'm only committing the
increases, as I only tested on hardware.  There were a few 2->1
decreases that I omitted, possibly "for now".
2018-08-03 13:52:01 -04:00
DJ Delorie bf41818787 RISC-V: Fix rounding save/restore bug.
* sysdeps/riscv/rvf/math_private.h (libc_feholdexcept_setround_riscv):
Fix rounding save-restore bug.

Fixes about a hundred off-by-ULP failures in the math testsuite.
2018-08-03 13:43:31 -04:00
Joseph Myers ea705eb5ec Consistently terminate libm-test-*.inc TEST lines with commas.
Some TEST_* lines in libm-test-*.inc end with semicolons not commas.
This works at present because gen-libm-test.pl ignores whatever comes
after the TEST_* call, but is logically wrong (since the TEST_* calls
generate array elements, not statements) and the Python replacement
for gen-libm-test.pl that I'm working on is stricter about the syntax
here.  This patch fixes the lines in question to use commas like most
such lines already do.

Tested for x86_64.

	* math/libm-test-ilogb.inc (ilogb_test_data): Use ',' not ';'
	after TEST_* calls.
	* math/libm-test-llogb.inc (llogb_test_data): Likewise.
	* math/libm-test-logb.inc (logb_test_data): Likewise.
2018-08-03 16:56:02 +00:00
Wilco Dijkstra 284f42bc77 Simplify and speedup strstr/strcasestr first match
Looking at the benchtests, both strstr and strcasestr spend a lot of time
in a slow initialization loop handling one character per iteration.
This can be simplified and use the much faster strlen/strnlen/strchr/memcmp.
Read ahead a few cachelines to reduce the number of strnlen calls, which
improves performance by ~3-4%.  This patch improves the time taken for the
full strstr benchtest by >40%.

	* string/strcasestr.c (STRCASESTR): Simplify and speedup first match.
	* string/strstr.c (AVAILABLE): Likewise.
2018-08-03 17:24:12 +01:00
H.J. Lu 430388d5dc x86: Don't include <init-arch.h> in assembly codes
There is no need to include <init-arch.h> in assembly codes since all
x86 IFUNC selector functions are written in C.  Tested on i686 and
x86-64.  There is no code change in libc.so, ld.so and libmvec.so.

	* sysdeps/i386/i686/multiarch/bzero-ia32.S: Don't include
	<init-arch.h>.
	* sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core-avx2.S: Likewise.
	* sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core-avx2.S: Likewise.
	* sysdeps/x86_64/multiarch/memset-sse2-unaligned-erms.S: Likewise.
2018-08-03 08:05:00 -07:00
Carlos O'Donell 6b535b8423 Update be translations. 2018-08-03 10:13:47 -04:00
Carlos O'Donell c5760aa902 Update be translations. 2018-08-03 09:57:00 -04:00
H.J. Lu ae67f2e562 x86: Cleanup cpu-features-offsets.sym
Remove the unused macros.  There is no code changes in libc.so nor
ld.so on i686 and x86-64.

	* sysdeps/x86/cpu-features-offsets.sym
	(rtld_global_ro_offsetof): Removed.
	(CPU_FEATURES_SIZE): Likewise.
	(CPUID_OFFSET): Likewise.
	(CPUID_SIZE): Likewise.
	(CPUID_EAX_OFFSET): Likewise.
	(CPUID_EBX_OFFSET): Likewise.
	(CPUID_ECX_OFFSET): Likewise.
	(CPUID_EDX_OFFSET): Likewise.
	(FAMILY_OFFSET): Likewise.
	(MODEL_OFFSET): Likewise.
	(FEATURE_OFFSET): Likewise.
	(FEATURE_SIZ): Likewise.
	(COMMON_CPUID_INDEX_1): Likewise.
	(COMMON_CPUID_INDEX_7): Likewise.
	(FEATURE_INDEX_1): Likewise.
	(RTLD_GLOBAL_RO_DL_X86_CPU_FEATURES_OFFSET): Updated.
2018-08-03 06:42:09 -07:00
Carlos O'Donell cfb0ff932e Fix ChangeLog date. 2018-08-02 15:32:23 -04:00
Carlos O'Donell 08a5ee14c6 Add convenience target 'install-locale-files'.
The convenience install target 'install-locale-files' is created
to allow distributions to install all of the SUPPORTED locales as
files instead of into the locale-archive.

You invoke the new convenience target like this:
make localedata/install-locale-files DESTDIR=<prefix>
2018-08-02 15:31:12 -04:00
Siddhesh Poyarekar d67d634bef [benchtests] Fix compare_strings.py for python2
Python 2 does not have a FileNotFoundError so drop it in favour of
simply printing out the last (and most informative) line of the
exception.

	* benchtests/scripts/compare_strings.py: Import traceback.
	(parse_file): Pretty-print error.
2018-08-03 00:26:45 +05:30
Siddhesh Poyarekar 525691bde3 Add ChangeLog for the last commit 2018-08-02 23:56:18 +05:30
Siddhesh Poyarekar dce452dc52 Rename the glibc.tune namespace to glibc.cpu
The glibc.tune namespace is vaguely named since it is a 'tunable', so
give it a more specific name that describes what it refers to.  Rename
the tunable namespace to 'cpu' to more accurately reflect what it
encompasses.  Also rename glibc.tune.cpu to glibc.cpu.name since
glibc.cpu.cpu is weird.

	* NEWS: Mention the change.
	* elf/dl-tunables.list: Rename tune namespace to cpu.
	* sysdeps/powerpc/dl-tunables.list: Likewise.
	* sysdeps/x86/dl-tunables.list: Likewise.
	* sysdeps/aarch64/dl-tunables.list: Rename tune.cpu to
	cpu.name.
	* elf/dl-hwcaps.c (_dl_important_hwcaps): Adjust.
	* elf/dl-hwcaps.h (GET_HWCAP_MASK): Likewise.
	* manual/README.tunables: Likewise.
	* manual/tunables.texi: Likewise.
	* sysdeps/powerpc/cpu-features.c: Likewise.
	* sysdeps/unix/sysv/linux/aarch64/cpu-features.c
	(init_cpu_features): Likewise.
	* sysdeps/x86/cpu-features.c: Likewise.
	* sysdeps/x86/cpu-features.h: Likewise.
	* sysdeps/x86/cpu-tunables.c: Likewise.
	* sysdeps/x86_64/Makefile: Likewise.
	* sysdeps/x86/dl-cet.c: Likewise.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2018-08-02 23:49:19 +05:30
Joseph Myers 506d7fb1d4 Do not define various fenv.h macros for MIPS soft-float (bug 23479).
MIPS soft-float glibc does not support floating-point exceptions and
rounding modes, and uses a different ABI from hard-float so a
soft-float compilation cannot use a glibc that does support
floating-point exceptions and rounding modes.  Thus, bits/fenv.h
should not, when compiling for soft-float, define macros for the
unsupported features.

This patch changes it accordingly to define those macros only for
hard-float.  None of the exception macros are defined for soft-float,
with FE_ALL_EXCEPT defined to 0 in that case, and only FE_TONEAREST is
defined of the rounding-mode macros, and FE_NOMASK_ENV is not defined;
this is consistent with how architectures lacking exception and
rounding mode support generally define things in this header.  As well
as making the header more correct for this case, this also means the
generic math_private.h optimizations for this case automatically apply
(inlining libm-internal fenv.h function calls that are trivial when
exceptions and rounding modes are not supported).

The mips64 sfp-machine.h then needs similar changes to disable more of
the exception and rounding mode handling for soft-float.  (The mips32
sfp-machine.h is already used only for soft-float, has no integration
with hardware exceptions or rounding modes and so needs no changes.)

Existing binaries might use the old FE_NOMASK_ENV value as an argument
to fesetenv / feupdateenv and expect an error for it (given that it
was defined in a header that also defined FE_ALL_EXCEPT to a nonzero
value).  To preserve that error, wrappers for the fallback fesetenv
and feupdateenv are created in sysdeps/mips/nofpu/.

Tested for mips64 (hard-float and soft-float, all three ABIs).

	[BZ #23479]
	* sysdeps/mips/bits/fenv.h (FE_INEXACT): Define only if
	[__mips_hard_float].
	(FE_UNDERFLOW): Likewise.
	(FE_OVERFLOW): Likewise.
	(FE_DIVBYZERO): Likewise.
	(FE_INVALID): Likewise.
	(FE_ALL_EXCEPT): Define to 0 if [!__mips_hard_float].
	(FE_TOWARDZERO): Define only if [__mips_hard_float].
	(FE_UPWARD): Likewise.
	(FE_DOWNWARD): Likewise.
	(__FE_UNDEFINED): Define if [!__mips_hard_float]
	(FE_NOMASK_ENV): Define only if [__mips_hard_float].
	* sysdeps/mips/mips64/sfp-machine.h (_FP_DECL_EX): Define only if
	[__mips_hard_float].
	(FP_ROUNDMODE): Likewise.
	(FP_RND_NEAREST): Likewise.
	(FP_RND_ZERO): Likewise.
	(FP_RND_PINF): Likewise.
	(FP_RND_MINF): Likewise.
	(FP_EX_INVALID): Likewise.
	(FP_EX_OVERFLOW): Likewise.
	(FP_EX_UNDERFLOW): Likewise.
	(FP_EX_DIVZERO): Likewise.
	(FP_EX_INEXACT): Likewise.
	(FP_INIT_ROUNDMODE): Likewise.
	* sysdeps/mips/nofpu/fesetenv.c: New file.
	* sysdeps/mips/nofpu/feupdateenv.c: Likewise.
2018-08-02 15:53:29 +00:00
Joseph Myers f6dcefbe60 Fix math/test-misc.c for undefined fenv.h macros.
math/test-misc.c contains some code that uses fenv.h macros
FE_UNDERFLOW, FE_OVERFLOW and FE_UPWARD without being conditional on
those macros being defined.

That would normally break the build for configurations (typically
soft-float) not defining those macros.  However, the code in question
is inside LDBL_MANT_DIG > DBL_MANT_DIG conditionals.  And, while we
have configurations lacking rounding mode and exception support where
LDBL_MANT_DIG > DBL_MANT_DIG (soft-float MIPS64 and RISC-V), those
configurations currently define the fenv.h macros in question even for
soft-float.

There may be some case for defining those macros in cases where a
soft-float compilation could use a hard-float libm (where both
soft-float and hard-float can use the same ABI, as on ARM and RISC-V,
for example).  But MIPS is not such a case - the hard-float and
soft-float ABIs are incompatible - and thus I am testing a patch to
stop defining those macros for soft-float MIPS (motivated by reducing
the extent to which architectures need their own definitions of
math-tests.h macros - if lack of rounding mode / exception support can
be determined by the lack of macros in fenv.h, that avoids the need
for math-tests.h to declare that lack as well).  Introducing a case of
LDBL_MANT_DIG > DBL_MANT_DIG without these macros defined shows up the
problem with math/test-misc.c.  This patch then fixes that problem by
adding appropriate conditionals.

Tested for MIPS64 in conjunction with changes to stop defining the
macros in question in bits/fenv.h for soft-float.

	* math/test-misc.c (do_test) [LDBL_MANT_DIG > DBL_MANT_DIG]: Make
	code using FE_UNDERFLOW conditional on [FE_UNDERFLOW], code using
	FE_OVERFLOW conditional on [FE_OVERFLOW] and code using FE_UPWARD
	conditional on [FE_UPWARD].
2018-08-01 22:22:00 +00:00
Paul Eggert fa67ba06ee regex: fix memory leak in Gnulib
Problem and fix reported by Assaf Gordon in:
https://lists.gnu.org/r/bug-gnulib/2018-07/txtqLKNwBdefE.txt
* posix/regcomp.c (free_charset) [!_LIBC]: Free range_starts and
range_ends members too, as they are defined in 'struct
re_charset_t' even if not _LIBC.  This affects only Gnulib.
2018-08-01 13:22:58 -07:00
H.J. Lu 82c80ac2eb x86: Rename get_common_indeces to get_common_indices
Reviewed-by: Carlos O'Donell <carlos@redhat.com>

	* sysdeps/x86/cpu-features.c (get_common_indeces): Renamed to
	...
	(get_common_indices): This.
	(init_cpu_features): Updated.
2018-08-01 04:57:50 -07:00
Joseph Myers 46f8cf5712 Move SNAN_TESTS_PRESERVE_PAYLOAD out of math-tests.h.
Continuing moving macros out of math-tests.h to smaller headers
following typo-proof conventions instead of using #ifndef, this patch
moves SNAN_TESTS_PRESERVE_PAYLOAD out to its own sysdeps header.

Tested with build-many-glibcs.py.

	* sysdeps/generic/math-tests-snan-payload.h: New file.
	* sysdeps/hppa/math-tests-snan-payload.h: Likewise.
	* sysdeps/mips/math-tests-snan-payload.h: Likewise.
	* sysdeps/riscv/math-tests-snan-payload.h: Likewise.
	* sysdeps/generic/math-tests.h: Include
	<math-tests-snan-payload.h>.
	(SNAN_TESTS_PRESERVE_PAYLOAD): Do not define macro here.
	* sysdeps/hppa/math-tests.h: Remove file.
	* sysdeps/mips/math-tests.h [!__mips_nan2008]
	(SNAN_TESTS_PRESERVE_PAYLOAD): Do not define macro here.
	* sysdeps/riscv/math-tests.h (SNAN_TESTS_PRESERVE_PAYLOAD):
	Likewise.
2018-08-01 11:21:16 +00:00
Joseph Myers c0e7e2c127 Move SNAN_TESTS_TYPE_CAST out of math-tests.h.
The math-tests.h header has many different macros and groups of
macros, defined using #ifndef in the generic version which is included
by architecture versions with #include_next after possibly defining
non-default versions of some of those macros.

This use of #ifndef is contrary to our normal typo-proof conventions
for macro definitions.  This patch moves one of the macros,
SNAN_TESTS_TYPE_CAST, out to its own sysdeps header, to follow those
typo-proof conventions more closely.

Tested with build-many-glibcs.py.

2018-08-01  Joseph Myers  <joseph@codesourcery.com>

	* sysdeps/generic/math-tests-snan-cast.h: New file.
	* sysdeps/powerpc/math-tests-snan-cast.h: Likewise.
	* sysdeps/generic/math-tests.h: Include <math-tests-snan-cast.h>.
	(SNAN_TESTS_TYPE_CAST): Do not define macro here.
	* sysdeps/powerpc/math-tests.h (SNAN_TESTS_TYPE_CAST): Likewise.
2018-08-01 11:18:57 +00:00
Carlos O'Donell b029723b80 Add version.h, and NEWS update to ChangeLog. 2018-08-01 01:44:08 -04:00
Carlos O'Donell 437faa9675 Open master branch for glibc 2.29 development 2018-08-01 01:35:02 -04:00
Carlos O'Donell 3c03baca37 Update NEWS, version.h, and features.h for glibc 2.28. 2018-08-01 01:10:47 -04:00
Carlos O'Donell 74939c83d0 Synchronize translation project PO files. 2018-08-01 01:01:42 -04:00
Samuel Thibault 42fc12ef73 hurd: Fix exec usage of mach_setup_thread
Exec needs that mach_setup_thread does *not* set up TLS since it works on
another task, so we have to split this into mach_setup_tls.

	* mach/mach.h (__mach_setup_tls, mach_setup_tls): Add prototypes.
	* mach/setup-thread.c (__mach_setup_thread): Move TLS setup to...
	(__mach_setup_tls): ... new function.
	(mach_setup_tls): New alias.
	* hurd/hurdsig.c (_hurdsig_init): Call __mach_setup_tls after
	__mach_setup_thread.
	* sysdeps/mach/hurd/profil.c (update_waiter): Likewise.
	* sysdeps/mach/hurd/setitimer.c (setitimer_locked): Likewise.
	* mach/Versions [libc] (mach_setup_tls): Add symbol.
	* sysdeps/mach/hurd/i386/libc.abilist (mach_setup_tls): Likewise.
2018-08-01 00:10:03 +02:00
Samuel Thibault d4b54bdff0 hurd: Add missing ChangeLog entry 2018-08-01 00:07:29 +02:00
Samuel Thibault f195ea0e2f hurd: Fix startup of static binaries linked against libpthread
* sysdeps/mach/hurd/i386/init-first.c (init1): Move ELF hdr and TLS
initialization...
(init): ... before initializing libpthread.
2018-07-31 22:41:20 +02:00
Carlos O'Donell f650932b34 Update tooling versions verified to work with glibc. 2018-07-31 16:37:07 -04:00
Carlos O'Donell 6cca855e7e Update contrib.texi contributions. 2018-07-31 15:34:30 -04:00
Carlos O'Donell 07fdea47d8 Update translation for be. 2018-07-31 15:34:30 -04:00
Adhemerval Zanella 63d5fad404 Update SH libm-tests-ulps
* sysdeps/sh/libm-test-ulps: Update.
2018-07-31 10:33:53 -03:00
Carlos O'Donell 1ff712a678 Update translations for bg, de, hr, pt_BR, sv, and vi. 2018-07-31 08:19:08 -04:00
H.J. Lu 98864ed0e0 x86/CET: Fix property note parser [BZ #23467]
GNU_PROPERTY_X86_FEATURE_1_AND may not be the first property item.  We
need to check each property item until we reach the end of the property
or find GNU_PROPERTY_X86_FEATURE_1_AND.

This patch adds 2 tests.  The first test checks if IBT is enabled and
the second test reads the output from the first test to check if IBT
is is enabled.  The second second test fails if IBT isn't enabled
properly.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

	[BZ #23467]
	* sysdeps/unix/sysv/linux/x86/Makefile (tests): Add
	tst-cet-property-1 and tst-cet-property-2 if CET is enabled.
	(CFLAGS-tst-cet-property-1.o): New.
	(ASFLAGS-tst-cet-property-dep-2.o): Likewise.
	($(objpfx)tst-cet-property-2): Likewise.
	($(objpfx)tst-cet-property-2.out): Likewise.
	* sysdeps/unix/sysv/linux/x86/tst-cet-property-1.c: New file.
	* sysdeps/unix/sysv/linux/x86/tst-cet-property-2.c: Likewise.
	* sysdeps/unix/sysv/linux/x86/tst-cet-property-dep-2.S: Likewise.
	* sysdeps/x86/dl-prop.h (_dl_process_cet_property_note): Parse
	each property item until GNU_PROPERTY_X86_FEATURE_1_AND is found.
2018-07-30 16:15:38 -07:00
H.J. Lu c92a00d865 x86: Add tst-get-cpu-features-static to $(tests) [BZ #23458]
All tests should be added to $(tests).

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

	[BZ #23458]
	* sysdeps/x86/Makefile (tests): Add tst-get-cpu-features-static.
2018-07-30 16:11:19 -07:00
Samuel Thibault af86087f02 hurd: Fix some ld.so symbol override from libc
ld.so symbols to be overriden by libc need to be extern to really get
overriden.

	* sysdeps/mach/hurd/not-errno.h: New file.
	* sysdeps/mach/hurd/i386/localplt.data: Update accordingly.
2018-07-28 15:12:42 +02:00
Samuel Thibault 99bc624136 hurd: Fix some ld.so symbol override from libc
ld.so symbols to be overriden by libc need to be extern to really get
overriden.

	* sysdeps/mach/hurd/dl-unistd.h (__access, __brk, __lseek, __read,
	__sbrk): Do not set attribute_hidden.
	* sysdeps/mach/hurd/i386/ld.abilist: Update accordingly.
	* sysdeps/mach/hurd/i386/localplt.data: Update accordingly.
2018-07-28 14:57:10 +02:00
Carlos O'Donell bcb1c4afd8 Update translations for cs, pl, and uk. 2018-07-27 20:35:51 -04:00
H.J. Lu 4591b7db23 x86/CET: Don't parse beyond the note end
Simply check if "ptr < ptr_end" since "ptr" is always incremented by 8.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

	* sysdeps/x86/dl-prop.h (_dl_process_cet_property_note): Don't
	parse beyond the note end.
2018-07-27 13:23:31 -07:00
Carlos O'Donell 97f2237efa Update NEWS with ISO 14651 update information. 2018-07-27 16:03:55 -04:00
Rafal Luzynski e607a35200 NEWS: Avoid the words "nominative" and "genitive".
Glibc supports two grammatical forms of month names and we keep adding
the locale data which actually use this feature but those two forms are
not necessarily nominative and genitive.  It is better to use a more
generic term.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2018-07-27 21:45:24 +02:00
Adhemerval Zanella 2c6da2f487 Fix Linux fcntl OFD locks on unsupported kernels
This patch make the OFD tests return unsupported if kernel does not
support OFD locks (it was added on 3.15).

Checked on a ia64-linux-gnu with Linux 3.14.

	* sysdeps/unix/sysv/linux/tst-ofdlocks.c: Return unsupported if
	kernel does not support OFD locks.
	* sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c: Likewise.
2018-07-27 14:48:06 -03:00
H.J. Lu da80612d61 Add the missing ChangeLog entry for commit be525a69a6 2018-07-27 10:28:30 -07:00
Samuel Thibault 20365a315b hurd: Fix some ld.so symbol override from libc
ld.so symbols to be overriden by libc need to be extern to really get
overriden.

More fixes are needed to avoid the hidden attribute.

	* sysdeps/mach/hurd/Versions (libc): Make __access and
	__access_noerrno external so they can override the ld symbols.
	(ld): Make __access, __read, __sbrk, __strtoul_internal, __write,
	__writev, __open64, __access_noerrno extern so they can be overrided.
	* sysdeps/mach/hurd/i386/libc.abilist: Update accordingly.
	* sysdeps/mach/hurd/i386/ld.abilist: Update accordingly.
2018-07-27 11:18:29 +02:00
Carlos O'Donell cb1a43db05 Update libc.pot. 2018-07-26 22:21:34 -04:00
Joseph Myers 74759ae5b6 Update powerpc-nofpu ulps.
* sysdeps/powerpc/nofpu/libm-test-ulps: Update.
2018-07-26 22:51:06 +00:00
H.J. Lu be525a69a6 x86: Populate COMMON_CPUID_INDEX_80000001 for Intel CPUs [BZ #23459]
Reviewed-by: Carlos O'Donell <carlos@redhat.com>

	[BZ #23459]
	* sysdeps/x86/cpu-features.c (get_extended_indices): New
	function.
	(init_cpu_features): Call get_extended_indices for both Intel
	and AMD CPUs.
	* sysdeps/x86/cpu-features.h (COMMON_CPUID_INDEX_80000001):
	Remove "for AMD" comment.
2018-07-26 13:31:11 -07:00
H.J. Lu 65d87ade1e x86: Correct index_cpu_LZCNT [BZ # 23456]
cpu-features.h has

 #define bit_cpu_LZCNT		(1 << 5)
 #define index_cpu_LZCNT	COMMON_CPUID_INDEX_1
 #define reg_LZCNT

But the LZCNT feature bit is in COMMON_CPUID_INDEX_80000001:

Initial EAX Value: 80000001H
ECX Extended Processor Signature and Feature Bits:
Bit 05: LZCNT available

index_cpu_LZCNT should be COMMON_CPUID_INDEX_80000001, not
COMMON_CPUID_INDEX_1.  The VMX feature bit is in COMMON_CPUID_INDEX_1:

Initial EAX Value: 01H
Feature Information Returned in the ECX Register:
5 VMX

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

	[BZ # 23456]
	* sysdeps/x86/cpu-features.h (index_cpu_LZCNT): Set to
	COMMON_CPUID_INDEX_80000001.
2018-07-26 11:10:44 -07:00