Chris Metcalf [Thu, 17 May 2012 15:27:36 +0000 (11:27 -0400)]
tile: use ieee754/dbl-64 version of fma() and fmaf()
It turns out that even if you stub out the rounding and exception
support and use the ieee754 version, it's still much better than
the generic version that just uses normal multiply and add.
The resulting functions have only 1 ULP of error according to the tests.
Chris Metcalf [Wed, 16 May 2012 13:34:38 +0000 (09:34 -0400)]
linux-generic: add header guard for <not-cancel.h>
In general we just try to include <not-cancel.h> once, thus avoiding
any issues with multiple inclusion.
However, the getaddrinfo sources are somewhat tangled, and .c files
include each other to get the final result. Each .c file currently has
its own include of <not-cancel.h>. While you could properly re-factor
this for the case of gai.c, the posix/tst-rfc3484.c tests directly include
one of the sub-files (sysdeps/posix/getaddrinfo.c), and it starts to
feel fragile.
Mike Frysinger [Tue, 15 May 2012 00:39:30 +0000 (20:39 -0400)]
ia64: use __aligned__ inside of attributes
Installed headers should always use the forms of attributes with __
prefixes and suffixes, so __attribute__ ((__aligned__ (8))) instead of
the plain "aligned" form, to avoid taking identifiers from the user's
namespace.
URL: http://sourceware.org/bugzilla/show_bug.cgi?id=14109 Reported-by: Joseph Myers <joseph@codesourcery.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Chris Metcalf [Mon, 14 May 2012 19:03:46 +0000 (15:03 -0400)]
tile: align stack for tilegx32
Previously we weren't re-aligning the stack pointer during the
call to _dl_init(), so for tilegx32 and an odd value in _dl_skip_args
and kernel unaligned access fixups disabled, we would die with SIGBUS.
We now handle this case properly by aligning before calling _dl_init().
Chris Metcalf [Fri, 11 May 2012 22:03:58 +0000 (18:03 -0400)]
tilegx: small performance fix for string routines
We were multiplying a byte by 0x0101010101010101ULL to create a
constant for SIMD ops, but the compiler isn't good at optimizing
this case (the fact that one operand is a byte is lost by the time
it would be possible to do the optimization). So instead we add
a helper routine that explicitly uses SIMD ops to create the constant.
Chris Metcalf [Fri, 11 May 2012 21:59:23 +0000 (17:59 -0400)]
tile: allow memcpy(p, p, n) without corrupting memory at "p"
Although this is not required by the definition of memcpy(),
in practice this sort of thing does happen, and it's easy to make
the code robust by doing nothing in this case. (Since structure
copy causes the compiler to emit a memcpy, in the case where the
target structure is the same as the destination, we were seeing
corruption.)
Chris Metcalf [Fri, 11 May 2012 18:27:57 +0000 (14:27 -0400)]
tile: Remove elf/ and create crti.S/crtn.S
This patches fixes up the tile startup files, moving elf/start.S up a
directory level and implementing the required crti.S and crtn.S files
based on the old initfini.c compiler output (hand-optimized to bum a
couple of cycles).
Carlos O'Donell [Tue, 8 May 2012 02:14:44 +0000 (22:14 -0400)]
ARM: Use /lib/ld-linux-armhf.so.3 for the hard-float ABI.
The hard-float ABI will now use /lib/ld-linux-armhf.so.3.
We detect the use of the hard-float ABI and select the
appropriate dynamic linker name. You must have a new or
patched compiler which also uses the new dynamic loader
name when the hard-float ABI is selected.
Mike Frysinger [Tue, 8 May 2012 03:17:48 +0000 (23:17 -0400)]
ia64: include errno.h in sysdep.h
This header uses __set_errno(), so make sure we include errno.h for it.
Otherwise, if INLINE_SYSCALL() is used and errno.h isn't included, we
hit warnings like so:
In file included from libc-start.c:36:0:
../sysdeps/unix/sysv/linux/dl-osinfo.h: In function '_dl_setup_stack_chk_guard':
../sysdeps/unix/sysv/linux/dl-osinfo.h:79:7: warning: implicit declaration of function '__set_errno'
Which culminate in errors like so:
libc-start.c:(.text+0x692): undefined reference to '__set_errno'
libc-start.c:(.text+0x752): undefined reference to '__set_errno'
collect2: ld returned 1 exit status
Reported-by: Dennis Schridde <devurandom@gmx.net> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sun, 6 May 2012 22:24:32 +0000 (18:24 -0400)]
ia64: add matherr[fl] to libm.so plt whitelist
The ia64 math code has extra matherr functions (f and l variants),
so add them to the libm.so plt whitelist like the existing matherr
in the main code.
Mike Frysinger [Sun, 6 May 2012 09:39:09 +0000 (05:39 -0400)]
ia64: update abilist
For the most part, these are adding symbols from newer glibc releases that
should have been added to ia64 in the first place, but no one noticed.
There were also adding symbols from older versions, but that appears to be
an oversight in the old abilist files where the ia64 tuple wasn't added to
the symbol block.
A few symbols did get deleted, but that looks normal as no other arch has
them, and comparing to an old glibc-2.7 build, things have been this way
for quite a while.
Mike Frysinger [Sun, 6 May 2012 08:49:52 +0000 (04:49 -0400)]
ia64: restore abilist files
These are the abilists as ia64 had them before being removed from the
main tree. Most libs pass, but a bunch need updating. That'll be done
in a follow up commit.
Mike Frysinger [Tue, 17 Apr 2012 02:45:14 +0000 (22:45 -0400)]
ia64: ucontext.h: drop __cplusplus
Building a lot of glibc files trigger warnings like so:
.../ucontext.h:52:25: warning: variably modified '_pad' at file scope
The ia64 header protects the use of __builtin_offsetof by a C++
compiler, but this builtin works just fine with C compilers, so
allow it to be used there too.
Mike Frysinger [Tue, 17 Apr 2012 02:43:09 +0000 (22:43 -0400)]
ia64: math: add __scalbn* aliases
All other ports have __scalbn* aliases pointing back to scalbn*, but
the ia64 code had omitted them. This didn't really matter as none
of the common code called them, but after a recent update, that's no
longer true. Add the aliases needed by some common code to fix link
errors with libm due to them missing.