diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-10-21 14:44:23 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-12-12 09:23:18 -0800 |
commit | 55a5e6278f86cecba8515804a7a2859a109920ba (patch) | |
tree | 897233252fb8f481a835c67748466267400c6e58 /sysdeps/ieee754/dbl-64/root.tbl | |
parent | 85bafe6f3d0e4647af5e74178b46abdf44d3b981 (diff) | |
download | glibc-hjl/32bit/generic.tar.gz |
Add Prefer_MAP_32BIT_EXEC for Silvermonthjl/32bit/generic
According to Silvermont software optimization guide, for 64-bit
applications, branch prediction performance can be negatively impacted
when the target of a branch is more than 4GB away from the branch. Set
the Prefer_MAP_32BIT_EXEC bit for Silvermont so that mmap will try to
map executable pages with MAP_32BIT first. Also enable Silvermont
optimizations for Knights Landing.
Prefer_MAP_32BIT_EXEC reduces bits available for address space
layout randomization (ASLR), which is always disabled for SUID
programs and can only be enabled by setting environment variable,
LD_ENABLE_PREFER_MAP_32BIT_EXEC.
On Fedora 23, this patch speeds up GCC 5 testsuite by 3% on Silvermont.
* sysdeps/unix/sysv/linux/wordsize-64/mmap.c: New file.
* sysdeps/unix/sysv/linux/x86_64/64/mmap.c: Likewise.
* sysdeps/x86/cpu-features.c (get_prefer_map_32bit_exec): New
function.
(init_cpu_features): Call get_prefer_map_32bit_exec for
Silvermont. Enable Silvermont optimizations for Knights Landing.
* sysdeps/x86/cpu-features.h (bit_Prefer_MAP_32BIT_EXEC): New.
(index_Prefer_MAP_32BIT_EXEC): Likewise.
Diffstat (limited to 'sysdeps/ieee754/dbl-64/root.tbl')
0 files changed, 0 insertions, 0 deletions