mirror of
git://sourceware.org/git/glibc.git
synced 2026-09-09 11:58:23 +08:00
Compare commits
42
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a06663ebed | ||
|
|
5c616c0a75 | ||
|
|
3ca2c50727 | ||
|
|
dfb57bf887 | ||
|
|
af071af18c | ||
|
|
4b4084b99e | ||
|
|
920e759ea4 | ||
|
|
7dfe8a3521 | ||
|
|
e0c595c971 | ||
|
|
2d718ff774 | ||
|
|
a6d4505204 | ||
|
|
42b373ad46 | ||
|
|
e934fb2836 | ||
|
|
979bcc3f28 | ||
|
|
ed81f668f7 | ||
|
|
01c3d9bb14 | ||
|
|
599fefcc3e | ||
|
|
51c33bd233 | ||
|
|
812d5041cc | ||
|
|
987322bc0b | ||
|
|
ace8891708 | ||
|
|
dad835a11f | ||
|
|
45045c44fa | ||
|
|
3f38cbfa2a | ||
|
|
c00f26c0ea | ||
|
|
66bf22e129 | ||
|
|
33c15e3ac3 | ||
|
|
cdd522c7a5 | ||
|
|
51a8476450 | ||
|
|
08a894d508 | ||
|
|
15256e58ad | ||
|
|
ca4023620a | ||
|
|
201b499c97 | ||
|
|
2b863a1b2d | ||
|
|
1032040da2 | ||
|
|
093696517f | ||
|
|
4de767be56 | ||
|
|
fc1abbe2cc | ||
|
|
b540704783 | ||
|
|
318cd0b180 | ||
|
|
37cf37d946 | ||
|
|
bec30822ae |
@@ -1,3 +1,327 @@
|
||||
2013-07-23 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/powerpc/dl-static.c: New file to support
|
||||
variable page size.
|
||||
* sysdeps/unix/sysv/linux/powerpc/ldsodefs.h: Likewise.
|
||||
* sysdeps/unix/sysv/linux/powerpc/Makefile: Build dl-static in elf.
|
||||
* sysdeps/unix/sysv/linux/powerpc/Versions: Add _dl_var_init.
|
||||
|
||||
2013-06-20 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
* config.h.in (HAVE_CC_INHIBIT_LOOP_TO_LIBCALL): New define.
|
||||
* configure.in (libc_cv_cc_loop_to_function): Check if compiler
|
||||
accepts -fno-tree-loop-distribute-patterns.
|
||||
* include/libc-symbols.h (inhibit_loop_to_libcall): New macro.
|
||||
* string/memmove.c (MEMMOVE): Disable loop transformation to avoid
|
||||
recursive call.
|
||||
* string/memset.c (memset): Likewise.
|
||||
* string/test-memmove.c (simple_memmove): Disable loop transformation
|
||||
to library calls.
|
||||
* string/test-memset.c (simple_memset): Likewise.
|
||||
* configure: Regenerated.
|
||||
|
||||
2013-06-28 Ryan S. Arnold <rsa@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/powerpc/Makefile: Add comment about generating an offset to
|
||||
rtld_global._dl_hwcap2.
|
||||
* sysdeps/powerpc/bits/hwcap.h: Added PPC_FEATURE2_* definitions for
|
||||
POWER8.
|
||||
* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Extend for
|
||||
POWER8 feature descriptions defined in _dl_hwcap2.
|
||||
* sysdeps/powerpc/dl-procinfo.h (_dl_procinfo): Implement AT_HWCAP2
|
||||
string handling for POWER8 feature bits.
|
||||
(_DL_HWCAP_COUNT): Increment to 64 to cover AT_HWCAP2 bits.
|
||||
(_DL_HWCAP_LAST): New definition for position of last AT_HWCAP bit in
|
||||
_dl_powerpc_cap_flags.
|
||||
(_DL_HWCAP2_LAST): New definition for last usable bit of AT_HWCAP2.
|
||||
* sysdeps/powerpc/rtld-global-offsets.sym
|
||||
(RTLD_GLOBAL_RO_DL_HWCAP2_OFFSET): New offset macro to locate
|
||||
_dl_hwcap2 in the rtld_global_ro structure.
|
||||
|
||||
2013-06-28 Ryan S. Arnold <rsa@linux.vnet.ibm.com>
|
||||
|
||||
* elf/dl-support.c (_dl_hwcap2): Add a new hwcap field for more
|
||||
hardware capabilities in support of AT_HWCAP2.
|
||||
(_dl_aux_init): Read AT_HWCAP2 into GLRO(dl_hwcap2).
|
||||
* elf/dl-sysdep.c (_dl_sysdep_start): Read AT_HWCAP2 into
|
||||
GLRO(dl_hwcap2).
|
||||
(_dl_show_auxv): Add support for calling _dl_procinfo to display
|
||||
AT_HWCAP2. If a platform doesn't chose to handle displaying AT_HWCAP2
|
||||
explicitly the unknown a_type display mechanism is used.
|
||||
* misc/getauxval.c (__getauxval): Return GLRO(dl_hwcap2) on AT_HWCAP2.
|
||||
* sysdeps/generic/ldsodefs.h (rtld_global_ro): Add _dl_hwcap2 as a new
|
||||
struct member.
|
||||
* sysdeps/generic/dl-procinfo.h (_dl_procinfo): Add TYPE parameter
|
||||
to macro prototype for AT_HWCAP2 support.
|
||||
* sysdeps/i386/dl-procinfo.h: Likewise.
|
||||
* sysdeps/s390/dl-procinfo.h: Likewise.
|
||||
* sysdeps/powerpc/dl-procinfo.h (_dl_procinfo): Add TYPE parameter to
|
||||
macro prototype for AT_HWCAP2 support. Make WORD unsigned long int
|
||||
rather than signed int. Stub in handler for TYPE == AT_HWCAP2 to
|
||||
return -1 for unknown a_type display fallback.
|
||||
* sysdeps/sparc/dl-procinfo.h: Likewise.
|
||||
* sysdeps/unix/sysv/linux/i386/dl-procinfo.h: Likewise.
|
||||
* sysdeps/unix/sysv/linux/s390/dl-procinfo.h: Likewise.
|
||||
|
||||
2013-06-26 Ryan S. Arnold <rsa@linux.vnet.ibm.com>
|
||||
|
||||
* elf/elf.h (AT_HWCAP2): Add a new a_type entry.
|
||||
|
||||
2013-06-24 Ryan S. Arnold <rsa@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_platforms): Add "power8"
|
||||
entry mapped to PPC_PLATFORM_POWER8.
|
||||
* sysdeps/powerpc/dl-procinfo.h (_DL_PLATFORMS_COUNT): Increment for
|
||||
POWER8.
|
||||
(PPC_PLATFORM_POWER8): Add new platform bit for POWER8 processor.
|
||||
(_dl_string_platform): Add case for exporting platform position for
|
||||
POWER8.
|
||||
* sysdeps/unix/sysv/linux/powerpc/powerpc32/power8/Implies: Chain
|
||||
search path to sysdeps/powerpc/powerpc32/power8 directory.
|
||||
* sysdeps/unix/sysv/linux/powerpc/powerpc64/power8/Implies: Chain
|
||||
search path to sysdeps/powerpc/powerpc64/power8 directory.
|
||||
* sysdeps/powerpc/powerpc32/power8/Implies: Chain search path to
|
||||
power7 directories.
|
||||
* sysdeps/powerpc/powerpc64/power8/Implies: Chain search path to
|
||||
power7 directories.
|
||||
|
||||
2013-06-17 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
* nptl/sysdeps/powerpc/tls.h (tcbhead_t): Add Event-Based Branch
|
||||
fields.
|
||||
|
||||
2013-06-11 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
[BZ #15605]
|
||||
* sysdeps/generic/symbol-hacks.h: Add workaround for memset/memmove calls
|
||||
generated by the compiler on loop optimizations.
|
||||
* sysdeps/wordsize-32/symbol-hacks.h: Include next symbol-hacks.h for
|
||||
general definitions.
|
||||
|
||||
2013-06-11 Ryan S. Arnold <rsa@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_platforms): Add ppc405,
|
||||
ppc440, ppc464, and ppc476, merging from ports/ dl-procinfo.c.
|
||||
* sysdeps/powerpc/dl-procinfo.h: Fix whitespace by correcting spaces
|
||||
with tabs where appropriate.
|
||||
[PPC_PLATFORM_PPC405]: Define new platform merging from ports/
|
||||
dl-procinfo.h.
|
||||
[PPC_PLATFORM_PPC440]: Likewise.
|
||||
[PPC_PLATFORM_PPC464]: Likewise.
|
||||
[PPC_PLATFORM_PPC476]: Likewise.
|
||||
(_dl_string_platform): Add support for detecting ppc405, ppc440,
|
||||
ppc464, and ppc476 platform strings merging from ports/
|
||||
dl-procinfo.h.
|
||||
|
||||
2013-05-24 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
* manual/platform.texi: Add PowerPC PPR function set documentation.
|
||||
* sysdeps/powerpc/sys/platform/ppc.h: Add PowerPC PPR set function
|
||||
implementation.
|
||||
|
||||
2013-05-23 Edjunior Machado <emachado@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/powerpc/sys/platform/ppc.h: Add __ppc_yield,
|
||||
__ppc_mdoio and __ppc_mdoom.
|
||||
* manual/platform.texi: Document new functions __ppc_yield,
|
||||
__ppc_mdoio and __ppc_mdoom.
|
||||
|
||||
2013-05-22 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/bits/siginfo.h (siginfo_t): Add si_addr_lsb
|
||||
to _sifields.sigfault.
|
||||
(si_addr_lsb): Define new macro.
|
||||
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
|
||||
* sysdeps/unix/sysv/linux/sparc/bits/siginfo.h: Likewise.
|
||||
* sysdeps/unix/sysv/linux/x86/bits/siginfo.h: Likewise.
|
||||
|
||||
2013-05-15 Edjunior Machado <emachado@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/s390/bits/siginfo.h (siginfo_t): Remove
|
||||
si_trapno and add si_addr_lsb to _sifields.sigfault.
|
||||
(si_trapno): Remove macro.
|
||||
(si_addr_lsb): Define new macro.
|
||||
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
|
||||
|
||||
2013-05-17 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
[BZ # 15497]
|
||||
* sysdeps/powerpc/fpu/e_hypot.c (GET_TWO_FLOAT_WORD): Fix test for
|
||||
negative infinity on POWER6 or lower.
|
||||
* sysdeps/powerpc/fpu/e_hypotf.c (GET_TWO_FLOAT_WORD): Likewise.
|
||||
|
||||
2013-04-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/powerpc/Versions: Add __vdso_time symbol.
|
||||
* sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h: Add __vdso_time
|
||||
definition.
|
||||
(VDSO_IFUNC_RET): Cast to void * to silence compiler warning.
|
||||
* sysdeps/unix/sysv/linux/powerpc/init-first.c
|
||||
(_libc_vdso_platform_setup): Add __vdso_time initialization.
|
||||
* sysdeps/unix/sysv/linux/powerpc/time.c: New file: time implementation
|
||||
for PowerPC using vDSO where is avaliable or gettimeofday as a fallback.
|
||||
|
||||
2013-04-26 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/powerpc/power5/fpu/s_modf.c: Moved to ...
|
||||
* sysdeps/powerpc/power5+/fpu/s_modf.c: ... this.
|
||||
* sysdeps/powerpc/power5/fpu/s_modff.c: Moved to ...
|
||||
* sysdeps/powerpc/power5+/fpu/s_modff.c: ... this.
|
||||
* sysdeps/powerpc/powerpc32/power5+/Implies: Add powerpc/power5+ and
|
||||
powerpc/power5+/fpu folders.
|
||||
* sysdeps/powerpc/powerpc64/power5+/Implies: Likewise.
|
||||
|
||||
2013-04-23 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/powerpc/power5/fpu/s_modf.c: New file: modf optimization for
|
||||
POWER.
|
||||
* sysdeps/powerpc/power5/fpu/s_modff.c: New file: modff optimization
|
||||
for POWER.
|
||||
* sysdeps/powerpc/powerpc64/power5/Implies: Add powerpc/power5 and
|
||||
powerpc/power5/fpu folders.
|
||||
* sysdeps/powerpc/powerpc32/power5/Implies: Likewise.
|
||||
|
||||
2013-04-02 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/powerpc/powerpc32/fpu/s_rint.S: Remove branch prediction
|
||||
instructions.
|
||||
* sysdeps/powerpc/powerpc32/fpu/s_rintf.S: Likewise.
|
||||
* sysdeps/powerpc/powerpc64/fpu/s_rint.S: Likewise.
|
||||
* sysdeps/powerpc/powerpc64/fpu/s_rintf.S: Likewise.
|
||||
* benchtests/Makefile: Add rint benchtest.
|
||||
* benchtests/rint-inputs: Input for rint benchtest.
|
||||
|
||||
2013-03-28 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* sysdeps/powerpc/powerpc32/start.S (cfi_startproc, cfi_endproc):
|
||||
Define as empty.
|
||||
* sysdeps/powerpc/powerpc64/start.S (cfi_startproc, cfi_endproc):
|
||||
Likewise.
|
||||
|
||||
2013-03-25 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/powerpc/fpu/s_llround.c: Fix libm ABI issue with missing
|
||||
llroundl symbol when building for PPC32.
|
||||
|
||||
2013-03-21 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/powerpc/fpu/w_sqrt.c (compat_symbol): Add sqrtl compat
|
||||
symbol.
|
||||
|
||||
2013-03-15 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h (VDSO_IFUNC_RET): Add
|
||||
macro to return vdso values correctly in IFUNC implementations.
|
||||
* sysdeps/unix/sysv/linux/powerpc/gettimeofday.c (__gettimeofday):
|
||||
Optimization by using IFUNC.
|
||||
|
||||
2013-03-08 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/ieee754/ldbl-128ibm/math_ldbl.h (ldbl_pack): Rename to
|
||||
default_ldbl_pack and using as default implementation.
|
||||
(ldbl_unpack): Rename to default_ldbl_unpack and using as default
|
||||
implementation.
|
||||
* sysdeps/powerpc/fpu/math_ldbl.h (ldbl_extract_mantissa): Remove
|
||||
redundant definition.
|
||||
(ldbl_insert_mantissa): Likewise.
|
||||
(ldbl_canonicalize): Likewise.
|
||||
(ldbl_nearbyint): Likewise.
|
||||
(ldbl_pack): Rename to ldbl_pack_ppc.
|
||||
(ldbl_unpack): Rename to ldbl_unpack_ppc.
|
||||
* sysdeps/unix/sysv/linux/powerpc/Implies: Remove file.
|
||||
* sysdeps/powerpc/Implies: Add ieee754/ldbl-opt after ieee754/ldbl-128ibm.
|
||||
|
||||
2013-03-08 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
|
||||
* sysdeps/powerpc/powerpc32/power4/fpu/mpa.c: Move file...
|
||||
* sysdeps/powerpc/power4/fpu/mpa.c: ... here.
|
||||
* sysdeps/powerpc/powerpc32/power4/fpu/Makefile: Move file...
|
||||
* sysdeps/powerpc/power4/fpu/Makefile: ... here.
|
||||
* sysdeps/powerpc/powerpc64/power4/fpu/mpa.c: Remove file.
|
||||
* sysdeps/powerpc/powerpc64/power4/fpu/Makefile: Remove file.
|
||||
* sysdeps/powerpc/powerpc32/power4/Implies: New file.
|
||||
* sysdeps/powerpc/powerpc64/power4/Implies: New file.
|
||||
|
||||
2013-02-28 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
[BZ #15055]
|
||||
* sysdeps/ieee754/ldbl-128ibm/e_acoshl.c (__ieee754_acoshl): Use
|
||||
__ieee754_sqrl instead of __sqrl.
|
||||
|
||||
2013-01-18 Anton Blanchard <anton@samba.org>
|
||||
Ryan S. Arnold <rsa@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/powerpc/init-first.c: Rename
|
||||
__kernel_vdso_get_tbfreq to __kernel_get_tbfreq.
|
||||
* sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c: Add parameter to
|
||||
INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK to specify return type.
|
||||
* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
|
||||
(INTERNAL_VSYSCALL_NCS): Change "=&r" in inline asm output regs list to
|
||||
"+r" and remove output regs list as redundant. Add explicit inline
|
||||
asm to specify register of return val to work around compiler codegen
|
||||
bug. Remove (int) cast on return value. Add return type parameter to
|
||||
use in macro so that this macro does not truncate return value for
|
||||
64-bit values.
|
||||
(INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK): Add return type parameter and
|
||||
pass to INTERNAL_VSYSCALL_NCS.
|
||||
(INLINE_VSYSCALL): Add 'long int' as return type to
|
||||
INTERNAL_VSYSCALL_NCS macro invocation.
|
||||
(INTERNAL_VSYSCALL): Add 'long int' as return type to
|
||||
INTERNAL_VSYSCALL_NCS macro invocation.
|
||||
* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise.
|
||||
|
||||
2013-01-09 Anton Blanchard <anton@samba.org>
|
||||
|
||||
* sysdeps/unix/sysv/linux/powerpc/sched_getcpu.c: New file.
|
||||
* sysdeps/unix/sysv/linux/powerpc/Versions: Add __vdso_getcpu.
|
||||
* sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h: Likewise.
|
||||
* sysdeps/unix/sysv/linux/powerpc/init-first.c: Likewise.
|
||||
|
||||
2013-02-08 Carlos O'Donell <carlos@redhat.com>
|
||||
|
||||
[BZ #15006]
|
||||
* sysdeps/generic/ldconfig.h: Define FLAG_ARM_LIBSF.
|
||||
* elf/cache.c (print_entry): Add FLAG_ARM_LIBSF support.
|
||||
|
||||
2013-03-30 David S. Miller <davem@davemloft.net>
|
||||
|
||||
* po/de.po: Update from translation team.
|
||||
|
||||
2013-01-31 David S. Miller <davem@davemloft.net>
|
||||
|
||||
* po/de.po: Update from translation team.
|
||||
|
||||
2013-01-11 Andreas Jaeger <aj@suse.de>
|
||||
|
||||
[BZ #15003]
|
||||
* sysdeps/unix/sysv/linux/bits/socket.h (MSG_FASTOPEN): New
|
||||
value. Sync with Linux 3.7.
|
||||
|
||||
2013-01-09 David S. Miller <davem@davemloft.net>
|
||||
|
||||
[BZ# 15003]
|
||||
* sysdeps/gnu/netinet/tcp.h (TCP_COOKIE_TRANSACTIONS,
|
||||
TCP_THIN_LINEAR_TIMEOUTS, TCP_THIN_DUPACK, TCP_USER_TIMEOUT,
|
||||
TCP_REPAIR, TCP_REPAIR_QUEUE, TCP_QUEUE_SEQ, TCP_REPAIR_OPTIONS,
|
||||
TCP_FASTOPEN): Define.
|
||||
(tcp_repair_opt): New structure.
|
||||
(TCP_NO_QUEUE, TCP_RECV_QUEUE, TCP_SEND_QUEUE, TCP_QUEUES_NR): New
|
||||
enum values.
|
||||
(TCP_COOKIE_MIN, TCP_COOKIE_MAX, TCP_COOKIE_PAIR_SIZE,
|
||||
TCP_COOKIE_IN_ALWAYS, TCP_COOKIE_OUT_NEVER, TCP_S_DATA_IN,
|
||||
TCP_S_DATA_OUT, TCP_MSS_DEFAULT, TCP_MSS_DESIRED): Define.
|
||||
(tcp_cookie_transactions): New structure.
|
||||
|
||||
2013-01-09 Andreas Jaeger <aj@suse.de>
|
||||
|
||||
* sysdeps/gnu/netinet/tcp.h (TCPI_OPT_SYN_DATA)
|
||||
(TCPI_OPT_ECN_SEEN): Define. Sync with Linux 3.7.
|
||||
|
||||
2013-01-01 David S. Miller <davem@davemloft.net>
|
||||
|
||||
* po/fr.po: Update from translation team.
|
||||
* po/ca.po: Likewise.
|
||||
|
||||
2012-12-21 David S. Miller <davem@davemloft.net>
|
||||
|
||||
* po/hr.po: Update from translation team.
|
||||
|
||||
@@ -4,6 +4,12 @@ See the end for copying conditions.
|
||||
|
||||
Please send GNU C library bug reports via <http://sourceware.org/bugzilla/>
|
||||
using `glibc' in the "product" field.
|
||||
|
||||
Version 2.17.1
|
||||
|
||||
* The following bugs are resolved with this release:
|
||||
15003, 15006, 15055, 15122, 15497, 15759.
|
||||
|
||||
|
||||
Version 2.17
|
||||
|
||||
@@ -103,23 +109,23 @@ Version 2.16
|
||||
4822, 5077, 5461, 5805, 5993, 6471, 6486, 6578, 6649, 6730, 6770, 6794,
|
||||
6884, 6890, 6894, 6895, 6907, 6911, 6959, 7064, 9739, 9902, 10110, 10135,
|
||||
10140, 10153, 10210, 10254, 10346, 10375, 10545, 10716, 10846, 11174,
|
||||
11322, 11365, 11451, 11494, 11521, 11677, 11837, 11959, 12047, 12097,
|
||||
12193, 12194, 12297, 12298, 12301, 12340, 12354, 12416, 12495, 13058,
|
||||
13223, 13361, 13525, 13526, 13527, 13528, 13529, 13530, 13531, 13532,
|
||||
13533, 13547, 13551, 13552, 13553, 13555, 13556, 13559, 13563, 13566,
|
||||
13576, 13579, 13583, 13592, 13594, 13613, 13618, 13637, 13656, 13658,
|
||||
13673, 13691, 13695, 13704, 13705, 13706, 13718, 13726, 13738, 13739,
|
||||
13743, 13750, 13758, 13760, 13761, 13775, 13786, 13787, 13792, 13806,
|
||||
13824, 13840, 13841, 13844, 13846, 13848, 13851, 13852, 13854, 13871,
|
||||
13872, 13873, 13879, 13882, 13883, 13884, 13885, 13886, 13892, 13895,
|
||||
13908, 13910, 13911, 13912, 13913, 13914, 13915, 13916, 13917, 13918,
|
||||
13919, 13920, 13921, 13922, 13923, 13924, 13926, 13927, 13928, 13938,
|
||||
13941, 13942, 13954, 13955, 13956, 13963, 13967, 13968, 13970, 13973,
|
||||
13979, 13983, 13986, 13996, 14012, 14027, 14033, 14034, 14036, 14040,
|
||||
14043, 14044, 14048, 14049, 14050, 14053, 14055, 14059, 14064, 14075,
|
||||
14080, 14083, 14103, 14104, 14109, 14112, 14117, 14122, 14123, 14134,
|
||||
14153, 14183, 14188, 14199, 14210, 14218, 14229, 14241, 14273, 14277,
|
||||
14278.
|
||||
11261, 11322, 11365, 11451, 11494, 11521, 11677, 11837, 11959, 12047,
|
||||
12097, 12193, 12194, 12297, 12298, 12301, 12340, 12354, 12416, 12495,
|
||||
13058, 13223, 13361, 13525, 13526, 13527, 13528, 13529, 13530, 13531,
|
||||
13532, 13533, 13547, 13551, 13552, 13553, 13555, 13556, 13559, 13563,
|
||||
13566, 13576, 13579, 13583, 13592, 13594, 13613, 13618, 13637, 13656,
|
||||
13658, 13673, 13691, 13695, 13704, 13705, 13706, 13718, 13726, 13738,
|
||||
13739, 13743, 13750, 13758, 13760, 13761, 13775, 13786, 13787, 13792,
|
||||
13806, 13824, 13840, 13841, 13844, 13846, 13848, 13851, 13852, 13854,
|
||||
13871, 13872, 13873, 13879, 13882, 13883, 13884, 13885, 13886, 13892,
|
||||
13895, 13908, 13910, 13911, 13912, 13913, 13914, 13915, 13916, 13917,
|
||||
13918, 13919, 13920, 13921, 13922, 13923, 13924, 13926, 13927, 13928,
|
||||
13938, 13941, 13942, 13954, 13955, 13956, 13963, 13967, 13968, 13970,
|
||||
13973, 13979, 13983, 13986, 13996, 14012, 14027, 14033, 14034, 14036,
|
||||
14040, 14043, 14044, 14048, 14049, 14050, 14053, 14055, 14059, 14064,
|
||||
14075, 14080, 14083, 14103, 14104, 14109, 14112, 14117, 14122, 14123,
|
||||
14134, 14153, 14183, 14188, 14199, 14210, 14218, 14229, 14241, 14273,
|
||||
14277, 14278.
|
||||
|
||||
* Support for the x32 ABI on x86-64 added. The x32 target is selected by
|
||||
configuring glibc with:
|
||||
|
||||
@@ -69,6 +69,9 @@
|
||||
/* Define if the compiler supports __builtin_memset. */
|
||||
#undef HAVE_BUILTIN_MEMSET
|
||||
|
||||
/* Define if compiler accepts -ftree-loop-distribute-patterns. */
|
||||
#undef HAVE_CC_INHIBIT_LOOP_TO_LIBCALL
|
||||
|
||||
/* Define if the regparm attribute shall be used for local functions
|
||||
(gcc on ix86 only). */
|
||||
#undef USE_REGPARMS
|
||||
|
||||
@@ -605,6 +605,7 @@ have_selinux
|
||||
have_libcap
|
||||
have_libaudit
|
||||
LIBGD
|
||||
libc_cv_cc_loop_to_function
|
||||
libc_cv_cc_submachine
|
||||
exceptions
|
||||
gnu89_inline
|
||||
@@ -7164,6 +7165,38 @@ $as_echo "$libc_cv_cc_submachine" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
|
||||
__attribute__ ((__optimize__))" >&5
|
||||
$as_echo_n "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
|
||||
__attribute__ ((__optimize__))... " >&6; }
|
||||
if ${libc_cv_cc_loop_to_function+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat > conftest.c <<EOF
|
||||
void
|
||||
__attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
|
||||
foo (void) {}
|
||||
EOF
|
||||
libc_cv_cc_loop_to_function=no
|
||||
if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c'
|
||||
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; }
|
||||
then
|
||||
libc_cv_cc_loop_to_function=yes
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_loop_to_function" >&5
|
||||
$as_echo "$libc_cv_cc_loop_to_function" >&6; }
|
||||
if test $libc_cv_cc_loop_to_function = yes; then
|
||||
$as_echo "#define HAVE_CC_INHIBIT_LOOP_TO_LIBCALL 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgd" >&5
|
||||
$as_echo_n "checking for libgd... " >&6; }
|
||||
if test "$with_gd" != "no"; then
|
||||
|
||||
@@ -1928,6 +1928,24 @@ if test -n "$submachine"; then
|
||||
fi
|
||||
AC_SUBST(libc_cv_cc_submachine)
|
||||
|
||||
AC_CACHE_CHECK(if $CC accepts -fno-tree-loop-distribute-patterns with \
|
||||
__attribute__ ((__optimize__)), libc_cv_cc_loop_to_function, [dnl
|
||||
cat > conftest.c <<EOF
|
||||
void
|
||||
__attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
|
||||
foo (void) {}
|
||||
EOF
|
||||
libc_cv_cc_loop_to_function=no
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c])
|
||||
then
|
||||
libc_cv_cc_loop_to_function=yes
|
||||
fi
|
||||
rm -f conftest*])
|
||||
if test $libc_cv_cc_loop_to_function = yes; then
|
||||
AC_DEFINE(HAVE_CC_INHIBIT_LOOP_TO_LIBCALL)
|
||||
fi
|
||||
AC_SUBST(libc_cv_cc_loop_to_function)
|
||||
|
||||
dnl Check whether we have the gd library available.
|
||||
AC_MSG_CHECKING(for libgd)
|
||||
if test "$with_gd" != "no"; then
|
||||
|
||||
+5
-1
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1999-2012 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Andreas Jaeger <aj@suse.de>, 1999.
|
||||
|
||||
@@ -100,6 +100,10 @@ print_entry (const char *lib, int flag, unsigned int osversion,
|
||||
case FLAG_AARCH64_LIB64:
|
||||
fputs (",AArch64", stdout);
|
||||
break;
|
||||
/* Uses the ARM soft-float ABI. */
|
||||
case FLAG_ARM_LIBSF:
|
||||
fputs (",soft-float", stdout);
|
||||
break;
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -129,6 +129,7 @@ ElfW(auxv_t) *_dl_auxv;
|
||||
ElfW(Phdr) *_dl_phdr;
|
||||
size_t _dl_phnum;
|
||||
uint64_t _dl_hwcap __attribute__ ((nocommon));
|
||||
uint64_t _dl_hwcap2 __attribute__ ((nocommon));
|
||||
|
||||
/* This is not initialized to HWCAP_IMPORTANT, matching the definition
|
||||
of _dl_important_hwcaps, below, where no hwcap strings are ever
|
||||
@@ -212,6 +213,9 @@ _dl_aux_init (ElfW(auxv_t) *av)
|
||||
case AT_HWCAP:
|
||||
GLRO(dl_hwcap) = (unsigned long int) av->a_un.a_val;
|
||||
break;
|
||||
case AT_HWCAP2:
|
||||
GLRO(dl_hwcap2) = (unsigned long int) av->a_un.a_val;
|
||||
break;
|
||||
#ifdef NEED_DL_SYSINFO
|
||||
case AT_SYSINFO:
|
||||
GL(dl_sysinfo) = av->a_un.a_val;
|
||||
|
||||
+7
-3
@@ -156,6 +156,9 @@ _dl_sysdep_start (void **start_argptr,
|
||||
case AT_HWCAP:
|
||||
GLRO(dl_hwcap) = (unsigned long int) av->a_un.a_val;
|
||||
break;
|
||||
case AT_HWCAP2:
|
||||
GLRO(dl_hwcap2) = (unsigned long int) av->a_un.a_val;
|
||||
break;
|
||||
case AT_CLKTCK:
|
||||
GLRO(dl_clktck) = av->a_un.a_val;
|
||||
break;
|
||||
@@ -298,6 +301,7 @@ _dl_show_auxv (void)
|
||||
[AT_SYSINFO - 2] = { "SYSINFO: 0x", hex },
|
||||
[AT_SYSINFO_EHDR - 2] = { "SYSINFO_EHDR: 0x", hex },
|
||||
[AT_RANDOM - 2] = { "RANDOM: 0x", hex },
|
||||
[AT_HWCAP2 - 2] = { "HWCAP2: 0x", hex },
|
||||
};
|
||||
unsigned int idx = (unsigned int) (av->a_type - 2);
|
||||
|
||||
@@ -309,10 +313,10 @@ _dl_show_auxv (void)
|
||||
assert (AT_NULL == 0);
|
||||
assert (AT_IGNORE == 1);
|
||||
|
||||
if (av->a_type == AT_HWCAP)
|
||||
if (av->a_type == AT_HWCAP || av->a_type == AT_HWCAP2)
|
||||
{
|
||||
/* This is handled special. */
|
||||
if (_dl_procinfo (av->a_un.a_val) == 0)
|
||||
/* These are handled in a special way per platform. */
|
||||
if (_dl_procinfo (av->a_type, av->a_un.a_val) == 0)
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -987,7 +987,7 @@ typedef struct
|
||||
|
||||
/* Some more special a_type values describing the hardware. */
|
||||
#define AT_PLATFORM 15 /* String identifying platform. */
|
||||
#define AT_HWCAP 16 /* Machine dependent hints about
|
||||
#define AT_HWCAP 16 /* Machine-dependent hints about
|
||||
processor capabilities. */
|
||||
|
||||
/* This entry gives some information about the FPU initialization
|
||||
@@ -1009,6 +1009,9 @@ typedef struct
|
||||
|
||||
#define AT_RANDOM 25 /* Address of 16 random bytes. */
|
||||
|
||||
#define AT_HWCAP2 26 /* More machine-dependent hints about
|
||||
processor capabilities. */
|
||||
|
||||
#define AT_EXECFN 31 /* Filename of executable. */
|
||||
|
||||
/* Pointer to the global system page used for system calls and other
|
||||
|
||||
@@ -783,4 +783,14 @@ for linking")
|
||||
#define libc_ifunc_hidden_def(name) \
|
||||
libc_ifunc_hidden_def1 (__GI_##name, name)
|
||||
|
||||
/* Add the compiler optimization to inhibit loop transformation to library
|
||||
calls. This is used to avoid recursive calls in memset and memmove
|
||||
default implementations. */
|
||||
#ifdef HAVE_CC_INHIBIT_LOOP_TO_LIBCALL
|
||||
# define inhibit_loop_to_libcall \
|
||||
__attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
|
||||
#else
|
||||
# define inhibit_loop_to_libcall
|
||||
#endif
|
||||
|
||||
#endif /* libc-symbols.h */
|
||||
|
||||
@@ -34,3 +34,47 @@ This frequency is not related to the processor clock or the bus clock.
|
||||
It is also possible that this frequency is not constant. More information is
|
||||
available in @cite{Power ISA 2.06b - Book II - Section 5.2}.
|
||||
@end deftypefun
|
||||
|
||||
The following functions provide hints about the usage of resources that are
|
||||
shared with other processors. They can be used, for example, if a program
|
||||
waiting on a lock intends to divert the shared resources to be used by other
|
||||
processors. More information is available in @cite{Power ISA 2.06b - Book II -
|
||||
Section 3.2}.
|
||||
|
||||
@deftypefun {void} __ppc_yield (void)
|
||||
Provide a hint that performance will probably be improved if shared resources
|
||||
dedicated to the executing processor are released for use by other processors.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun {void} __ppc_mdoio (void)
|
||||
Provide a hint that performance will probably be improved if shared resources
|
||||
dedicated to the executing processor are released until all outstanding storage
|
||||
accesses to caching-inhibited storage have been completed.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun {void} __ppc_mdoom (void)
|
||||
Provide a hint that performance will probably be improved if shared resources
|
||||
dedicated to the executing processor are released until all outstanding storage
|
||||
accesses to cacheable storage for which the data is not in the cache have been
|
||||
completed.
|
||||
|
||||
@deftypefun {void} __ppc_set_ppr_med (void)
|
||||
Set the Program Priority Register to medium value (default).
|
||||
|
||||
The @dfn{Program Priority Register} (PPR) is a 64-bit register that controls
|
||||
the program's priority. By adjusting the PPR value the programmer may
|
||||
improve system throughput by causing the system resources to be used
|
||||
more efficiently, especially in contention situations.
|
||||
The three unprivileged states available are covered by the functions
|
||||
@code{__ppc_set_ppr_med} (medium -- default), @code{__ppc_set_ppc_low} (low)
|
||||
and @code{__ppc_set_ppc_med_low} (medium low). More information
|
||||
available in @cite{Power ISA 2.06b - Book II - Section 3.1}.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun {void} __ppc_set_ppr_low (void)
|
||||
Set the Program Priority Register to low value.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun {void} __ppc_set_ppr_med_low (void)
|
||||
Set the Program Priority Register to medium low value.
|
||||
@end deftypefun
|
||||
|
||||
@@ -26,6 +26,8 @@ __getauxval (unsigned long int type)
|
||||
|
||||
if (type == AT_HWCAP)
|
||||
return GLRO(dl_hwcap);
|
||||
else if (type == AT_HWCAP2)
|
||||
return GLRO(dl_hwcap2);
|
||||
|
||||
for (p = GLRO(dl_auxv); p->a_type != AT_NULL; p++)
|
||||
if (p->a_type == type)
|
||||
|
||||
@@ -61,6 +61,11 @@ typedef union dtv
|
||||
are private. */
|
||||
typedef struct
|
||||
{
|
||||
/* Reservation for the Event-Based Branching ABI. */
|
||||
uintptr_t ebb_handler;
|
||||
uintptr_t ebb_ctx_pointer;
|
||||
uintptr_t ebb_reserved1;
|
||||
uintptr_t ebb_reserved2;
|
||||
uintptr_t pointer_guard;
|
||||
uintptr_t stack_guard;
|
||||
dtv_t *dtv;
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
# Copyright © 1996, 2002 Free Software Foundation, Inc.
|
||||
# This file is distributed under the same license as the glibc package.
|
||||
# Karl Eichwalder <ke@suse.de>, 2002.
|
||||
# Jochen Hein <jochen@jochen.org>, 1996-2012.
|
||||
# Jochen Hein <jochen@jochen.org>, 1996-2013.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GNU libc 2.17-pre1\n"
|
||||
"POT-Creation-Date: 2012-12-07 15:10-0500\n"
|
||||
"PO-Revision-Date: 2012-12-08 15:07+0100\n"
|
||||
"PO-Revision-Date: 2013-03-30 16:56+0100\n"
|
||||
"Last-Translator: Jochen Hein <jochen@jochen.org>\n"
|
||||
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
|
||||
"Language: de\n"
|
||||
@@ -791,7 +791,7 @@ msgstr "%s ist ein unbekannter Bibliothekstyp"
|
||||
#: elf/ldconfig.c:409
|
||||
#, c-format
|
||||
msgid "Can't stat %s"
|
||||
msgstr "Kann »stat()« für »%s« nicht aufrufenen"
|
||||
msgstr "Kann »stat()« für »%s« nicht aufrufen"
|
||||
|
||||
#: elf/ldconfig.c:483
|
||||
#, c-format
|
||||
@@ -988,7 +988,7 @@ msgstr "Warnung: Sie haben kein Ausführungsrecht für"
|
||||
|
||||
#: elf/ldd.bash.in:183
|
||||
msgid "\tnot a dynamic executable"
|
||||
msgstr "\\tdas Programm ist nicht dynamisch gelinkt"
|
||||
msgstr "\tdas Programm ist nicht dynamisch gelinkt"
|
||||
|
||||
# XXX need to look at source
|
||||
#: elf/ldd.bash.in:191
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
2013-06-28 Ryan S. Arnold <rsa@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/alpha/dl-procinfo.h (_dl_procinfo): Add TYPE parameter
|
||||
to macro prototype for AT_HWCAP2 support.
|
||||
|
||||
2013-05-22 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/alpha/bits/siginfo.h (siginfo_t): Add
|
||||
si_trapno and si_addr_lsb to _sifields.sigfault.
|
||||
(si_trapno, si_addr_lsb): Define new macros.
|
||||
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
|
||||
|
||||
2012-12-07 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* sysdeps/alpha/Makefile [$(subdir) = math]
|
||||
|
||||
@@ -1,3 +1,19 @@
|
||||
2013-06-28 Ryan S. Arnold <rsa@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/arm/dl-procinfo.h (_dl_procinfo): Add
|
||||
TYPE parameter to macro prototype for AT_HWCAP2 support. Make WORD
|
||||
unsigned long int rather than signed int. Stub in handler for TYPE ==
|
||||
AT_HWCAP2 to return -1 for unknown a_type display fallback.
|
||||
|
||||
2013-02-08 Carlos O'Donell <carlos@redhat.com>
|
||||
|
||||
[BZ #15006]
|
||||
* sysdeps/unix/sysv/linux/arm/dl-cache.h
|
||||
[__ARM_PCS_VFP] (_dl_cache_check_flags): Allow plain FLAG_ELF_LIBC6.
|
||||
[!__ARM_PCS_VFP] (_dl_cache_check_flags): Likewise.
|
||||
* sysdeps/unix/sysv/linux/arm/readelflib.c (process_elf_file):
|
||||
Set FLAG_ARM_LIBSF for soft-float ABI otherwise just FLAG_ELF_LIBC6.
|
||||
|
||||
2012-12-04 Steve McIntyre <steve.mcintyre@linaro.org>
|
||||
|
||||
* sysdeps/unix/sysv/linux/arm/dl-cache.h: New file.
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
2013-05-22 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/ia64/bits/siginfo.h (siginfo_t): Add
|
||||
si_addr_lsb to _sifields.sigfault.
|
||||
(si_addr_lsb): Define new macro.
|
||||
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
|
||||
|
||||
2012-11-29 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c: Delete.
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
2013-06-28 Ryan S. Arnold <rsa@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/mips/dl-procinfo.h (_dl_procinfo): Add TYPE parameter
|
||||
to macro prototype for AT_HWCAP2 support.
|
||||
|
||||
2013-05-22 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/mips/bits/siginfo.h (siginfo_t): Add
|
||||
si_addr_lsb to _sifields.sifault.
|
||||
(si_addr_lsb): Define new macro.
|
||||
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
|
||||
|
||||
2012-12-04 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* sysdeps/mips/fpu_control.h [__mips_soft_float] (_FPU_GETCW):
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
2013-06-11 Ryan S. Arnold <rsa@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/powerpc/dl-procinfo.c: Remove as this is now redundant with
|
||||
glibc/sysdeps/powerpc/dl-procinfo.c.
|
||||
* sysdeps/powerpc/dl-procinfo.h: Remove as this is now redundant with
|
||||
glibc/sysdeps/powerpc/dl-procinfo.h
|
||||
|
||||
2013-06-11 Ryan S. Arnold <rsa@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/powerpc/dl-procinfo.h: Fix whitespace by correcting
|
||||
spaces with tabs where appropriate.
|
||||
|
||||
2012-12-05 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* sysdeps/powerpc/nofpu/fgetexcptflg.c (__fegetexceptflag):
|
||||
|
||||
@@ -1,3 +1,29 @@
|
||||
2013-05-22 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/tile/bits/siginfo.h (siginfo_t): Fix comment
|
||||
formatting. Add si_addr_lsb to _sifields.sigfault.
|
||||
(si_addr_lsb): Define new macro.
|
||||
(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
|
||||
|
||||
2013-07-22 Chris Metcalf <cmetcalf@tilera.com>
|
||||
|
||||
[BZ #15759]
|
||||
* sysdeps/tile/dl-runtime.c (sim_dlclose): New function.
|
||||
(_dl_unmap): Call sim_dlclose().
|
||||
|
||||
2013-06-12 Chris Metcalf <cmetcalf@tilera.com>
|
||||
|
||||
* sysdeps/tile/bits/endian.h (__BYTE_ORDER): Default to little.
|
||||
|
||||
2013-05-23 Chris Metcalf <cmetcalf@tilera.com>
|
||||
|
||||
* sysdeps/tile/tilegx/Makefile ($(cflags-mcmodel-large)):
|
||||
Test for assembler and linker support for "-mcmodel=large -fpic"
|
||||
in addition to compiler support; provide -DNO_PLT_PCREL if not.
|
||||
* sysdeps/tile/start.S [NO_PLT_PCREL]: Guard for no PC-relative
|
||||
PLT operators in assembly.
|
||||
* sysdeps/tile/crti.S [NO_PLT_PCREL]: Likewise.
|
||||
|
||||
2012-12-14 Chris Metcalf <cmetcalf@tilera.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/tile/nptl/clone.S: Fix DWARF info.
|
||||
|
||||
@@ -51,7 +51,7 @@ _dl_string_platform (const char *str)
|
||||
};
|
||||
|
||||
/* We cannot provide a general printing function. */
|
||||
#define _dl_procinfo(word) -1
|
||||
#define _dl_procinfo(type, word) -1
|
||||
|
||||
/* There are no hardware capabilities defined. */
|
||||
#define _dl_hwcap_string(idx) ""
|
||||
|
||||
@@ -51,7 +51,7 @@ _dl_string_platform (const char *str)
|
||||
};
|
||||
|
||||
/* We cannot provide a general printing function. */
|
||||
#define _dl_procinfo(word) -1
|
||||
#define _dl_procinfo(type, word) -1
|
||||
|
||||
/* There are no hardware capabilities defined. */
|
||||
#define _dl_hwcap_string(idx) ""
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* Data for processor capability information. PowerPC version.
|
||||
Copyright (C) 2005-2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library. If not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* This information must be kept in sync with the _DL_HWCAP_COUNT and
|
||||
_DL_PLATFORM_COUNT definitions in procinfo.h.
|
||||
|
||||
If anything should be added here check whether the size of each string
|
||||
is still ok with the given array size.
|
||||
|
||||
All the #ifdefs in the definitions are quite irritating but
|
||||
necessary if we want to avoid duplicating the information. There
|
||||
are three different modes:
|
||||
|
||||
- PROCINFO_DECL is defined. This means we are only interested in
|
||||
declarations.
|
||||
|
||||
- PROCINFO_DECL is not defined:
|
||||
|
||||
+ if SHARED is defined the file is included in an array
|
||||
initializer. The .element = { ... } syntax is needed.
|
||||
|
||||
+ if SHARED is not defined a normal array initialization is
|
||||
needed.
|
||||
*/
|
||||
|
||||
#ifndef PROCINFO_CLASS
|
||||
# define PROCINFO_CLASS
|
||||
#endif
|
||||
|
||||
#if !defined PROCINFO_DECL && defined SHARED
|
||||
._dl_powerpc_cap_flags
|
||||
#else
|
||||
PROCINFO_CLASS const char _dl_powerpc_cap_flags[25][10]
|
||||
#endif
|
||||
#ifndef PROCINFO_DECL
|
||||
= {
|
||||
"vsx",
|
||||
"arch_2_06", "power6x", "dfp", "pa6t",
|
||||
"arch_2_05", "ic_snoop", "smt", "booke",
|
||||
"cellbe", "power5+", "power5", "power4",
|
||||
"notb", "efpdouble", "efpsingle", "spe",
|
||||
"ucache", "4xxmac", "mmu", "fpu",
|
||||
"altivec", "ppc601", "ppc64", "ppc32",
|
||||
}
|
||||
#endif
|
||||
#if !defined SHARED || defined PROCINFO_DECL
|
||||
;
|
||||
#else
|
||||
,
|
||||
#endif
|
||||
|
||||
#if !defined PROCINFO_DECL && defined SHARED
|
||||
._dl_powerpc_platforms
|
||||
#else
|
||||
PROCINFO_CLASS const char _dl_powerpc_platforms[13][12]
|
||||
#endif
|
||||
#ifndef PROCINFO_DECL
|
||||
= {
|
||||
[PPC_PLATFORM_POWER4] = "power4",
|
||||
[PPC_PLATFORM_PPC970] = "ppc970",
|
||||
[PPC_PLATFORM_POWER5] = "power5",
|
||||
[PPC_PLATFORM_POWER5_PLUS] = "power5+",
|
||||
[PPC_PLATFORM_POWER6] = "power6",
|
||||
[PPC_PLATFORM_CELL_BE] = "ppc-cell-be",
|
||||
[PPC_PLATFORM_POWER6X] = "power6x",
|
||||
[PPC_PLATFORM_POWER7] = "power7",
|
||||
[PPC_PLATFORM_PPCA2] = "ppca2",
|
||||
[PPC_PLATFORM_PPC405] = "ppc405",
|
||||
[PPC_PLATFORM_PPC440] = "ppc440",
|
||||
[PPC_PLATFORM_PPC464] = "ppc464",
|
||||
[PPC_PLATFORM_PPC476] = "ppc476"
|
||||
}
|
||||
#endif
|
||||
#if !defined SHARED || defined PROCINFO_DECL
|
||||
;
|
||||
#else
|
||||
,
|
||||
#endif
|
||||
|
||||
#undef PROCINFO_DECL
|
||||
#undef PROCINFO_CLASS
|
||||
@@ -1,172 +0,0 @@
|
||||
/* Processor capability information handling macros. PowerPC version.
|
||||
Copyright (C) 2005-2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library. If not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _DL_PROCINFO_H
|
||||
#define _DL_PROCINFO_H 1
|
||||
|
||||
#include <ldsodefs.h>
|
||||
#include <sysdep.h> /* This defines the PPC_FEATURE_* macros. */
|
||||
|
||||
/* There are 25 bits used, but they are bits 7..31. */
|
||||
#define _DL_HWCAP_FIRST 7
|
||||
#define _DL_HWCAP_COUNT 32
|
||||
|
||||
/* These bits influence library search. */
|
||||
#define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC \
|
||||
+ PPC_FEATURE_HAS_DFP)
|
||||
|
||||
#define _DL_PLATFORMS_COUNT 13
|
||||
|
||||
#define _DL_FIRST_PLATFORM 32
|
||||
/* Mask to filter out platforms. */
|
||||
#define _DL_HWCAP_PLATFORM (((1ULL << _DL_PLATFORMS_COUNT) - 1) \
|
||||
<< _DL_FIRST_PLATFORM)
|
||||
|
||||
/* Platform bits (relative to _DL_FIRST_PLATFORM). */
|
||||
#define PPC_PLATFORM_POWER4 0
|
||||
#define PPC_PLATFORM_PPC970 1
|
||||
#define PPC_PLATFORM_POWER5 2
|
||||
#define PPC_PLATFORM_POWER5_PLUS 3
|
||||
#define PPC_PLATFORM_POWER6 4
|
||||
#define PPC_PLATFORM_CELL_BE 5
|
||||
#define PPC_PLATFORM_POWER6X 6
|
||||
#define PPC_PLATFORM_POWER7 7
|
||||
#define PPC_PLATFORM_PPCA2 8
|
||||
#define PPC_PLATFORM_PPC405 9
|
||||
#define PPC_PLATFORM_PPC440 10
|
||||
#define PPC_PLATFORM_PPC464 11
|
||||
#define PPC_PLATFORM_PPC476 12
|
||||
|
||||
static inline const char *
|
||||
__attribute__ ((unused))
|
||||
_dl_hwcap_string (int idx)
|
||||
{
|
||||
return GLRO(dl_powerpc_cap_flags)[idx - _DL_HWCAP_FIRST];
|
||||
}
|
||||
|
||||
static inline const char *
|
||||
__attribute__ ((unused))
|
||||
_dl_platform_string (int idx)
|
||||
{
|
||||
return GLRO(dl_powerpc_platforms)[idx - _DL_FIRST_PLATFORM];
|
||||
}
|
||||
|
||||
static inline int
|
||||
__attribute__ ((unused))
|
||||
_dl_string_hwcap (const char *str)
|
||||
{
|
||||
for (int i = _DL_HWCAP_FIRST; i < _DL_HWCAP_COUNT; ++i)
|
||||
if (strcmp (str, _dl_hwcap_string (i)) == 0)
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline int
|
||||
__attribute__ ((unused, always_inline))
|
||||
_dl_string_platform (const char *str)
|
||||
{
|
||||
if (str == NULL)
|
||||
return -1;
|
||||
|
||||
if (strncmp (str, GLRO(dl_powerpc_platforms)[PPC_PLATFORM_POWER4], 5) == 0)
|
||||
{
|
||||
int ret;
|
||||
str += 5;
|
||||
switch (*str)
|
||||
{
|
||||
case '4':
|
||||
ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER4;
|
||||
break;
|
||||
case '5':
|
||||
ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER5;
|
||||
if (str[1] == '+')
|
||||
{
|
||||
ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER5_PLUS;
|
||||
++str;
|
||||
}
|
||||
break;
|
||||
case '6':
|
||||
ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER6;
|
||||
if (str[1] == 'x')
|
||||
{
|
||||
ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER6X;
|
||||
++str;
|
||||
}
|
||||
break;
|
||||
case '7':
|
||||
ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER7;
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
if (str[1] == '\0')
|
||||
return ret;
|
||||
}
|
||||
else if (strncmp (str, GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC970],
|
||||
3) == 0)
|
||||
{
|
||||
if (strcmp (str + 3, GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC970]
|
||||
+ 3) == 0)
|
||||
return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC970;
|
||||
else if (strcmp (str + 3,
|
||||
GLRO(dl_powerpc_platforms)[PPC_PLATFORM_CELL_BE] + 3)
|
||||
== 0)
|
||||
return _DL_FIRST_PLATFORM + PPC_PLATFORM_CELL_BE;
|
||||
else if (strcmp (str + 3,
|
||||
GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPCA2] + 3)
|
||||
== 0)
|
||||
return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPCA2;
|
||||
else if (strcmp (str + 3,
|
||||
GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC405] + 3)
|
||||
== 0)
|
||||
return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC405;
|
||||
else if (strcmp (str + 3,
|
||||
GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC440] + 3)
|
||||
== 0)
|
||||
return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC440;
|
||||
else if (strcmp (str + 3,
|
||||
GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC464] + 3)
|
||||
== 0)
|
||||
return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC464;
|
||||
else if (strcmp (str + 3,
|
||||
GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC476] + 3)
|
||||
== 0)
|
||||
return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC476;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef IS_IN_rtld
|
||||
static inline int
|
||||
__attribute__ ((unused))
|
||||
_dl_procinfo (int word)
|
||||
{
|
||||
_dl_printf ("AT_HWCAP: ");
|
||||
|
||||
for (int i = _DL_HWCAP_FIRST; i < _DL_HWCAP_COUNT; ++i)
|
||||
if (word & (1 << i))
|
||||
_dl_printf (" %s", _dl_hwcap_string (i));
|
||||
|
||||
_dl_printf ("\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* dl-procinfo.h */
|
||||
@@ -6,8 +6,6 @@
|
||||
|
||||
#if defined __BIG_ENDIAN__
|
||||
# define __BYTE_ORDER __BIG_ENDIAN
|
||||
#elif defined __LITTLE_ENDIAN__
|
||||
# define __BYTE_ORDER __LITTLE_ENDIAN
|
||||
#else
|
||||
# error "Endianness not declared!!"
|
||||
# define __BYTE_ORDER __LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
@@ -95,7 +95,7 @@ _init:
|
||||
LD_PTR r0, r0
|
||||
BEQZ r0, .Lno_weak_fn
|
||||
jalr r0
|
||||
#elif defined(__tilegx__)
|
||||
#elif defined(__tilegx__) && !defined(NO_PLT_PCREL)
|
||||
/* Since we are calling from the start of the object to the PLT,
|
||||
call by loading the full address into a register. */
|
||||
lnk r2
|
||||
|
||||
@@ -127,8 +127,8 @@ _dl_after_load (struct link_map *l)
|
||||
}
|
||||
|
||||
/* Support notifying the simulator about removed objects prior to munmap(). */
|
||||
void internal_function
|
||||
_dl_unmap (struct link_map *l)
|
||||
static void
|
||||
sim_dlclose (ElfW(Addr) map_start)
|
||||
{
|
||||
int shift;
|
||||
|
||||
@@ -144,9 +144,15 @@ _dl_unmap (struct link_map *l)
|
||||
DLPUTC ('0');
|
||||
DLPUTC ('x');
|
||||
for (shift = (int) sizeof (unsigned long) * 8 - 4; shift >= 0; shift -= 4)
|
||||
DLPUTC ("0123456789abcdef"[(l->l_map_start >> shift) & 0xF]);
|
||||
DLPUTC ("0123456789abcdef"[(map_start >> shift) & 0xF]);
|
||||
DLPUTC ('\0');
|
||||
#undef DLPUTC
|
||||
|
||||
#undef DLPUTC
|
||||
}
|
||||
|
||||
void internal_function
|
||||
_dl_unmap (struct link_map *l)
|
||||
{
|
||||
sim_dlclose (l->l_map_start);
|
||||
__munmap ((void *) l->l_map_start, l->l_map_end - l->l_map_start);
|
||||
}
|
||||
|
||||
@@ -62,6 +62,13 @@
|
||||
#include <sysdep.h>
|
||||
#include <arch/abi.h>
|
||||
|
||||
/* Just create no-ops if we don't support PC-relative PLT relocations. */
|
||||
#ifdef NO_PLT_PCREL
|
||||
# define hw2_last_plt(x) 0
|
||||
# define hw1_plt(x) 0
|
||||
# define hw0_plt(x) 0
|
||||
#endif
|
||||
|
||||
.text
|
||||
.global _start
|
||||
.type _start,@function
|
||||
@@ -155,7 +162,11 @@ _start:
|
||||
}
|
||||
{
|
||||
ADD_PTR r4, r4, r13
|
||||
jalr r12
|
||||
# ifdef NO_PLT_PCREL
|
||||
j plt(__libc_start_main)
|
||||
# else
|
||||
jr r12
|
||||
# endif
|
||||
}
|
||||
#else
|
||||
addli r0, r13, lo16(main - .Lmy_pc)
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
include $(common-objpfx)cflags-mcmodel-large.mk
|
||||
|
||||
# Check for gcc to support the command-line switch, and for
|
||||
# binutils to support the hwN_plt() assembly operators and relocations.
|
||||
$(common-objpfx)cflags-mcmodel-large.mk: $(common-objpfx)config.make
|
||||
mcmodel=no; \
|
||||
$(CC) -S -o /dev/null -xc /dev/null -mcmodel=large && mcmodel=yes; \
|
||||
(echo 'int main() { return getuid(); }' | \
|
||||
$(CC) -o /dev/null -xc - -mcmodel=large -fpic) && mcmodel=yes; \
|
||||
echo "cflags-mcmodel-large = $$mcmodel" > $@
|
||||
|
||||
ifeq ($(subdir),csu)
|
||||
ifeq (yes,$(cflags-mcmodel-large))
|
||||
|
||||
ifeq ($(subdir),csu)
|
||||
# elf-init.c is in libc_nonshared.o (the end of the shared object) but
|
||||
# must reach the _init symbol at the very start of the shared object.
|
||||
CFLAGS-elf-init.c += -mcmodel=large
|
||||
@@ -15,4 +19,17 @@ CFLAGS-elf-init.c += -mcmodel=large
|
||||
# with profiling, but calls to libc.so via the PLT at the very end.
|
||||
CFLAGS-gmon-start.c += -mcmodel=large
|
||||
endif
|
||||
|
||||
else
|
||||
|
||||
# Don't try to compile assembly code with hwN_plt() directives if the
|
||||
# toolchain doesn't support -mcmodel=large.
|
||||
ifeq ($(subdir),csu)
|
||||
CPPFLAGS-start.S += -DNO_PLT_PCREL
|
||||
CPPFLAGS-crti.S += -DNO_PLT_PCREL
|
||||
endif
|
||||
ifeq ($(subdir),nptl)
|
||||
CPPFLAGS-pt-crti.S += -DNO_PLT_PCREL
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
@@ -89,6 +89,8 @@ typedef struct
|
||||
struct
|
||||
{
|
||||
void *si_addr; /* Faulting insn/memory ref. */
|
||||
int si_trapno; /* TRAP # which caused the signal. */
|
||||
short int si_addr_lsb; /* Valid LSB of the reported address. */
|
||||
} _sigfault;
|
||||
|
||||
/* SIGPOLL. */
|
||||
@@ -121,6 +123,8 @@ typedef struct
|
||||
# define si_int _sifields._rt.si_sigval.sival_int
|
||||
# define si_ptr _sifields._rt.si_sigval.sival_ptr
|
||||
# define si_addr _sifields._sigfault.si_addr
|
||||
# define si_trapno _sifields._sigfault.si_trapno
|
||||
# define si_addr_lsb _sifields._sigfault.si_addr_lsb
|
||||
# define si_band _sifields._sigpoll.si_band
|
||||
# define si_fd _sifields._sigpoll.si_fd
|
||||
# define si_call_addr _sifields._sigsys._call_addr
|
||||
@@ -211,8 +215,12 @@ enum
|
||||
# define BUS_ADRALN BUS_ADRALN
|
||||
BUS_ADRERR, /* Non-existant physical address. */
|
||||
# define BUS_ADRERR BUS_ADRERR
|
||||
BUS_OBJERR /* Object specific hardware error. */
|
||||
BUS_OBJERR, /* Object specific hardware error. */
|
||||
# define BUS_OBJERR BUS_OBJERR
|
||||
BUS_MCEERR_AR, /* Hardware memory error: action required. */
|
||||
# define BUS_MCEERR_AR BUS_MCEERR_AR
|
||||
BUS_MCEERR_AO /* Hardware memory error: action optional. */
|
||||
# define BUS_MCEERR_AO BUS_MCEERR_AO
|
||||
};
|
||||
|
||||
/* `si_code' values for SIGTRAP signal. */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
|
||||
Copyright (C) 2003-2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2003-2013 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -18,12 +18,17 @@
|
||||
|
||||
#include <ldconfig.h>
|
||||
|
||||
/* In order to support the transition from unmarked objects
|
||||
to marked objects we must treat unmarked objects as
|
||||
compatible with either FLAG_ARM_LIBHF or FLAG_ARM_LIBSF. */
|
||||
#ifdef __ARM_PCS_VFP
|
||||
# define _dl_cache_check_flags(flags) \
|
||||
((flags) == (FLAG_ARM_LIBHF | FLAG_ELF_LIBC6))
|
||||
((flags) == (FLAG_ARM_LIBHF | FLAG_ELF_LIBC6) \
|
||||
|| (flags) == FLAG_ELF_LIBC6)
|
||||
#else
|
||||
# define _dl_cache_check_flags(flags) \
|
||||
((flags) == FLAG_ELF_LIBC6)
|
||||
((flags) == (FLAG_ARM_LIBSF | FLAG_ELF_LIBC6) \
|
||||
|| (flags) == FLAG_ELF_LIBC6)
|
||||
#endif
|
||||
|
||||
#include_next <dl-cache.h>
|
||||
|
||||
@@ -31,10 +31,14 @@
|
||||
|
||||
static inline int
|
||||
__attribute__ ((unused))
|
||||
_dl_procinfo (int word)
|
||||
_dl_procinfo (unsigned int type, unsigned long int word)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* Fallback to unknown output mechanism. */
|
||||
if (type == AT_HWCAP2)
|
||||
return -1;
|
||||
|
||||
_dl_printf ("AT_HWCAP: ");
|
||||
|
||||
for (i = 0; i < _DL_HWCAP_COUNT; ++i)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1999-2012 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Andreas Jaeger <aj@suse.de>, 1999 and
|
||||
Jakub Jelinek <jakub@redhat.com>, 1999.
|
||||
@@ -46,6 +46,12 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
|
||||
if (elf32_header->e_flags & EF_ARM_ABI_FLOAT_HARD)
|
||||
*flag = FLAG_ARM_LIBHF|FLAG_ELF_LIBC6;
|
||||
else if (elf32_header->e_flags & EF_ARM_ABI_FLOAT_SOFT)
|
||||
*flag = FLAG_ARM_LIBSF|FLAG_ELF_LIBC6;
|
||||
else
|
||||
/* We must assume the unmarked objects are compatible
|
||||
with all ABI variants. Such objects may have been
|
||||
generated in a transitional period when the ABI
|
||||
tags were not added to all objects. */
|
||||
*flag = FLAG_ELF_LIBC6;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,6 +94,7 @@ typedef struct siginfo
|
||||
int _si_imm;
|
||||
unsigned int _si_flags;
|
||||
unsigned long int _si_isr;
|
||||
short int si_addr_lsb; /* Valid LSB of the reported address. */
|
||||
} _sigfault;
|
||||
|
||||
/* SIGPOLL. */
|
||||
@@ -118,6 +119,7 @@ typedef struct siginfo
|
||||
# define si_int _sifields._rt.si_sigval.sival_int
|
||||
# define si_ptr _sifields._rt.si_sigval.sival_ptr
|
||||
# define si_addr _sifields._sigfault.si_addr
|
||||
# define si_addr_lsb _sifields._sigfault.si_addr_lsb
|
||||
# define si_band _sifields._sigpoll.si_band
|
||||
# define si_fd _sifields._sigpoll.si_fd
|
||||
|
||||
@@ -233,8 +235,12 @@ enum
|
||||
# define BUS_ADRALN BUS_ADRALN
|
||||
BUS_ADRERR, /* Non-existant physical address. */
|
||||
# define BUS_ADRERR BUS_ADRERR
|
||||
BUS_OBJERR /* Object specific hardware error. */
|
||||
BUS_OBJERR, /* Object specific hardware error. */
|
||||
# define BUS_OBJERR BUS_OBJERR
|
||||
BUS_MCEERR_AR, /* Hardware memory error: action required. */
|
||||
# define BUS_MCEERR_AR BUS_MCEERR_AR
|
||||
BUS_MCEERR_AO /* Hardware memory error: action optional. */
|
||||
# define BUS_MCEERR_AO BUS_MCEERR_AO
|
||||
};
|
||||
|
||||
/* `si_code' values for SIGTRAP signal. */
|
||||
|
||||
@@ -98,6 +98,7 @@ typedef struct
|
||||
struct
|
||||
{
|
||||
void *si_addr; /* Faulting insn/memory ref. */
|
||||
short int si_addr_lsb; /* Valid LSB of the reported address. */
|
||||
} _sigfault;
|
||||
|
||||
/* SIGPOLL. */
|
||||
@@ -122,6 +123,7 @@ typedef struct
|
||||
# define si_int _sifields._rt.si_sigval.sival_int
|
||||
# define si_ptr _sifields._rt.si_sigval.sival_ptr
|
||||
# define si_addr _sifields._sigfault.si_addr
|
||||
# define si_addr_lsb _sifields._sigfault.si_addr_lsb
|
||||
# define si_band _sifields._sigpoll.si_band
|
||||
# define si_fd _sifields._sigpoll.si_fd
|
||||
|
||||
@@ -209,8 +211,12 @@ enum
|
||||
# define BUS_ADRALN BUS_ADRALN
|
||||
BUS_ADRERR, /* Non-existant physical address. */
|
||||
# define BUS_ADRERR BUS_ADRERR
|
||||
BUS_OBJERR /* Object specific hardware error. */
|
||||
BUS_OBJERR, /* Object specific hardware error. */
|
||||
# define BUS_OBJERR BUS_OBJERR
|
||||
BUS_MCEERR_AR, /* Hardware memory error: action required. */
|
||||
# define BUS_MCEERR_AR BUS_MCEERR_AR
|
||||
BUS_MCEERR_AO /* Hardware memory error: action optional. */
|
||||
# define BUS_MCEERR_AO BUS_MCEERR_AO
|
||||
};
|
||||
|
||||
/* `si_code' values for SIGTRAP signal. */
|
||||
|
||||
@@ -95,7 +95,8 @@ typedef struct
|
||||
struct
|
||||
{
|
||||
void *si_addr; /* Faulting insn/memory ref. */
|
||||
int si_trapno; /* TRAP # which caused the signal */
|
||||
int si_trapno; /* TRAP # which caused the signal. */
|
||||
short int si_addr_lsb; /* Valid LSB of the reported address. */
|
||||
} _sigfault;
|
||||
|
||||
/* SIGPOLL. */
|
||||
@@ -129,6 +130,7 @@ typedef struct
|
||||
# define si_ptr _sifields._rt.si_sigval.sival_ptr
|
||||
# define si_addr _sifields._sigfault.si_addr
|
||||
# define si_trapno _sifields._sigfault.si_trapno
|
||||
# define si_addr_lsb _sifields._sigfault.si_addr_lsb
|
||||
# define si_band _sifields._sigpoll.si_band
|
||||
# define si_fd _sifields._sigpoll.si_fd
|
||||
# define si_call_addr _sifields._sigsys._call_addr
|
||||
@@ -223,8 +225,12 @@ enum
|
||||
# define BUS_ADRALN BUS_ADRALN
|
||||
BUS_ADRERR, /* Non-existant physical address. */
|
||||
# define BUS_ADRERR BUS_ADRERR
|
||||
BUS_OBJERR /* Object specific hardware error. */
|
||||
BUS_OBJERR, /* Object specific hardware error. */
|
||||
# define BUS_OBJERR BUS_OBJERR
|
||||
BUS_MCEERR_AR, /* Hardware memory error: action required. */
|
||||
# define BUS_MCEERR_AR BUS_MCEERR_AR
|
||||
BUS_MCEERR_AO /* Hardware memory error: action optional. */
|
||||
# define BUS_MCEERR_AO BUS_MCEERR_AO
|
||||
};
|
||||
|
||||
/* `si_code' values for SIGTRAP signal. */
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#endif
|
||||
|
||||
rettype
|
||||
inhibit_loop_to_libcall
|
||||
MEMMOVE (a1, a2, len)
|
||||
a1const void *a1;
|
||||
a2const void *a2;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#undef memset
|
||||
|
||||
void *
|
||||
inhibit_loop_to_libcall
|
||||
memset (dstpp, c, len)
|
||||
void *dstpp;
|
||||
int c;
|
||||
|
||||
@@ -47,6 +47,7 @@ IMPL (memmove, 1)
|
||||
#endif
|
||||
|
||||
char *
|
||||
inhibit_loop_to_libcall
|
||||
simple_memmove (char *dst, const char *src, size_t n)
|
||||
{
|
||||
char *ret = dst;
|
||||
|
||||
@@ -64,6 +64,7 @@ builtin_memset (char *s, int c, size_t n)
|
||||
#endif
|
||||
|
||||
char *
|
||||
inhibit_loop_to_libcall
|
||||
simple_memset (char *s, int c, size_t n)
|
||||
{
|
||||
char *r = s, *end = s + n;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#define _DL_PROCINFO_H 1
|
||||
|
||||
/* We cannot provide a general printing function. */
|
||||
#define _dl_procinfo(word) -1
|
||||
#define _dl_procinfo(type, word) -1
|
||||
|
||||
/* There are no hardware capabilities defined. */
|
||||
#define _dl_hwcap_string(idx) ""
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1999-2012 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Andreas Jaeger <aj@suse.de>, 1999.
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#define FLAG_X8664_LIBX32 0x0800
|
||||
#define FLAG_ARM_LIBHF 0x0900
|
||||
#define FLAG_AARCH64_LIB64 0x0a00
|
||||
#define FLAG_ARM_LIBSF 0x0b00
|
||||
|
||||
/* Name of auxiliary cache. */
|
||||
#define _PATH_LDCONFIG_AUX_CACHE "/var/cache/ldconfig/aux-cache"
|
||||
|
||||
@@ -548,6 +548,10 @@ struct rtld_global_ro
|
||||
EXTERN struct link_map *_dl_sysinfo_map;
|
||||
#endif
|
||||
|
||||
/* Mask for more hardware capabilities that are available on some
|
||||
platforms. */
|
||||
EXTERN uint64_t _dl_hwcap2;
|
||||
|
||||
#ifdef SHARED
|
||||
/* We add a function table to _rtld_global which is then used to
|
||||
call the function instead of going through the PLT. The result
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
/* Fortunately nothing to do. */
|
||||
/* Some compiler optimizations may transform loops into memset/memmove
|
||||
calls and without proper declaration it may generate PLT calls. */
|
||||
#if !defined __ASSEMBLER__ && !defined NOT_IN_libc && defined SHARED
|
||||
asm ("memmove = __GI_memmove");
|
||||
asm ("memset = __GI_memset");
|
||||
#endif
|
||||
|
||||
+69
-15
@@ -37,20 +37,29 @@
|
||||
/*
|
||||
* User-settable options (used with setsockopt).
|
||||
*/
|
||||
#define TCP_NODELAY 1 /* Don't delay send to coalesce packets */
|
||||
#define TCP_MAXSEG 2 /* Set maximum segment size */
|
||||
#define TCP_CORK 3 /* Control sending of partial frames */
|
||||
#define TCP_KEEPIDLE 4 /* Start keeplives after this period */
|
||||
#define TCP_KEEPINTVL 5 /* Interval between keepalives */
|
||||
#define TCP_KEEPCNT 6 /* Number of keepalives before death */
|
||||
#define TCP_SYNCNT 7 /* Number of SYN retransmits */
|
||||
#define TCP_LINGER2 8 /* Life time of orphaned FIN-WAIT-2 state */
|
||||
#define TCP_DEFER_ACCEPT 9 /* Wake up listener only when data arrive */
|
||||
#define TCP_WINDOW_CLAMP 10 /* Bound advertised window */
|
||||
#define TCP_INFO 11 /* Information about this connection. */
|
||||
#define TCP_QUICKACK 12 /* Bock/reenable quick ACKs. */
|
||||
#define TCP_CONGESTION 13 /* Congestion control algorithm. */
|
||||
#define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */
|
||||
#define TCP_NODELAY 1 /* Don't delay send to coalesce packets */
|
||||
#define TCP_MAXSEG 2 /* Set maximum segment size */
|
||||
#define TCP_CORK 3 /* Control sending of partial frames */
|
||||
#define TCP_KEEPIDLE 4 /* Start keeplives after this period */
|
||||
#define TCP_KEEPINTVL 5 /* Interval between keepalives */
|
||||
#define TCP_KEEPCNT 6 /* Number of keepalives before death */
|
||||
#define TCP_SYNCNT 7 /* Number of SYN retransmits */
|
||||
#define TCP_LINGER2 8 /* Life time of orphaned FIN-WAIT-2 state */
|
||||
#define TCP_DEFER_ACCEPT 9 /* Wake up listener only when data arrive */
|
||||
#define TCP_WINDOW_CLAMP 10 /* Bound advertised window */
|
||||
#define TCP_INFO 11 /* Information about this connection. */
|
||||
#define TCP_QUICKACK 12 /* Bock/reenable quick ACKs. */
|
||||
#define TCP_CONGESTION 13 /* Congestion control algorithm. */
|
||||
#define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */
|
||||
#define TCP_COOKIE_TRANSACTIONS 15 /* TCP Cookie Transactions */
|
||||
#define TCP_THIN_LINEAR_TIMEOUTS 16 /* Use linear timeouts for thin streams*/
|
||||
#define TCP_THIN_DUPACK 17 /* Fast retrans. after 1 dupack */
|
||||
#define TCP_USER_TIMEOUT 18 /* How long for loss retry before timeout */
|
||||
#define TCP_REPAIR 19 /* TCP sock is under repair right now */
|
||||
#define TCP_REPAIR_QUEUE 20 /* Set TCP queue to repair */
|
||||
#define TCP_QUEUE_SEQ 21 /* Set sequence number of repaired queue. */
|
||||
#define TCP_REPAIR_OPTIONS 22 /* Repair TCP connection options */
|
||||
#define TCP_FASTOPEN 23 /* Enable FastOpen on listeners */
|
||||
|
||||
#ifdef __USE_MISC
|
||||
# include <sys/types.h>
|
||||
@@ -173,7 +182,9 @@ enum
|
||||
# define TCPI_OPT_TIMESTAMPS 1
|
||||
# define TCPI_OPT_SACK 2
|
||||
# define TCPI_OPT_WSCALE 4
|
||||
# define TCPI_OPT_ECN 8
|
||||
# define TCPI_OPT_ECN 8 /* ECN was negociated at TCP session init */
|
||||
# define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */
|
||||
# define TCPI_OPT_SYN_DATA 32 /* SYN-ACK acked data in SYN sent or rcvd */
|
||||
|
||||
/* Values for tcpi_state. */
|
||||
enum tcp_ca_state
|
||||
@@ -241,6 +252,49 @@ struct tcp_md5sig
|
||||
u_int8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* Key (binary). */
|
||||
};
|
||||
|
||||
/* For socket repair options. */
|
||||
struct tcp_repair_opt
|
||||
{
|
||||
u_int32_t opt_code;
|
||||
u_int32_t opt_val;
|
||||
};
|
||||
|
||||
/* Queue to repair, for TCP_REPAIR_QUEUE. */
|
||||
enum
|
||||
{
|
||||
TCP_NO_QUEUE,
|
||||
TCP_RECV_QUEUE,
|
||||
TCP_SEND_QUEUE,
|
||||
TCP_QUEUES_NR,
|
||||
};
|
||||
|
||||
/* For cookie transactions socket options. */
|
||||
#define TCP_COOKIE_MIN 8 /* 64-bits */
|
||||
#define TCP_COOKIE_MAX 16 /* 128-bits */
|
||||
#define TCP_COOKIE_PAIR_SIZE (2*TCP_COOKIE_MAX)
|
||||
|
||||
/* Flags for both getsockopt and setsockopt */
|
||||
#define TCP_COOKIE_IN_ALWAYS (1 << 0) /* Discard SYN without cookie */
|
||||
#define TCP_COOKIE_OUT_NEVER (1 << 1) /* Prohibit outgoing cookies,
|
||||
* supercedes everything. */
|
||||
|
||||
/* Flags for getsockopt */
|
||||
#define TCP_S_DATA_IN (1 << 2) /* Was data received? */
|
||||
#define TCP_S_DATA_OUT (1 << 3) /* Was data sent? */
|
||||
|
||||
#define TCP_MSS_DEFAULT 536U /* IPv4 (RFC1122, RFC2581) */
|
||||
#define TCP_MSS_DESIRED 1220U /* IPv6 (tunneled), EDNS0 (RFC3226) */
|
||||
|
||||
struct tcp_cookie_transactions
|
||||
{
|
||||
u_int16_t tcpct_flags;
|
||||
u_int8_t __tcpct_pad1;
|
||||
u_int8_t tcpct_cookie_desired;
|
||||
u_int16_t tcpct_s_data_desired;
|
||||
u_int16_t tcpct_used;
|
||||
u_int8_t tcpct_value[TCP_MSS_DEFAULT];
|
||||
};
|
||||
|
||||
#endif /* Misc. */
|
||||
|
||||
#endif /* netinet/tcp.h */
|
||||
|
||||
@@ -61,7 +61,7 @@ enum
|
||||
};
|
||||
|
||||
/* We cannot provide a general printing function. */
|
||||
#define _dl_procinfo(word) -1
|
||||
#define _dl_procinfo(type, word) -1
|
||||
|
||||
static inline const char *
|
||||
__attribute__ ((unused))
|
||||
|
||||
@@ -52,7 +52,7 @@ __ieee754_acoshl(long double x)
|
||||
return __ieee754_logl(2.0*x-one/(x+__ieee754_sqrtl(t-one)));
|
||||
} else { /* 1<x<2 */
|
||||
t = x-one;
|
||||
return __log1p(t+__sqrtl(2.0*t+t*t));
|
||||
return __log1p(t+__ieee754_sqrtl(2.0*t+t*t));
|
||||
}
|
||||
}
|
||||
strong_alias (__ieee754_acoshl, __acoshl_finite)
|
||||
|
||||
@@ -125,7 +125,7 @@ ldbl_insert_mantissa (int sign, int exp, int64_t hi64, u_int64_t lo64)
|
||||
/* Handy utility functions to pack/unpack/cononicalize and find the nearbyint
|
||||
of long double implemented as double double. */
|
||||
static inline long double
|
||||
ldbl_pack (double a, double aa)
|
||||
default_ldbl_pack (double a, double aa)
|
||||
{
|
||||
union ibm_extended_long_double u;
|
||||
u.dd[0] = a;
|
||||
@@ -134,7 +134,7 @@ ldbl_pack (double a, double aa)
|
||||
}
|
||||
|
||||
static inline void
|
||||
ldbl_unpack (long double l, double *a, double *aa)
|
||||
default_ldbl_unpack (long double l, double *a, double *aa)
|
||||
{
|
||||
union ibm_extended_long_double u;
|
||||
u.d = l;
|
||||
@@ -142,6 +142,12 @@ ldbl_unpack (long double l, double *a, double *aa)
|
||||
*aa = u.dd[1];
|
||||
}
|
||||
|
||||
#ifndef ldbl_pack
|
||||
# define ldbl_pack default_ldbl_pack
|
||||
#endif
|
||||
#ifndef ldbl_unpack
|
||||
# define ldbl_unpack default_ldbl_unpack
|
||||
#endif
|
||||
|
||||
/* Convert a finite long double to canonical form.
|
||||
Does not handle +/-Inf properly. */
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# On PowerPC we use the IBM extended long double format.
|
||||
ieee754/ldbl-128ibm
|
||||
ieee754/ldbl-opt
|
||||
ieee754/dbl-64
|
||||
ieee754/flt-32
|
||||
|
||||
@@ -17,7 +17,7 @@ endif
|
||||
endif
|
||||
|
||||
ifeq ($(subdir),csu)
|
||||
# get offset to rtld_global._dl_hwcap
|
||||
# get offset to rtld_global._dl_hwcap and rtld_global._dl_hwcap2
|
||||
gen-as-const-headers += rtld-global-offsets.sym
|
||||
# get offset to __locale_struct.__ctype_tolower
|
||||
gen-as-const-headers += locale-defines.sym
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Defines for bits in AT_HWCAP.
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
/* Defines for bits in AT_HWCAP and AT_HWCAP2.
|
||||
Copyright (C) 2012-2013 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -20,9 +20,9 @@
|
||||
# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The following must match the kernels asm/cputable.h.
|
||||
*/
|
||||
/* The bit numbers must match those in the kernel's asm/cputable.h. */
|
||||
|
||||
/* Feature definitions in AT_HWCAP. */
|
||||
#define PPC_FEATURE_32 0x80000000 /* 32-bit mode. */
|
||||
#define PPC_FEATURE_64 0x40000000 /* 64-bit mode. */
|
||||
#define PPC_FEATURE_601_INSTR 0x20000000 /* 601 chip, Old POWER ISA. */
|
||||
@@ -39,8 +39,9 @@
|
||||
#define PPC_FEATURE_POWER5 0x00040000 /* POWER5 ISA 2.02 */
|
||||
#define PPC_FEATURE_POWER5_PLUS 0x00020000 /* POWER5+ ISA 2.03 */
|
||||
#define PPC_FEATURE_CELL_BE 0x00010000 /* CELL Broadband Engine */
|
||||
#define PPC_FEATURE_BOOKE 0x00008000
|
||||
#define PPC_FEATURE_SMT 0x00004000 /* Simultaneous Multi-Threading */
|
||||
#define PPC_FEATURE_BOOKE 0x00008000 /* ISA Category Embedded */
|
||||
#define PPC_FEATURE_SMT 0x00004000 /* Simultaneous
|
||||
Multi-Threading */
|
||||
#define PPC_FEATURE_ICACHE_SNOOP 0x00002000
|
||||
#define PPC_FEATURE_ARCH_2_05 0x00001000 /* ISA 2.05 */
|
||||
#define PPC_FEATURE_PA6T 0x00000800 /* PA Semi 6T Core */
|
||||
@@ -51,3 +52,13 @@
|
||||
#define PPC_FEATURE_PSERIES_PERFMON_COMPAT 0x00000040
|
||||
#define PPC_FEATURE_TRUE_LE 0x00000002
|
||||
#define PPC_FEATURE_PPC_LE 0x00000001
|
||||
|
||||
/* Feature definitions in AT_HWCAP2. */
|
||||
#define PPC_FEATURE2_ARCH_2_07 0x80000000 /* ISA 2.07 */
|
||||
#define PPC_FEATURE2_HAS_HTM 0x40000000 /* Hardware Transactional
|
||||
Memory */
|
||||
#define PPC_FEATURE2_HAS_DSCR 0x20000000 /* Data Stream Control
|
||||
Register */
|
||||
#define PPC_FEATURE2_HAS_EBB 0x10000000 /* Event Base Branching */
|
||||
#define PPC_FEATURE2_HAS_ISEL 0x08000000 /* Integer Select */
|
||||
#define PPC_FEATURE2_HAS_TAR 0x04000000 /* Target Address Register */
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
License along with the GNU C Library. If not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* This information must be kept in sync with the _DL_HWCAP_COUNT and
|
||||
@@ -45,7 +45,7 @@
|
||||
#if !defined PROCINFO_DECL && defined SHARED
|
||||
._dl_powerpc_cap_flags
|
||||
#else
|
||||
PROCINFO_CLASS const char _dl_powerpc_cap_flags[25][10]
|
||||
PROCINFO_CLASS const char _dl_powerpc_cap_flags[57][10]
|
||||
#endif
|
||||
#ifndef PROCINFO_DECL
|
||||
= {
|
||||
@@ -56,6 +56,14 @@ PROCINFO_CLASS const char _dl_powerpc_cap_flags[25][10]
|
||||
"notb", "efpdouble", "efpsingle", "spe",
|
||||
"ucache", "4xxmac", "mmu", "fpu",
|
||||
"altivec", "ppc601", "ppc64", "ppc32",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "tar", "isel",
|
||||
"ebb", "dscr", "htm", "arch_2_07",
|
||||
}
|
||||
#endif
|
||||
#if !defined SHARED || defined PROCINFO_DECL
|
||||
@@ -67,7 +75,7 @@ PROCINFO_CLASS const char _dl_powerpc_cap_flags[25][10]
|
||||
#if !defined PROCINFO_DECL && defined SHARED
|
||||
._dl_powerpc_platforms
|
||||
#else
|
||||
PROCINFO_CLASS const char _dl_powerpc_platforms[9][12]
|
||||
PROCINFO_CLASS const char _dl_powerpc_platforms[14][12]
|
||||
#endif
|
||||
#ifndef PROCINFO_DECL
|
||||
= {
|
||||
@@ -79,7 +87,12 @@ PROCINFO_CLASS const char _dl_powerpc_platforms[9][12]
|
||||
[PPC_PLATFORM_CELL_BE] = "ppc-cell-be",
|
||||
[PPC_PLATFORM_POWER6X] = "power6x",
|
||||
[PPC_PLATFORM_POWER7] = "power7",
|
||||
[PPC_PLATFORM_PPCA2] = "ppca2"
|
||||
[PPC_PLATFORM_PPCA2] = "ppca2",
|
||||
[PPC_PLATFORM_PPC405] = "ppc405",
|
||||
[PPC_PLATFORM_PPC440] = "ppc440",
|
||||
[PPC_PLATFORM_PPC464] = "ppc464",
|
||||
[PPC_PLATFORM_PPC476] = "ppc476",
|
||||
[PPC_PLATFORM_POWER8] = "power8",
|
||||
}
|
||||
#endif
|
||||
#if !defined SHARED || defined PROCINFO_DECL
|
||||
|
||||
@@ -13,29 +13,39 @@
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
License along with the GNU C Library. If not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _DL_PROCINFO_H
|
||||
#define _DL_PROCINFO_H 1
|
||||
#define _DL_PROCINFO_H 1
|
||||
|
||||
#include <ldsodefs.h>
|
||||
#include <sysdep.h> /* This defines the PPC_FEATURE_* macros. */
|
||||
#include <sysdep.h> /* This defines the PPC_FEATURE[2]_* macros. */
|
||||
|
||||
/* There are 25 bits used, but they are bits 7..31. */
|
||||
#define _DL_HWCAP_FIRST 7
|
||||
#define _DL_HWCAP_COUNT 32
|
||||
|
||||
/* The total number of available bits (including those prior to
|
||||
_DL_HWCAP_FIRST). Some of these bits might not be used. */
|
||||
#define _DL_HWCAP_COUNT 64
|
||||
|
||||
/* Features started at bit 31 and decremented as new features were added. */
|
||||
#define _DL_HWCAP_LAST 31
|
||||
|
||||
/* AT_HWCAP2 features started at bit 31 and decremented as new features were
|
||||
added. HWCAP2 feature bits start at bit 0. */
|
||||
#define _DL_HWCAP2_LAST 31
|
||||
|
||||
/* These bits influence library search. */
|
||||
#define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC \
|
||||
+ PPC_FEATURE_HAS_DFP)
|
||||
|
||||
#define _DL_PLATFORMS_COUNT 9
|
||||
#define _DL_PLATFORMS_COUNT 14
|
||||
|
||||
#define _DL_FIRST_PLATFORM 32
|
||||
#define _DL_FIRST_PLATFORM 32
|
||||
/* Mask to filter out platforms. */
|
||||
#define _DL_HWCAP_PLATFORM (((1ULL << _DL_PLATFORMS_COUNT) - 1) \
|
||||
<< _DL_FIRST_PLATFORM)
|
||||
#define _DL_HWCAP_PLATFORM (((1ULL << _DL_PLATFORMS_COUNT) - 1) \
|
||||
<< _DL_FIRST_PLATFORM)
|
||||
|
||||
/* Platform bits (relative to _DL_FIRST_PLATFORM). */
|
||||
#define PPC_PLATFORM_POWER4 0
|
||||
@@ -47,6 +57,11 @@
|
||||
#define PPC_PLATFORM_POWER6X 6
|
||||
#define PPC_PLATFORM_POWER7 7
|
||||
#define PPC_PLATFORM_PPCA2 8
|
||||
#define PPC_PLATFORM_PPC405 9
|
||||
#define PPC_PLATFORM_PPC440 10
|
||||
#define PPC_PLATFORM_PPC464 11
|
||||
#define PPC_PLATFORM_PPC476 12
|
||||
#define PPC_PLATFORM_POWER8 13
|
||||
|
||||
static inline const char *
|
||||
__attribute__ ((unused))
|
||||
@@ -107,11 +122,14 @@ _dl_string_platform (const char *str)
|
||||
case '7':
|
||||
ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER7;
|
||||
break;
|
||||
case '8':
|
||||
ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER8;
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
if (str[1] == '\0')
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
else if (strncmp (str, GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC970],
|
||||
3) == 0)
|
||||
@@ -127,6 +145,22 @@ _dl_string_platform (const char *str)
|
||||
GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPCA2] + 3)
|
||||
== 0)
|
||||
return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPCA2;
|
||||
else if (strcmp (str + 3,
|
||||
GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC405] + 3)
|
||||
== 0)
|
||||
return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC405;
|
||||
else if (strcmp (str + 3,
|
||||
GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC440] + 3)
|
||||
== 0)
|
||||
return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC440;
|
||||
else if (strcmp (str + 3,
|
||||
GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC464] + 3)
|
||||
== 0)
|
||||
return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC464;
|
||||
else if (strcmp (str + 3,
|
||||
GLRO(dl_powerpc_platforms)[PPC_PLATFORM_PPC476] + 3)
|
||||
== 0)
|
||||
return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC476;
|
||||
}
|
||||
|
||||
return -1;
|
||||
@@ -135,16 +169,35 @@ _dl_string_platform (const char *str)
|
||||
#ifdef IS_IN_rtld
|
||||
static inline int
|
||||
__attribute__ ((unused))
|
||||
_dl_procinfo (int word)
|
||||
_dl_procinfo (unsigned int type, unsigned long int word)
|
||||
{
|
||||
_dl_printf ("AT_HWCAP: ");
|
||||
switch(type)
|
||||
{
|
||||
case AT_HWCAP:
|
||||
_dl_printf ("AT_HWCAP: ");
|
||||
|
||||
for (int i = _DL_HWCAP_FIRST; i < _DL_HWCAP_COUNT; ++i)
|
||||
if (word & (1 << i))
|
||||
_dl_printf (" %s", _dl_hwcap_string (i));
|
||||
for (int i = _DL_HWCAP_FIRST; i <= _DL_HWCAP_LAST; ++i)
|
||||
if (word & (1 << i))
|
||||
_dl_printf (" %s", _dl_hwcap_string (i));
|
||||
break;
|
||||
case AT_HWCAP2:
|
||||
{
|
||||
unsigned int offset = _DL_HWCAP_LAST + 1;
|
||||
|
||||
_dl_printf ("\n");
|
||||
_dl_printf ("AT_HWCAP2: ");
|
||||
|
||||
/* We have to go through them all because the kernel added the
|
||||
AT_HWCAP2 features starting with the high bits. */
|
||||
for (int i = 0; i <= _DL_HWCAP2_LAST; ++i)
|
||||
if (word & (1 << i))
|
||||
_dl_printf (" %s", _dl_hwcap_string (offset + i));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
/* This should not happen. */
|
||||
return -1;
|
||||
}
|
||||
_dl_printf ("\n");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -52,13 +52,13 @@ static const double pdnum = 2.225073858507201e-308;
|
||||
ieee_double_shape_type gh_u2; \
|
||||
gh_u1.value = (d1); \
|
||||
gh_u2.value = (d2); \
|
||||
(i1) = gh_u1.parts.msw; \
|
||||
(i2) = gh_u2.parts.msw; \
|
||||
(i1) = gh_u1.parts.msw & 0x7fffffff; \
|
||||
(i2) = gh_u2.parts.msw & 0x7fffffff; \
|
||||
} while (0)
|
||||
|
||||
# define TEST_INF_NAN(x, y) \
|
||||
do { \
|
||||
int32_t hx, hy; \
|
||||
uint32_t hx, hy; \
|
||||
GET_TW0_HIGH_WORD(x, y, hx, hy); \
|
||||
if (hy > hx) { \
|
||||
uint32_t ht = hx; hx = hy; hy = ht; \
|
||||
|
||||
@@ -46,13 +46,13 @@ static const float two30 = 1.0737418e09;
|
||||
ieee_float_shape_type gf_u2; \
|
||||
gf_u1.value = (f1); \
|
||||
gf_u2.value = (f2); \
|
||||
(i1) = gf_u1.word; \
|
||||
(i2) = gf_u2.word; \
|
||||
(i1) = gf_u1.word & 0x7fffffff; \
|
||||
(i2) = gf_u2.word & 0x7fffffff; \
|
||||
} while (0)
|
||||
|
||||
# define TEST_INF_NAN(x, y) \
|
||||
do { \
|
||||
int32_t hx, hy; \
|
||||
uint32_t hx, hy; \
|
||||
GET_TWO_FLOAT_WORD(x, y, hx, hy); \
|
||||
if (hy > hx) { \
|
||||
uint32_t ht = hx; hx = hy; hy = ht; \
|
||||
|
||||
@@ -2,132 +2,12 @@
|
||||
#error "Never use <math_ldbl.h> directly; include <math_private.h> instead."
|
||||
#endif
|
||||
|
||||
#include <sysdeps/ieee754/ldbl-128/math_ldbl.h>
|
||||
#include <ieee754.h>
|
||||
|
||||
static inline void
|
||||
ldbl_extract_mantissa (int64_t *hi64, u_int64_t *lo64, int *exp, long double x)
|
||||
{
|
||||
/* We have 105 bits of mantissa plus one implicit digit. Since
|
||||
106 bits are representable we use the first implicit digit for
|
||||
the number before the decimal point and the second implicit bit
|
||||
as bit 53 of the mantissa. */
|
||||
unsigned long long hi, lo;
|
||||
int ediff;
|
||||
union ibm_extended_long_double eldbl;
|
||||
eldbl.d = x;
|
||||
*exp = eldbl.ieee.exponent - IBM_EXTENDED_LONG_DOUBLE_BIAS;
|
||||
|
||||
lo = ((long long)eldbl.ieee.mantissa2 << 32) | eldbl.ieee.mantissa3;
|
||||
hi = ((long long)eldbl.ieee.mantissa0 << 32) | eldbl.ieee.mantissa1;
|
||||
/* If the lower double is not a denomal or zero then set the hidden
|
||||
53rd bit. */
|
||||
if (eldbl.ieee.exponent2 > 0x001)
|
||||
{
|
||||
lo |= (1ULL << 52);
|
||||
lo = lo << 7; /* pre-shift lo to match ieee854. */
|
||||
/* The lower double is normalized separately from the upper. We
|
||||
may need to adjust the lower manitissa to reflect this. */
|
||||
ediff = eldbl.ieee.exponent - eldbl.ieee.exponent2;
|
||||
if (ediff > 53)
|
||||
lo = lo >> (ediff-53);
|
||||
}
|
||||
hi |= (1ULL << 52);
|
||||
|
||||
if ((eldbl.ieee.negative != eldbl.ieee.negative2)
|
||||
&& ((eldbl.ieee.exponent2 != 0) && (lo != 0LL)))
|
||||
{
|
||||
hi--;
|
||||
lo = (1ULL << 60) - lo;
|
||||
if (hi < (1ULL << 52))
|
||||
{
|
||||
/* we have a borrow from the hidden bit, so shift left 1. */
|
||||
hi = (hi << 1) | (lo >> 59);
|
||||
lo = 0xfffffffffffffffLL & (lo << 1);
|
||||
*exp = *exp - 1;
|
||||
}
|
||||
}
|
||||
*lo64 = (hi << 60) | lo;
|
||||
*hi64 = hi >> 4;
|
||||
}
|
||||
|
||||
/* GCC does not optimize the default ldbl_pack code to not spill register
|
||||
in the stack. The following optimization tells gcc that pack/unpack
|
||||
is really a nop. We use fr1/fr2 because those are the regs used to
|
||||
pass/return a single long double arg. */
|
||||
static inline long double
|
||||
ldbl_insert_mantissa (int sign, int exp, int64_t hi64, u_int64_t lo64)
|
||||
{
|
||||
union ibm_extended_long_double u;
|
||||
unsigned long hidden2, lzcount;
|
||||
unsigned long long hi, lo;
|
||||
|
||||
u.ieee.negative = sign;
|
||||
u.ieee.negative2 = sign;
|
||||
u.ieee.exponent = exp + IBM_EXTENDED_LONG_DOUBLE_BIAS;
|
||||
u.ieee.exponent2 = exp-53 + IBM_EXTENDED_LONG_DOUBLE_BIAS;
|
||||
/* Expect 113 bits (112 bits + hidden) right justified in two longs.
|
||||
The low order 53 bits (52 + hidden) go into the lower double */
|
||||
lo = (lo64 >> 7)& ((1ULL << 53) - 1);
|
||||
hidden2 = (lo64 >> 59) & 1ULL;
|
||||
/* The high order 53 bits (52 + hidden) go into the upper double */
|
||||
hi = (lo64 >> 60) & ((1ULL << 11) - 1);
|
||||
hi |= (hi64 << 4);
|
||||
|
||||
if (lo != 0LL)
|
||||
{
|
||||
/* hidden2 bit of low double controls rounding of the high double.
|
||||
If hidden2 is '1' then round up hi and adjust lo (2nd mantissa)
|
||||
plus change the sign of the low double to compensate. */
|
||||
if (hidden2)
|
||||
{
|
||||
hi++;
|
||||
u.ieee.negative2 = !sign;
|
||||
lo = (1ULL << 53) - lo;
|
||||
}
|
||||
/* The hidden bit of the lo mantissa is zero so we need to
|
||||
normalize the it for the low double. Shift it left until the
|
||||
hidden bit is '1' then adjust the 2nd exponent accordingly. */
|
||||
|
||||
if (sizeof (lo) == sizeof (long))
|
||||
lzcount = __builtin_clzl (lo);
|
||||
else if ((lo >> 32) != 0)
|
||||
lzcount = __builtin_clzl ((long) (lo >> 32));
|
||||
else
|
||||
lzcount = __builtin_clzl ((long) lo) + 32;
|
||||
lzcount = lzcount - 11;
|
||||
if (lzcount > 0)
|
||||
{
|
||||
int expnt2 = u.ieee.exponent2 - lzcount;
|
||||
if (expnt2 >= 1)
|
||||
{
|
||||
/* Not denormal. Normalize and set low exponent. */
|
||||
lo = lo << lzcount;
|
||||
u.ieee.exponent2 = expnt2;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Is denormal. */
|
||||
lo = lo << (lzcount + expnt2);
|
||||
u.ieee.exponent2 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
u.ieee.negative2 = 0;
|
||||
u.ieee.exponent2 = 0;
|
||||
}
|
||||
|
||||
u.ieee.mantissa3 = lo & ((1ULL << 32) - 1);
|
||||
u.ieee.mantissa2 = (lo >> 32) & ((1ULL << 20) - 1);
|
||||
u.ieee.mantissa1 = hi & ((1ULL << 32) - 1);
|
||||
u.ieee.mantissa0 = (hi >> 32) & ((1ULL << 20) - 1);
|
||||
return u.d;
|
||||
}
|
||||
|
||||
/* gcc generates disgusting code to pack and unpack long doubles.
|
||||
This tells gcc that pack/unpack is really a nop. We use fr1/fr2
|
||||
because those are the regs used to pass/return a single
|
||||
long double arg. */
|
||||
static inline long double
|
||||
ldbl_pack (double a, double aa)
|
||||
ldbl_pack_ppc (double a, double aa)
|
||||
{
|
||||
register long double x __asm__ ("fr1");
|
||||
register double xh __asm__ ("fr1");
|
||||
@@ -139,7 +19,7 @@ ldbl_pack (double a, double aa)
|
||||
}
|
||||
|
||||
static inline void
|
||||
ldbl_unpack (long double l, double *a, double *aa)
|
||||
ldbl_unpack_ppc (long double l, double *a, double *aa)
|
||||
{
|
||||
register long double x __asm__ ("fr1");
|
||||
register double xh __asm__ ("fr1");
|
||||
@@ -150,40 +30,7 @@ ldbl_unpack (long double l, double *a, double *aa)
|
||||
*aa = xl;
|
||||
}
|
||||
|
||||
#define ldbl_pack ldbl_pack_ppc
|
||||
#define ldbl_unpack ldbl_unpack_ppc
|
||||
|
||||
/* Convert a finite long double to canonical form.
|
||||
Does not handle +/-Inf properly. */
|
||||
static inline void
|
||||
ldbl_canonicalize (double *a, double *aa)
|
||||
{
|
||||
double xh, xl;
|
||||
|
||||
xh = *a + *aa;
|
||||
xl = (*a - xh) + *aa;
|
||||
*a = xh;
|
||||
*aa = xl;
|
||||
}
|
||||
|
||||
/* Simple inline nearbyint (double) function .
|
||||
Only works in the default rounding mode
|
||||
but is useful in long double rounding functions. */
|
||||
static inline double
|
||||
ldbl_nearbyint (double a)
|
||||
{
|
||||
double two52 = 0x10000000000000LL;
|
||||
|
||||
if (__builtin_expect ((__builtin_fabs (a) < two52), 1))
|
||||
{
|
||||
if (__builtin_expect ((a > 0.0), 1))
|
||||
{
|
||||
a += two52;
|
||||
a -= two52;
|
||||
}
|
||||
else if (__builtin_expect ((a < 0.0), 1))
|
||||
{
|
||||
a = two52 - a;
|
||||
a = -(a - two52);
|
||||
}
|
||||
}
|
||||
return a;
|
||||
}
|
||||
#include <sysdeps/ieee754/ldbl-128ibm/math_ldbl.h>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <math.h>
|
||||
#include <math_ldbl_opt.h>
|
||||
|
||||
/* I think that what this routine is supposed to do is round a value
|
||||
to the nearest integer, with values exactly on the boundary rounded
|
||||
@@ -47,3 +48,6 @@ weak_alias (__llround, llround)
|
||||
strong_alias (__llround, __llroundl)
|
||||
weak_alias (__llround, llroundl)
|
||||
#endif
|
||||
#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_1)
|
||||
compat_symbol (libm, __llround, llroundl, GLIBC_2_1);
|
||||
#endif
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <math.h>
|
||||
#include <math_private.h>
|
||||
#include <fenv_libc.h>
|
||||
#include <math_ldbl_opt.h>
|
||||
|
||||
double
|
||||
__sqrt (double x) /* wrapper sqrt */
|
||||
@@ -42,3 +43,6 @@ weak_alias (__sqrt, sqrt)
|
||||
#ifdef NO_LONG_DOUBLE
|
||||
strong_alias (__sqrt, __sqrtl) weak_alias (__sqrt, sqrtl)
|
||||
#endif
|
||||
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
|
||||
compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0);
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
/* Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <math.h>
|
||||
#include <math_private.h>
|
||||
#include <math_ldbl_opt.h>
|
||||
|
||||
double
|
||||
__modf (double x, double *iptr)
|
||||
{
|
||||
if (__builtin_isinf (x))
|
||||
{
|
||||
*iptr = x;
|
||||
return __copysign (0.0, x);
|
||||
}
|
||||
else if (__builtin_isnan (x))
|
||||
{
|
||||
*iptr = NAN;
|
||||
return NAN;
|
||||
}
|
||||
|
||||
if (x >= 0.0)
|
||||
{
|
||||
*iptr = __floor (x);
|
||||
return (x - *iptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
*iptr = __ceil (x);
|
||||
return (x - *iptr);
|
||||
}
|
||||
}
|
||||
weak_alias (__modf, modf)
|
||||
#ifdef NO_LONG_DOUBLE
|
||||
strong_alias (__modf, __modfl)
|
||||
weak_alias (__modf, modfl)
|
||||
#endif
|
||||
#ifdef IS_IN_libm
|
||||
# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
|
||||
compat_symbol (libm, __modf, modfl, GLIBC_2_0);
|
||||
# endif
|
||||
#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
|
||||
compat_symbol (libc, __modf, modfl, GLIBC_2_0);
|
||||
#endif
|
||||
@@ -0,0 +1,46 @@
|
||||
/* Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <math.h>
|
||||
#include <math_private.h>
|
||||
|
||||
float
|
||||
__modff (float x, float *iptr)
|
||||
{
|
||||
if (__builtin_isinff (x))
|
||||
{
|
||||
*iptr = x;
|
||||
return __copysignf (0.0, x);
|
||||
}
|
||||
else if (__builtin_isnanf (x))
|
||||
{
|
||||
*iptr = NAN;
|
||||
return NAN;
|
||||
}
|
||||
|
||||
if (x >= 0.0)
|
||||
{
|
||||
*iptr = __floorf (x);
|
||||
return (x - *iptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
*iptr = __ceilf (x);
|
||||
return (x - *iptr);
|
||||
}
|
||||
}
|
||||
weak_alias (__modff, modff)
|
||||
@@ -45,14 +45,14 @@ ENTRY (__rint)
|
||||
fsub fp12,fp13,fp13 /* generate 0.0 */
|
||||
fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO52) */
|
||||
fcmpu cr6,fp1,fp12 /* if (x > 0.0) */
|
||||
bnllr- cr7
|
||||
bng- cr6,.L4
|
||||
bnllr cr7
|
||||
bng cr6,.L4
|
||||
fadd fp1,fp1,fp13 /* x+= TWO52; */
|
||||
fsub fp1,fp1,fp13 /* x-= TWO52; */
|
||||
fabs fp1,fp1 /* if (x == 0.0) */
|
||||
blr /* x = 0.0; */
|
||||
.L4:
|
||||
bnllr- cr6 /* if (x < 0.0) */
|
||||
bnllr cr6 /* if (x < 0.0) */
|
||||
fsub fp1,fp1,fp13 /* x-= TWO52; */
|
||||
fadd fp1,fp1,fp13 /* x+= TWO52; */
|
||||
fnabs fp1,fp1 /* if (x == 0.0) */
|
||||
|
||||
@@ -41,14 +41,14 @@ ENTRY (__rintf)
|
||||
fsubs fp12,fp13,fp13 /* generate 0.0 */
|
||||
fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO23) */
|
||||
fcmpu cr6,fp1,fp12 /* if (x > 0.0) */
|
||||
bnllr- cr7
|
||||
bng- cr6,.L4
|
||||
bnllr cr7
|
||||
bng cr6,.L4
|
||||
fadds fp1,fp1,fp13 /* x+= TWO23; */
|
||||
fsubs fp1,fp1,fp13 /* x-= TWO23; */
|
||||
fabs fp1,fp1 /* if (x == 0.0) */
|
||||
blr /* x = 0.0; */
|
||||
.L4:
|
||||
bnllr- cr6 /* if (x < 0.0) */
|
||||
bnllr cr6 /* if (x < 0.0) */
|
||||
fsubs fp1,fp1,fp13 /* x-= TWO23; */
|
||||
fadds fp1,fp1,fp13 /* x+= TWO23; */
|
||||
fnabs fp1,fp1 /* if (x == 0.0) */
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
powerpc/power4/fpu
|
||||
powerpc/power4
|
||||
@@ -1,2 +1,4 @@
|
||||
powerpc/power5+/fpu
|
||||
powerpc/power5+
|
||||
powerpc/powerpc32/power5/fpu
|
||||
powerpc/powerpc32/power5
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
powerpc/power5/fpu
|
||||
powerpc/power5
|
||||
powerpc/powerpc32/power4/fpu
|
||||
powerpc/powerpc32/power4
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
powerpc/powerpc32/power7/fpu
|
||||
powerpc/powerpc32/power7
|
||||
@@ -37,6 +37,13 @@
|
||||
#include <sysdep.h>
|
||||
#include "bp-sym.h"
|
||||
|
||||
/* We do not want .eh_frame info for crt1.o since crt1.o is linked
|
||||
before crtbegin.o, the file defining __EH_FRAME_BEGIN__. */
|
||||
#undef cfi_startproc
|
||||
#define cfi_startproc
|
||||
#undef cfi_endproc
|
||||
#define cfi_endproc
|
||||
|
||||
/* These are the various addresses we require. */
|
||||
#ifdef PIC
|
||||
.section ".data"
|
||||
|
||||
@@ -34,14 +34,14 @@ EALIGN (__rint, 4, 0)
|
||||
fsub fp12,fp13,fp13 /* generate 0.0 */
|
||||
fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO52) */
|
||||
fcmpu cr6,fp1,fp12 /* if (x > 0.0) */
|
||||
bnllr- cr7
|
||||
bng- cr6,.L4
|
||||
bnllr cr7
|
||||
bng cr6,.L4
|
||||
fadd fp1,fp1,fp13 /* x+= TWO52; */
|
||||
fsub fp1,fp1,fp13 /* x-= TWO52; */
|
||||
fabs fp1,fp1 /* if (x == 0.0) */
|
||||
blr /* x = 0.0; */
|
||||
.L4:
|
||||
bnllr- cr6 /* if (x < 0.0) */
|
||||
bnllr cr6 /* if (x < 0.0) */
|
||||
fsub fp1,fp1,fp13 /* x-= TWO52; */
|
||||
fadd fp1,fp1,fp13 /* x+= TWO52; */
|
||||
fnabs fp1,fp1 /* if (x == 0.0) */
|
||||
|
||||
@@ -30,14 +30,14 @@ EALIGN (__rintf, 4, 0)
|
||||
fsubs fp12,fp13,fp13 /* generate 0.0 */
|
||||
fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO23) */
|
||||
fcmpu cr6,fp1,fp12 /* if (x > 0.0) */
|
||||
bnllr- cr7
|
||||
bng- cr6,.L4
|
||||
bnllr cr7
|
||||
bng cr6,.L4
|
||||
fadds fp1,fp1,fp13 /* x+= TWO23; */
|
||||
fsubs fp1,fp1,fp13 /* x-= TWO23; */
|
||||
fabs fp1,fp1 /* if (x == 0.0) */
|
||||
blr /* x = 0.0; */
|
||||
.L4:
|
||||
bnllr- cr6 /* if (x < 0.0) */
|
||||
bnllr cr6 /* if (x < 0.0) */
|
||||
fsubs fp1,fp1,fp13 /* x-= TWO23; */
|
||||
fadds fp1,fp1,fp13 /* x+= TWO23; */
|
||||
fnabs fp1,fp1 /* if (x == 0.0) */
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
powerpc/power4/fpu
|
||||
powerpc/power4
|
||||
@@ -1,5 +0,0 @@
|
||||
# Makefile fragment for POWER4/5/5+ platforms with FPU.
|
||||
|
||||
ifeq ($(subdir),math)
|
||||
CFLAGS-mpa.c += --param max-unroll-times=4 -funroll-loops -fpeel-loops
|
||||
endif
|
||||
@@ -1,548 +0,0 @@
|
||||
|
||||
/*
|
||||
* IBM Accurate Mathematical Library
|
||||
* written by International Business Machines Corp.
|
||||
* Copyright (C) 2001, 2006 Free Software Foundation
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/************************************************************************/
|
||||
/* MODULE_NAME: mpa.c */
|
||||
/* */
|
||||
/* FUNCTIONS: */
|
||||
/* mcr */
|
||||
/* acr */
|
||||
/* cr */
|
||||
/* cpy */
|
||||
/* cpymn */
|
||||
/* norm */
|
||||
/* denorm */
|
||||
/* mp_dbl */
|
||||
/* dbl_mp */
|
||||
/* add_magnitudes */
|
||||
/* sub_magnitudes */
|
||||
/* add */
|
||||
/* sub */
|
||||
/* mul */
|
||||
/* inv */
|
||||
/* dvd */
|
||||
/* */
|
||||
/* Arithmetic functions for multiple precision numbers. */
|
||||
/* Relative errors are bounded */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#include "endian.h"
|
||||
#include "mpa.h"
|
||||
#include "mpa2.h"
|
||||
#include <sys/param.h> /* For MIN() */
|
||||
/* mcr() compares the sizes of the mantissas of two multiple precision */
|
||||
/* numbers. Mantissas are compared regardless of the signs of the */
|
||||
/* numbers, even if x->d[0] or y->d[0] are zero. Exponents are also */
|
||||
/* disregarded. */
|
||||
static int mcr(const mp_no *x, const mp_no *y, int p) {
|
||||
long i;
|
||||
long p2 = p;
|
||||
for (i=1; i<=p2; i++) {
|
||||
if (X[i] == Y[i]) continue;
|
||||
else if (X[i] > Y[i]) return 1;
|
||||
else return -1; }
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* acr() compares the absolute values of two multiple precision numbers */
|
||||
int __acr(const mp_no *x, const mp_no *y, int p) {
|
||||
long i;
|
||||
|
||||
if (X[0] == ZERO) {
|
||||
if (Y[0] == ZERO) i= 0;
|
||||
else i=-1;
|
||||
}
|
||||
else if (Y[0] == ZERO) i= 1;
|
||||
else {
|
||||
if (EX > EY) i= 1;
|
||||
else if (EX < EY) i=-1;
|
||||
else i= mcr(x,y,p);
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
/* cr90 compares the values of two multiple precision numbers */
|
||||
int __cr(const mp_no *x, const mp_no *y, int p) {
|
||||
int i;
|
||||
|
||||
if (X[0] > Y[0]) i= 1;
|
||||
else if (X[0] < Y[0]) i=-1;
|
||||
else if (X[0] < ZERO ) i= __acr(y,x,p);
|
||||
else i= __acr(x,y,p);
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
/* Copy a multiple precision number. Set *y=*x. x=y is permissible. */
|
||||
void __cpy(const mp_no *x, mp_no *y, int p) {
|
||||
long i;
|
||||
|
||||
EY = EX;
|
||||
for (i=0; i <= p; i++) Y[i] = X[i];
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* Copy a multiple precision number x of precision m into a */
|
||||
/* multiple precision number y of precision n. In case n>m, */
|
||||
/* the digits of y beyond the m'th are set to zero. In case */
|
||||
/* n<m, the digits of x beyond the n'th are ignored. */
|
||||
/* x=y is permissible. */
|
||||
|
||||
void __cpymn(const mp_no *x, int m, mp_no *y, int n) {
|
||||
|
||||
long i,k;
|
||||
long n2 = n;
|
||||
long m2 = m;
|
||||
|
||||
EY = EX; k=MIN(m2,n2);
|
||||
for (i=0; i <= k; i++) Y[i] = X[i];
|
||||
for ( ; i <= n2; i++) Y[i] = ZERO;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* Convert a multiple precision number *x into a double precision */
|
||||
/* number *y, normalized case (|x| >= 2**(-1022))) */
|
||||
static void norm(const mp_no *x, double *y, int p)
|
||||
{
|
||||
#define R radixi.d
|
||||
long i;
|
||||
#if 0
|
||||
int k;
|
||||
#endif
|
||||
double a,c,u,v,z[5];
|
||||
if (p<5) {
|
||||
if (p==1) c = X[1];
|
||||
else if (p==2) c = X[1] + R* X[2];
|
||||
else if (p==3) c = X[1] + R*(X[2] + R* X[3]);
|
||||
else if (p==4) c =(X[1] + R* X[2]) + R*R*(X[3] + R*X[4]);
|
||||
}
|
||||
else {
|
||||
for (a=ONE, z[1]=X[1]; z[1] < TWO23; )
|
||||
{a *= TWO; z[1] *= TWO; }
|
||||
|
||||
for (i=2; i<5; i++) {
|
||||
z[i] = X[i]*a;
|
||||
u = (z[i] + CUTTER)-CUTTER;
|
||||
if (u > z[i]) u -= RADIX;
|
||||
z[i] -= u;
|
||||
z[i-1] += u*RADIXI;
|
||||
}
|
||||
|
||||
u = (z[3] + TWO71) - TWO71;
|
||||
if (u > z[3]) u -= TWO19;
|
||||
v = z[3]-u;
|
||||
|
||||
if (v == TWO18) {
|
||||
if (z[4] == ZERO) {
|
||||
for (i=5; i <= p; i++) {
|
||||
if (X[i] == ZERO) continue;
|
||||
else {z[3] += ONE; break; }
|
||||
}
|
||||
}
|
||||
else z[3] += ONE;
|
||||
}
|
||||
|
||||
c = (z[1] + R *(z[2] + R * z[3]))/a;
|
||||
}
|
||||
|
||||
c *= X[0];
|
||||
|
||||
for (i=1; i<EX; i++) c *= RADIX;
|
||||
for (i=1; i>EX; i--) c *= RADIXI;
|
||||
|
||||
*y = c;
|
||||
return;
|
||||
#undef R
|
||||
}
|
||||
|
||||
/* Convert a multiple precision number *x into a double precision */
|
||||
/* number *y, denormalized case (|x| < 2**(-1022))) */
|
||||
static void denorm(const mp_no *x, double *y, int p)
|
||||
{
|
||||
long i,k;
|
||||
long p2 = p;
|
||||
double c,u,z[5];
|
||||
#if 0
|
||||
double a,v;
|
||||
#endif
|
||||
|
||||
#define R radixi.d
|
||||
if (EX<-44 || (EX==-44 && X[1]<TWO5))
|
||||
{ *y=ZERO; return; }
|
||||
|
||||
if (p2==1) {
|
||||
if (EX==-42) {z[1]=X[1]+TWO10; z[2]=ZERO; z[3]=ZERO; k=3;}
|
||||
else if (EX==-43) {z[1]= TWO10; z[2]=X[1]; z[3]=ZERO; k=2;}
|
||||
else {z[1]= TWO10; z[2]=ZERO; z[3]=X[1]; k=1;}
|
||||
}
|
||||
else if (p2==2) {
|
||||
if (EX==-42) {z[1]=X[1]+TWO10; z[2]=X[2]; z[3]=ZERO; k=3;}
|
||||
else if (EX==-43) {z[1]= TWO10; z[2]=X[1]; z[3]=X[2]; k=2;}
|
||||
else {z[1]= TWO10; z[2]=ZERO; z[3]=X[1]; k=1;}
|
||||
}
|
||||
else {
|
||||
if (EX==-42) {z[1]=X[1]+TWO10; z[2]=X[2]; k=3;}
|
||||
else if (EX==-43) {z[1]= TWO10; z[2]=X[1]; k=2;}
|
||||
else {z[1]= TWO10; z[2]=ZERO; k=1;}
|
||||
z[3] = X[k];
|
||||
}
|
||||
|
||||
u = (z[3] + TWO57) - TWO57;
|
||||
if (u > z[3]) u -= TWO5;
|
||||
|
||||
if (u==z[3]) {
|
||||
for (i=k+1; i <= p2; i++) {
|
||||
if (X[i] == ZERO) continue;
|
||||
else {z[3] += ONE; break; }
|
||||
}
|
||||
}
|
||||
|
||||
c = X[0]*((z[1] + R*(z[2] + R*z[3])) - TWO10);
|
||||
|
||||
*y = c*TWOM1032;
|
||||
return;
|
||||
|
||||
#undef R
|
||||
}
|
||||
|
||||
/* Convert a multiple precision number *x into a double precision number *y. */
|
||||
/* The result is correctly rounded to the nearest/even. *x is left unchanged */
|
||||
|
||||
void __mp_dbl(const mp_no *x, double *y, int p) {
|
||||
#if 0
|
||||
int i,k;
|
||||
double a,c,u,v,z[5];
|
||||
#endif
|
||||
|
||||
if (X[0] == ZERO) {*y = ZERO; return; }
|
||||
|
||||
if (EX> -42) norm(x,y,p);
|
||||
else if (EX==-42 && X[1]>=TWO10) norm(x,y,p);
|
||||
else denorm(x,y,p);
|
||||
}
|
||||
|
||||
|
||||
/* dbl_mp() converts a double precision number x into a multiple precision */
|
||||
/* number *y. If the precision p is too small the result is truncated. x is */
|
||||
/* left unchanged. */
|
||||
|
||||
void __dbl_mp(double x, mp_no *y, int p) {
|
||||
|
||||
long i,n;
|
||||
long p2 = p;
|
||||
double u;
|
||||
|
||||
/* Sign */
|
||||
if (x == ZERO) {Y[0] = ZERO; return; }
|
||||
else if (x > ZERO) Y[0] = ONE;
|
||||
else {Y[0] = MONE; x=-x; }
|
||||
|
||||
/* Exponent */
|
||||
for (EY=ONE; x >= RADIX; EY += ONE) x *= RADIXI;
|
||||
for ( ; x < ONE; EY -= ONE) x *= RADIX;
|
||||
|
||||
/* Digits */
|
||||
n=MIN(p2,4);
|
||||
for (i=1; i<=n; i++) {
|
||||
u = (x + TWO52) - TWO52;
|
||||
if (u>x) u -= ONE;
|
||||
Y[i] = u; x -= u; x *= RADIX; }
|
||||
for ( ; i<=p2; i++) Y[i] = ZERO;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* add_magnitudes() adds the magnitudes of *x & *y assuming that */
|
||||
/* abs(*x) >= abs(*y) > 0. */
|
||||
/* The sign of the sum *z is undefined. x&y may overlap but not x&z or y&z. */
|
||||
/* No guard digit is used. The result equals the exact sum, truncated. */
|
||||
/* *x & *y are left unchanged. */
|
||||
|
||||
static void add_magnitudes(const mp_no *x, const mp_no *y, mp_no *z, int p) {
|
||||
|
||||
long i,j,k;
|
||||
long p2 = p;
|
||||
|
||||
EZ = EX;
|
||||
|
||||
i=p2; j=p2+ EY - EX; k=p2+1;
|
||||
|
||||
if (j<1)
|
||||
{__cpy(x,z,p); return; }
|
||||
else Z[k] = ZERO;
|
||||
|
||||
for (; j>0; i--,j--) {
|
||||
Z[k] += X[i] + Y[j];
|
||||
if (Z[k] >= RADIX) {
|
||||
Z[k] -= RADIX;
|
||||
Z[--k] = ONE; }
|
||||
else
|
||||
Z[--k] = ZERO;
|
||||
}
|
||||
|
||||
for (; i>0; i--) {
|
||||
Z[k] += X[i];
|
||||
if (Z[k] >= RADIX) {
|
||||
Z[k] -= RADIX;
|
||||
Z[--k] = ONE; }
|
||||
else
|
||||
Z[--k] = ZERO;
|
||||
}
|
||||
|
||||
if (Z[1] == ZERO) {
|
||||
for (i=1; i<=p2; i++) Z[i] = Z[i+1]; }
|
||||
else EZ += ONE;
|
||||
}
|
||||
|
||||
|
||||
/* sub_magnitudes() subtracts the magnitudes of *x & *y assuming that */
|
||||
/* abs(*x) > abs(*y) > 0. */
|
||||
/* The sign of the difference *z is undefined. x&y may overlap but not x&z */
|
||||
/* or y&z. One guard digit is used. The error is less than one ulp. */
|
||||
/* *x & *y are left unchanged. */
|
||||
|
||||
static void sub_magnitudes(const mp_no *x, const mp_no *y, mp_no *z, int p) {
|
||||
|
||||
long i,j,k;
|
||||
long p2 = p;
|
||||
|
||||
EZ = EX;
|
||||
|
||||
if (EX == EY) {
|
||||
i=j=k=p2;
|
||||
Z[k] = Z[k+1] = ZERO; }
|
||||
else {
|
||||
j= EX - EY;
|
||||
if (j > p2) {__cpy(x,z,p); return; }
|
||||
else {
|
||||
i=p2; j=p2+1-j; k=p2;
|
||||
if (Y[j] > ZERO) {
|
||||
Z[k+1] = RADIX - Y[j--];
|
||||
Z[k] = MONE; }
|
||||
else {
|
||||
Z[k+1] = ZERO;
|
||||
Z[k] = ZERO; j--;}
|
||||
}
|
||||
}
|
||||
|
||||
for (; j>0; i--,j--) {
|
||||
Z[k] += (X[i] - Y[j]);
|
||||
if (Z[k] < ZERO) {
|
||||
Z[k] += RADIX;
|
||||
Z[--k] = MONE; }
|
||||
else
|
||||
Z[--k] = ZERO;
|
||||
}
|
||||
|
||||
for (; i>0; i--) {
|
||||
Z[k] += X[i];
|
||||
if (Z[k] < ZERO) {
|
||||
Z[k] += RADIX;
|
||||
Z[--k] = MONE; }
|
||||
else
|
||||
Z[--k] = ZERO;
|
||||
}
|
||||
|
||||
for (i=1; Z[i] == ZERO; i++) ;
|
||||
EZ = EZ - i + 1;
|
||||
for (k=1; i <= p2+1; )
|
||||
Z[k++] = Z[i++];
|
||||
for (; k <= p2; )
|
||||
Z[k++] = ZERO;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* Add two multiple precision numbers. Set *z = *x + *y. x&y may overlap */
|
||||
/* but not x&z or y&z. One guard digit is used. The error is less than */
|
||||
/* one ulp. *x & *y are left unchanged. */
|
||||
|
||||
void __add(const mp_no *x, const mp_no *y, mp_no *z, int p) {
|
||||
|
||||
int n;
|
||||
|
||||
if (X[0] == ZERO) {__cpy(y,z,p); return; }
|
||||
else if (Y[0] == ZERO) {__cpy(x,z,p); return; }
|
||||
|
||||
if (X[0] == Y[0]) {
|
||||
if (__acr(x,y,p) > 0) {add_magnitudes(x,y,z,p); Z[0] = X[0]; }
|
||||
else {add_magnitudes(y,x,z,p); Z[0] = Y[0]; }
|
||||
}
|
||||
else {
|
||||
if ((n=__acr(x,y,p)) == 1) {sub_magnitudes(x,y,z,p); Z[0] = X[0]; }
|
||||
else if (n == -1) {sub_magnitudes(y,x,z,p); Z[0] = Y[0]; }
|
||||
else Z[0] = ZERO;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* Subtract two multiple precision numbers. *z is set to *x - *y. x&y may */
|
||||
/* overlap but not x&z or y&z. One guard digit is used. The error is */
|
||||
/* less than one ulp. *x & *y are left unchanged. */
|
||||
|
||||
void __sub(const mp_no *x, const mp_no *y, mp_no *z, int p) {
|
||||
|
||||
int n;
|
||||
|
||||
if (X[0] == ZERO) {__cpy(y,z,p); Z[0] = -Z[0]; return; }
|
||||
else if (Y[0] == ZERO) {__cpy(x,z,p); return; }
|
||||
|
||||
if (X[0] != Y[0]) {
|
||||
if (__acr(x,y,p) > 0) {add_magnitudes(x,y,z,p); Z[0] = X[0]; }
|
||||
else {add_magnitudes(y,x,z,p); Z[0] = -Y[0]; }
|
||||
}
|
||||
else {
|
||||
if ((n=__acr(x,y,p)) == 1) {sub_magnitudes(x,y,z,p); Z[0] = X[0]; }
|
||||
else if (n == -1) {sub_magnitudes(y,x,z,p); Z[0] = -Y[0]; }
|
||||
else Z[0] = ZERO;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* Multiply two multiple precision numbers. *z is set to *x * *y. x&y */
|
||||
/* may overlap but not x&z or y&z. In case p=1,2,3 the exact result is */
|
||||
/* truncated to p digits. In case p>3 the error is bounded by 1.001 ulp. */
|
||||
/* *x & *y are left unchanged. */
|
||||
|
||||
void __mul(const mp_no *x, const mp_no *y, mp_no *z, int p) {
|
||||
|
||||
long i, i1, i2, j, k, k2;
|
||||
long p2 = p;
|
||||
double u, zk, zk2;
|
||||
|
||||
/* Is z=0? */
|
||||
if (X[0]*Y[0]==ZERO)
|
||||
{ Z[0]=ZERO; return; }
|
||||
|
||||
/* Multiply, add and carry */
|
||||
k2 = (p2<3) ? p2+p2 : p2+3;
|
||||
zk = Z[k2]=ZERO;
|
||||
for (k=k2; k>1; ) {
|
||||
if (k > p2) {i1=k-p2; i2=p2+1; }
|
||||
else {i1=1; i2=k; }
|
||||
#if 1
|
||||
/* rearange this inner loop to allow the fmadd instructions to be
|
||||
independent and execute in parallel on processors that have
|
||||
dual symetrical FP pipelines. */
|
||||
if (i1 < (i2-1))
|
||||
{
|
||||
/* make sure we have at least 2 iterations */
|
||||
if (((i2 - i1) & 1L) == 1L)
|
||||
{
|
||||
/* Handle the odd iterations case. */
|
||||
zk2 = x->d[i2-1]*y->d[i1];
|
||||
}
|
||||
else
|
||||
zk2 = zero.d;
|
||||
/* Do two multiply/adds per loop iteration, using independent
|
||||
accumulators; zk and zk2. */
|
||||
for (i=i1,j=i2-1; i<i2-1; i+=2,j-=2)
|
||||
{
|
||||
zk += x->d[i]*y->d[j];
|
||||
zk2 += x->d[i+1]*y->d[j-1];
|
||||
}
|
||||
zk += zk2; /* final sum. */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Special case when iterations is 1. */
|
||||
zk += x->d[i1]*y->d[i1];
|
||||
}
|
||||
#else
|
||||
/* The orginal code. */
|
||||
for (i=i1,j=i2-1; i<i2; i++,j--) zk += X[i]*Y[j];
|
||||
#endif
|
||||
|
||||
u = (zk + CUTTER)-CUTTER;
|
||||
if (u > zk) u -= RADIX;
|
||||
Z[k] = zk - u;
|
||||
zk = u*RADIXI;
|
||||
--k;
|
||||
}
|
||||
Z[k] = zk;
|
||||
|
||||
/* Is there a carry beyond the most significant digit? */
|
||||
if (Z[1] == ZERO) {
|
||||
for (i=1; i<=p2; i++) Z[i]=Z[i+1];
|
||||
EZ = EX + EY - 1; }
|
||||
else
|
||||
EZ = EX + EY;
|
||||
|
||||
Z[0] = X[0] * Y[0];
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* Invert a multiple precision number. Set *y = 1 / *x. */
|
||||
/* Relative error bound = 1.001*r**(1-p) for p=2, 1.063*r**(1-p) for p=3, */
|
||||
/* 2.001*r**(1-p) for p>3. */
|
||||
/* *x=0 is not permissible. *x is left unchanged. */
|
||||
|
||||
void __inv(const mp_no *x, mp_no *y, int p) {
|
||||
long i;
|
||||
#if 0
|
||||
int l;
|
||||
#endif
|
||||
double t;
|
||||
mp_no z,w;
|
||||
static const int np1[] = {0,0,0,0,1,2,2,2,2,3,3,3,3,3,3,3,3,3,
|
||||
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4};
|
||||
const mp_no mptwo = {1,{1.0,2.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
|
||||
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
|
||||
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
|
||||
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
|
||||
|
||||
__cpy(x,&z,p); z.e=0; __mp_dbl(&z,&t,p);
|
||||
t=ONE/t; __dbl_mp(t,y,p); EY -= EX;
|
||||
|
||||
for (i=0; i<np1[p]; i++) {
|
||||
__cpy(y,&w,p);
|
||||
__mul(x,&w,y,p);
|
||||
__sub(&mptwo,y,&z,p);
|
||||
__mul(&w,&z,y,p);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* Divide one multiple precision number by another.Set *z = *x / *y. *x & *y */
|
||||
/* are left unchanged. x&y may overlap but not x&z or y&z. */
|
||||
/* Relative error bound = 2.001*r**(1-p) for p=2, 2.063*r**(1-p) for p=3 */
|
||||
/* and 3.001*r**(1-p) for p>3. *y=0 is not permissible. */
|
||||
|
||||
void __dvd(const mp_no *x, const mp_no *y, mp_no *z, int p) {
|
||||
|
||||
mp_no w;
|
||||
|
||||
if (X[0] == ZERO) Z[0] = ZERO;
|
||||
else {__inv(y,&w,p); __mul(x,&w,z,p);}
|
||||
return;
|
||||
}
|
||||
@@ -1,2 +1,4 @@
|
||||
powerpc/power5+/fpu
|
||||
powerpc/power5+
|
||||
powerpc/powerpc64/power5/fpu
|
||||
powerpc/powerpc64/power5
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
powerpc/power5/fpu
|
||||
powerpc/power5
|
||||
powerpc/powerpc64/power4/fpu
|
||||
powerpc/powerpc64/power4
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
powerpc/powerpc64/power7/fpu
|
||||
powerpc/powerpc64/power7
|
||||
@@ -37,6 +37,13 @@
|
||||
#include <sysdep.h>
|
||||
#include "bp-sym.h"
|
||||
|
||||
/* We do not want .eh_frame info for crt1.o since crt1.o is linked
|
||||
before crtbegin.o, the file defining __EH_FRAME_BEGIN__. */
|
||||
#undef cfi_startproc
|
||||
#define cfi_startproc
|
||||
#undef cfi_endproc
|
||||
#define cfi_endproc
|
||||
|
||||
/* These are the various addresses we require. */
|
||||
#ifdef PIC
|
||||
.section ".data.rel.ro.local","aw"
|
||||
|
||||
@@ -5,3 +5,4 @@
|
||||
#define rtld_global_ro_offsetof(mem) offsetof (struct rtld_global_ro, mem)
|
||||
|
||||
RTLD_GLOBAL_RO_DL_HWCAP_OFFSET rtld_global_ro_offsetof (_dl_hwcap)
|
||||
RTLD_GLOBAL_RO_DL_HWCAP2_OFFSET rtld_global_ro_offsetof (_dl_hwcap2)
|
||||
|
||||
@@ -50,4 +50,66 @@ __ppc_get_timebase (void)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* The following functions provide hints about the usage of shared processor
|
||||
resources, as defined in ISA 2.06 and newer. */
|
||||
|
||||
/* Provides a hint that performance will probably be improved if shared
|
||||
resources dedicated to the executing processor are released for use by other
|
||||
processors. */
|
||||
static inline void
|
||||
__ppc_yield (void)
|
||||
{
|
||||
__asm__ volatile ("or 27,27,27");
|
||||
}
|
||||
|
||||
/* Provides a hint that performance will probably be improved if shared
|
||||
resources dedicated to the executing processor are released until
|
||||
all outstanding storage accesses to caching-inhibited storage have been
|
||||
completed. */
|
||||
static inline void
|
||||
__ppc_mdoio (void)
|
||||
{
|
||||
__asm__ volatile ("or 29,29,29");
|
||||
}
|
||||
|
||||
/* Provides a hint that performance will probably be improved if shared
|
||||
resources dedicated to the executing processor are released until all
|
||||
outstanding storage accesses to cacheable storage for which the data is not
|
||||
in the cache have been completed. */
|
||||
static inline void
|
||||
__ppc_mdoom (void)
|
||||
{
|
||||
__asm__ volatile ("or 30,30,30");
|
||||
}
|
||||
|
||||
|
||||
/* ISA 2.05 and beyond support the Program Priority Register (PPR) to adjust
|
||||
thread priorities based on lock acquisition, wait and release. The ISA
|
||||
defines the use of form 'or Rx,Rx,Rx' as the way to modify the PRI field.
|
||||
The unprivileged priorities are:
|
||||
Rx = 1 (low)
|
||||
Rx = 2 (medium)
|
||||
Rx = 6 (medium-low/normal)
|
||||
The 'or' instruction form is a nop in previous hardware, so it is safe to
|
||||
use unguarded. The default value is 'medium'.
|
||||
*/
|
||||
|
||||
static inline void
|
||||
__ppc_set_ppr_med (void)
|
||||
{
|
||||
__asm__ volatile ("or 2,2,2");
|
||||
}
|
||||
|
||||
static inline void
|
||||
__ppc_set_ppr_med_low (void)
|
||||
{
|
||||
__asm__ volatile ("or 6,6,6");
|
||||
}
|
||||
|
||||
static inline void
|
||||
__ppc_set_ppr_low (void)
|
||||
{
|
||||
__asm__ volatile ("or 1,1,1");
|
||||
}
|
||||
|
||||
#endif /* sys/platform/ppc.h */
|
||||
|
||||
@@ -56,7 +56,7 @@ enum
|
||||
| HWCAP_S390_EIMM | HWCAP_S390_DFP)
|
||||
|
||||
/* We cannot provide a general printing function. */
|
||||
#define _dl_procinfo(word) -1
|
||||
#define _dl_procinfo(type, word) -1
|
||||
|
||||
static inline const char *
|
||||
__attribute__ ((unused))
|
||||
|
||||
@@ -28,10 +28,14 @@
|
||||
|
||||
static inline int
|
||||
__attribute__ ((unused))
|
||||
_dl_procinfo (int word)
|
||||
_dl_procinfo (unsigned int type, unsigned long int word)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* Fallback to unknown output mechanism. */
|
||||
if (type == AT_HWCAP2)
|
||||
return -1;
|
||||
|
||||
_dl_printf ("AT_HWCAP: ");
|
||||
|
||||
for (i = 0; i < _DL_HWCAP_COUNT; ++i)
|
||||
|
||||
@@ -95,6 +95,7 @@ typedef struct
|
||||
struct
|
||||
{
|
||||
void *si_addr; /* Faulting insn/memory ref. */
|
||||
short int si_addr_lsb; /* Valid LSB of the reported address. */
|
||||
} _sigfault;
|
||||
|
||||
/* SIGPOLL. */
|
||||
@@ -127,6 +128,7 @@ typedef struct
|
||||
# define si_int _sifields._rt.si_sigval.sival_int
|
||||
# define si_ptr _sifields._rt.si_sigval.sival_ptr
|
||||
# define si_addr _sifields._sigfault.si_addr
|
||||
# define si_addr_lsb _sifields._sigfault.si_addr_lsb
|
||||
# define si_band _sifields._sigpoll.si_band
|
||||
# define si_fd _sifields._sigpoll.si_fd
|
||||
# define si_call_addr _sifields._sigsys._call_addr
|
||||
@@ -217,8 +219,12 @@ enum
|
||||
# define BUS_ADRALN BUS_ADRALN
|
||||
BUS_ADRERR, /* Non-existant physical address. */
|
||||
# define BUS_ADRERR BUS_ADRERR
|
||||
BUS_OBJERR /* Object specific hardware error. */
|
||||
BUS_OBJERR, /* Object specific hardware error. */
|
||||
# define BUS_OBJERR BUS_OBJERR
|
||||
BUS_MCEERR_AR, /* Hardware memory error: action required. */
|
||||
# define BUS_MCEERR_AR BUS_MCEERR_AR
|
||||
BUS_MCEERR_AO /* Hardware memory error: action optional. */
|
||||
# define BUS_MCEERR_AO BUS_MCEERR_AO
|
||||
};
|
||||
|
||||
/* `si_code' values for SIGTRAP signal. */
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/* System-specific socket constants and types. Linux version.
|
||||
Copyright (C) 1991, 1992, 1994-2001, 2004, 2006-2010, 2011, 2012
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1991-2013 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -208,6 +207,8 @@ enum
|
||||
#define MSG_MORE MSG_MORE
|
||||
MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/
|
||||
#define MSG_WAITFORONE MSG_WAITFORONE
|
||||
MSG_FASTOPEN = 0x20000000, /* Send data in TCP SYN. */
|
||||
#define MSG_FASTOPEN MSG_FASTOPEN
|
||||
|
||||
MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file
|
||||
descriptor received through
|
||||
|
||||
@@ -24,12 +24,16 @@
|
||||
#undef _dl_procinfo
|
||||
static inline int
|
||||
__attribute__ ((unused))
|
||||
_dl_procinfo (int word)
|
||||
_dl_procinfo (unsigned int type, unsigned long int word)
|
||||
{
|
||||
/* This table should match the information from arch/i386/kernel/setup.c
|
||||
in the kernel sources. */
|
||||
int i;
|
||||
|
||||
/* Fallback to unknown output mechanism. */
|
||||
if (type == AT_HWCAP2)
|
||||
return -1;
|
||||
|
||||
_dl_printf ("AT_HWCAP: ");
|
||||
|
||||
for (i = 0; i < _DL_HWCAP_COUNT; ++i)
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# Make sure these routines come before ldbl-opt.
|
||||
ieee754/ldbl-128ibm
|
||||
# These supply the ABI compatibility for when long double was double.
|
||||
ieee754/ldbl-opt
|
||||
@@ -15,6 +15,12 @@ endif
|
||||
|
||||
ifeq ($(subdir),elf)
|
||||
sysdep_routines += dl-vdso
|
||||
ifeq ($(build-shared),yes)
|
||||
# This is needed for DSO loading from static binaries.
|
||||
sysdep-dl-routines += dl-static
|
||||
sysdep_routines += dl-static
|
||||
sysdep-rtld-routines += dl-static
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(subdir),misc)
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
ld {
|
||||
GLIBC_PRIVATE {
|
||||
# used for loading by static libraries
|
||||
_dl_var_init;
|
||||
}
|
||||
}
|
||||
libc {
|
||||
GLIBC_PRIVATE {
|
||||
__vdso_get_tbfreq;
|
||||
__vdso_clock_gettime;
|
||||
__vdso_clock_getres;
|
||||
__vdso_getcpu;
|
||||
__vdso_time;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,20 @@ extern void *__vdso_clock_getres;
|
||||
|
||||
extern void *__vdso_get_tbfreq;
|
||||
|
||||
extern void *__vdso_getcpu;
|
||||
|
||||
extern void *__vdso_time;
|
||||
|
||||
/* This macro is needed for PPC64 to return a skeleton OPD entry of a vDSO
|
||||
symbol. This works because _dl_vdso_vsym always return the function
|
||||
address, and no vDSO symbols use the TOC or chain pointers from the OPD
|
||||
so we can allow them to be garbage. */
|
||||
#if defined(__PPC64__) || defined(__powerpc64__)
|
||||
#define VDSO_IFUNC_RET(value) ((void *) &(value))
|
||||
#else
|
||||
#define VDSO_IFUNC_RET(value) ((void *) (value))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _LIBC_VDSO_H */
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
/* Variable initialization. PowerPC version.
|
||||
Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library. If not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <ldsodefs.h>
|
||||
|
||||
#ifdef SHARED
|
||||
|
||||
void
|
||||
_dl_var_init (void *array[])
|
||||
{
|
||||
/* It has to match "variables" below. */
|
||||
enum
|
||||
{
|
||||
DL_PAGESIZE = 0
|
||||
};
|
||||
|
||||
GLRO(dl_pagesize) = *((size_t *) array[DL_PAGESIZE]);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static void *variables[] =
|
||||
{
|
||||
&GLRO(dl_pagesize)
|
||||
};
|
||||
|
||||
static void
|
||||
_dl_unprotect_relro (struct link_map *l)
|
||||
{
|
||||
ElfW(Addr) start = ((l->l_addr + l->l_relro_addr)
|
||||
& ~(GLRO(dl_pagesize) - 1));
|
||||
ElfW(Addr) end = ((l->l_addr + l->l_relro_addr + l->l_relro_size)
|
||||
& ~(GLRO(dl_pagesize) - 1));
|
||||
|
||||
if (start != end)
|
||||
__mprotect ((void *) start, end - start, PROT_READ | PROT_WRITE);
|
||||
}
|
||||
|
||||
void
|
||||
_dl_static_init (struct link_map *l)
|
||||
{
|
||||
struct link_map *rtld_map = l;
|
||||
struct r_scope_elem **scope;
|
||||
const ElfW(Sym) *ref = NULL;
|
||||
lookup_t loadbase;
|
||||
void (*f) (void *[]);
|
||||
size_t i;
|
||||
|
||||
loadbase = _dl_lookup_symbol_x ("_dl_var_init", l, &ref, l->l_local_scope,
|
||||
NULL, 0, 1, NULL);
|
||||
|
||||
for (scope = l->l_local_scope; *scope != NULL; scope++)
|
||||
for (i = 0; i < (*scope)->r_nlist; i++)
|
||||
if ((*scope)->r_list[i] == loadbase)
|
||||
{
|
||||
rtld_map = (*scope)->r_list[i];
|
||||
break;
|
||||
}
|
||||
|
||||
if (ref != NULL)
|
||||
{
|
||||
f = (void (*) (void *[])) DL_SYMBOL_ADDRESS (loadbase, ref);
|
||||
_dl_unprotect_relro (rtld_map);
|
||||
f (variables);
|
||||
_dl_protect_relro (rtld_map);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -41,7 +41,8 @@ __get_clockfreq (void)
|
||||
/* If we can use the vDSO to obtain the timebase even better. */
|
||||
#ifdef SHARED
|
||||
INTERNAL_SYSCALL_DECL (err);
|
||||
timebase_freq = INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK (get_tbfreq, err, 0);
|
||||
timebase_freq =
|
||||
INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK (get_tbfreq, err, hp_timing_t, 0);
|
||||
if (INTERNAL_SYSCALL_ERROR_P (timebase_freq, err)
|
||||
&& INTERNAL_SYSCALL_ERRNO (timebase_freq, err) == ENOSYS)
|
||||
#endif
|
||||
|
||||
@@ -15,26 +15,48 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
#include <bp-checks.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#include <hp-timing.h>
|
||||
|
||||
#include <bits/libc-vdso.h>
|
||||
#ifdef SHARED
|
||||
|
||||
/* Get the current time of day and timezone information,
|
||||
putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled.
|
||||
Returns 0 on success, -1 on errors. */
|
||||
# include <dl-vdso.h>
|
||||
# include <bits/libc-vdso.h>
|
||||
|
||||
void *gettimeofday_ifunc (void) __asm__ ("__gettimeofday");
|
||||
|
||||
static int
|
||||
__gettimeofday_syscall (struct timeval *tv, struct timezone *tz)
|
||||
{
|
||||
return INLINE_SYSCALL (gettimeofday, 2, tv, tz);
|
||||
}
|
||||
|
||||
void *
|
||||
gettimeofday_ifunc (void)
|
||||
{
|
||||
/* If the vDSO is not available we fall back syscall. */
|
||||
return (__vdso_gettimeofday ? VDSO_IFUNC_RET (__vdso_gettimeofday)
|
||||
: __gettimeofday_syscall);
|
||||
}
|
||||
asm (".type __gettimeofday, %gnu_indirect_function");
|
||||
|
||||
/* This is doing "libc_hidden_def (__gettimeofday)" but the compiler won't
|
||||
let us do it in C because it doesn't know we're defining __gettimeofday
|
||||
here in this file. */
|
||||
asm (".globl __GI___gettimeofday\n"
|
||||
"__GI___gettimeofday = __gettimeofday");
|
||||
|
||||
#else
|
||||
|
||||
# include <sysdep.h>
|
||||
# include <errno.h>
|
||||
|
||||
int
|
||||
__gettimeofday (tv, tz)
|
||||
struct timeval *tv;
|
||||
struct timezone *tz;
|
||||
__gettimeofday (struct timeval *tv, struct timezone *tz)
|
||||
{
|
||||
return INLINE_VSYSCALL (gettimeofday, 2, CHECK_1 (tv), CHECK_1 (tz));
|
||||
return INLINE_SYSCALL (gettimeofday, 2, tv, tz);
|
||||
}
|
||||
libc_hidden_def (__gettimeofday)
|
||||
|
||||
#endif
|
||||
weak_alias (__gettimeofday, gettimeofday)
|
||||
libc_hidden_weak (gettimeofday)
|
||||
|
||||
@@ -27,7 +27,8 @@ void *__vdso_gettimeofday attribute_hidden;
|
||||
void *__vdso_clock_gettime;
|
||||
void *__vdso_clock_getres;
|
||||
void *__vdso_get_tbfreq;
|
||||
|
||||
void *__vdso_getcpu;
|
||||
void *__vdso_time;
|
||||
|
||||
static inline void
|
||||
_libc_vdso_platform_setup (void)
|
||||
@@ -40,7 +41,11 @@ _libc_vdso_platform_setup (void)
|
||||
|
||||
__vdso_clock_getres = _dl_vdso_vsym ("__kernel_clock_getres", &linux2615);
|
||||
|
||||
__vdso_get_tbfreq = _dl_vdso_vsym ("__kernel_vdso_get_tbfreq", &linux2615);
|
||||
__vdso_get_tbfreq = _dl_vdso_vsym ("__kernel_get_tbfreq", &linux2615);
|
||||
|
||||
__vdso_getcpu = _dl_vdso_vsym ("__kernel_getcpu", &linux2615);
|
||||
|
||||
__vdso_time = _dl_vdso_vsym ("__kernel_time", &linux2615);
|
||||
}
|
||||
|
||||
# define VDSO_SETUP _libc_vdso_platform_setup
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/* Run-time dynamic linker data structures for loaded ELF shared objects.
|
||||
PowerPC version.
|
||||
Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _LDSODEFS_H
|
||||
|
||||
/* Get the real definitions. */
|
||||
#include_next <ldsodefs.h>
|
||||
|
||||
/* Now define our stuff. */
|
||||
|
||||
/* We need special support to initialize DSO loaded for statically linked
|
||||
binaries. */
|
||||
extern void _dl_static_init (struct link_map *map);
|
||||
#undef DL_STATIC_INIT
|
||||
#define DL_STATIC_INIT(map) _dl_static_init (map)
|
||||
|
||||
#endif /* ldsodefs.h */
|
||||
@@ -0,0 +1,2 @@
|
||||
powerpc/powerpc32/power8/fpu
|
||||
powerpc/powerpc32/power8
|
||||
@@ -60,7 +60,8 @@
|
||||
\
|
||||
if (__vdso_##name != NULL) \
|
||||
{ \
|
||||
sc_ret = INTERNAL_VSYSCALL_NCS (__vdso_##name, sc_err, nr, ##args); \
|
||||
sc_ret = \
|
||||
INTERNAL_VSYSCALL_NCS (__vdso_##name, sc_err, long int, nr, ##args);\
|
||||
if (!INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err)) \
|
||||
goto out; \
|
||||
if (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err) != ENOSYS) \
|
||||
@@ -90,7 +91,8 @@
|
||||
\
|
||||
if (__vdso_##name != NULL) \
|
||||
{ \
|
||||
v_ret = INTERNAL_VSYSCALL_NCS (__vdso_##name, err, nr, ##args); \
|
||||
v_ret = \
|
||||
INTERNAL_VSYSCALL_NCS (__vdso_##name, err, long int, nr, ##args); \
|
||||
if (!INTERNAL_SYSCALL_ERROR_P (v_ret, err) \
|
||||
|| INTERNAL_SYSCALL_ERRNO (v_ret, err) != ENOSYS) \
|
||||
goto out; \
|
||||
@@ -104,12 +106,12 @@
|
||||
INTERNAL_SYSCALL (name, err, nr, ##args)
|
||||
# endif
|
||||
|
||||
# define INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK(name, err, nr, args...) \
|
||||
# define INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK(name, err, type, nr, args...) \
|
||||
({ \
|
||||
long int sc_ret = ENOSYS; \
|
||||
type sc_ret = ENOSYS; \
|
||||
\
|
||||
if (__vdso_##name != NULL) \
|
||||
sc_ret = INTERNAL_VSYSCALL_NCS (__vdso_##name, err, nr, ##args); \
|
||||
sc_ret = INTERNAL_VSYSCALL_NCS (__vdso_##name, err, type, nr, ##args); \
|
||||
else \
|
||||
err = 1 << 28; \
|
||||
sc_ret; \
|
||||
@@ -126,7 +128,7 @@
|
||||
function call, with the exception of LR (which is needed for the
|
||||
"sc; bnslr+" sequence) and CR (where only CR0.SO is clobbered to signal
|
||||
an error return status). */
|
||||
# define INTERNAL_VSYSCALL_NCS(funcptr, err, nr, args...) \
|
||||
# define INTERNAL_VSYSCALL_NCS(funcptr, err, type, nr, args...) \
|
||||
({ \
|
||||
register void *r0 __asm__ ("r0"); \
|
||||
register long int r3 __asm__ ("r3"); \
|
||||
@@ -139,18 +141,18 @@
|
||||
register long int r10 __asm__ ("r10"); \
|
||||
register long int r11 __asm__ ("r11"); \
|
||||
register long int r12 __asm__ ("r12"); \
|
||||
register type rval __asm__ ("r3"); \
|
||||
LOADARGS_##nr (funcptr, args); \
|
||||
__asm__ __volatile__ \
|
||||
("mtctr %0\n\t" \
|
||||
"bctrl\n\t" \
|
||||
"mfcr %0" \
|
||||
: "=&r" (r0), \
|
||||
"=&r" (r3), "=&r" (r4), "=&r" (r5), "=&r" (r6), "=&r" (r7), \
|
||||
"=&r" (r8), "=&r" (r9), "=&r" (r10), "=&r" (r11), "=&r" (r12) \
|
||||
: ASM_INPUT_##nr \
|
||||
: "cr0", "ctr", "lr", "memory"); \
|
||||
: "+r" (r0), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7), \
|
||||
"+r" (r8), "+r" (r9), "+r" (r10), "+r" (r11), "+r" (r12) \
|
||||
: : "cr0", "ctr", "lr", "memory"); \
|
||||
err = (long int) r0; \
|
||||
(int) r3; \
|
||||
__asm__ __volatile__ ("" : "=r" (rval) : "r" (r3), "r" (r4)); \
|
||||
rval; \
|
||||
})
|
||||
|
||||
# undef INLINE_SYSCALL
|
||||
@@ -191,7 +193,7 @@
|
||||
register long int r10 __asm__ ("r10"); \
|
||||
register long int r11 __asm__ ("r11"); \
|
||||
register long int r12 __asm__ ("r12"); \
|
||||
LOADARGS_##nr(name, args); \
|
||||
LOADARGS_##nr(name, args); \
|
||||
__asm__ __volatile__ \
|
||||
("sc \n\t" \
|
||||
"mfcr %0" \
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
powerpc/powerpc64/power8/fpu
|
||||
powerpc/powerpc64/power8
|
||||
@@ -75,7 +75,8 @@
|
||||
\
|
||||
if (__vdso_##name != NULL) \
|
||||
{ \
|
||||
sc_ret = INTERNAL_VSYSCALL_NCS (__vdso_##name, sc_err, nr, ##args); \
|
||||
sc_ret = \
|
||||
INTERNAL_VSYSCALL_NCS (__vdso_##name, sc_err, long int, nr, ##args);\
|
||||
if (!INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err)) \
|
||||
goto out; \
|
||||
if (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err) != ENOSYS) \
|
||||
@@ -105,7 +106,8 @@
|
||||
\
|
||||
if (__vdso_##name != NULL) \
|
||||
{ \
|
||||
v_ret = INTERNAL_VSYSCALL_NCS (__vdso_##name, err, nr, ##args); \
|
||||
v_ret = \
|
||||
INTERNAL_VSYSCALL_NCS (__vdso_##name, err, long int, nr, ##args); \
|
||||
if (!INTERNAL_SYSCALL_ERROR_P (v_ret, err) \
|
||||
|| INTERNAL_SYSCALL_ERRNO (v_ret, err) != ENOSYS) \
|
||||
goto out; \
|
||||
@@ -121,12 +123,12 @@
|
||||
|
||||
/* This version is for internal uses when there is no desire
|
||||
to set errno */
|
||||
#define INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK(name, err, nr, args...) \
|
||||
#define INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK(name, err, type, nr, args...) \
|
||||
({ \
|
||||
long int sc_ret = ENOSYS; \
|
||||
type sc_ret = ENOSYS; \
|
||||
\
|
||||
if (__vdso_##name != NULL) \
|
||||
sc_ret = INTERNAL_VSYSCALL_NCS (__vdso_##name, err, nr, ##args); \
|
||||
sc_ret = INTERNAL_VSYSCALL_NCS (__vdso_##name, err, type, nr, ##args); \
|
||||
else \
|
||||
err = 1 << 28; \
|
||||
sc_ret; \
|
||||
@@ -142,7 +144,7 @@
|
||||
gave back in the non-error (CR0.SO cleared) case, otherwise (CR0.SO set)
|
||||
the negation of the return value in the kernel gets reverted. */
|
||||
|
||||
#define INTERNAL_VSYSCALL_NCS(funcptr, err, nr, args...) \
|
||||
#define INTERNAL_VSYSCALL_NCS(funcptr, err, type, nr, args...) \
|
||||
({ \
|
||||
register void *r0 __asm__ ("r0"); \
|
||||
register long int r3 __asm__ ("r3"); \
|
||||
@@ -151,20 +153,19 @@
|
||||
register long int r6 __asm__ ("r6"); \
|
||||
register long int r7 __asm__ ("r7"); \
|
||||
register long int r8 __asm__ ("r8"); \
|
||||
register type rval __asm__ ("r3"); \
|
||||
LOADARGS_##nr (funcptr, args); \
|
||||
__asm__ __volatile__ \
|
||||
("mtctr %0\n\t" \
|
||||
"bctrl\n\t" \
|
||||
"mfcr %0\n\t" \
|
||||
"0:" \
|
||||
: "=&r" (r0), \
|
||||
"=&r" (r3), "=&r" (r4), "=&r" (r5), \
|
||||
"=&r" (r6), "=&r" (r7), "=&r" (r8) \
|
||||
: ASM_INPUT_##nr \
|
||||
: "r9", "r10", "r11", "r12", \
|
||||
"cr0", "ctr", "lr", "memory"); \
|
||||
err = (long int) r0; \
|
||||
r3; \
|
||||
: "+r" (r0), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), \
|
||||
"+r" (r7), "+r" (r8) \
|
||||
: : "r9", "r10", "r11", "r12", "cr0", "ctr", "lr", "memory"); \
|
||||
err = (long int) r0; \
|
||||
__asm__ __volatile__ ("" : "=r" (rval) : "r" (r3)); \
|
||||
rval; \
|
||||
})
|
||||
|
||||
#undef INLINE_SYSCALL
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user