[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r22885 - in /fsf/trunk/libc: ./ ports/ ports/sysdeps/microblaze/ ports/sysdeps/microblaze/bits/ ports/sysdeps/microblaze/npt...



Author: eglibc
Date: Fri Apr 19 00:01:55 2013
New Revision: 22885

Log:
Import glibc-mainline for 2013-04-19

Added:
    fsf/trunk/libc/ports/ChangeLog.microblaze
    fsf/trunk/libc/ports/sysdeps/microblaze/
    fsf/trunk/libc/ports/sysdeps/microblaze/Implies
    fsf/trunk/libc/ports/sysdeps/microblaze/Makefile
    fsf/trunk/libc/ports/sysdeps/microblaze/__longjmp.S
    fsf/trunk/libc/ports/sysdeps/microblaze/_mcount.S
    fsf/trunk/libc/ports/sysdeps/microblaze/abort-instr.h
    fsf/trunk/libc/ports/sysdeps/microblaze/asm-syntax.h
    fsf/trunk/libc/ports/sysdeps/microblaze/backtrace.c
    fsf/trunk/libc/ports/sysdeps/microblaze/backtrace_linux.c
    fsf/trunk/libc/ports/sysdeps/microblaze/bits/
    fsf/trunk/libc/ports/sysdeps/microblaze/bits/atomic.h   (with props)
    fsf/trunk/libc/ports/sysdeps/microblaze/bits/endian.h
    fsf/trunk/libc/ports/sysdeps/microblaze/bits/fenv.h
    fsf/trunk/libc/ports/sysdeps/microblaze/bits/link.h
    fsf/trunk/libc/ports/sysdeps/microblaze/bits/setjmp.h
    fsf/trunk/libc/ports/sysdeps/microblaze/bsd-_setjmp.S
    fsf/trunk/libc/ports/sysdeps/microblaze/bsd-setjmp.S
    fsf/trunk/libc/ports/sysdeps/microblaze/crti.S
    fsf/trunk/libc/ports/sysdeps/microblaze/crtn.S
    fsf/trunk/libc/ports/sysdeps/microblaze/dl-machine.h
    fsf/trunk/libc/ports/sysdeps/microblaze/dl-tls.h
    fsf/trunk/libc/ports/sysdeps/microblaze/dl-trampoline.S
    fsf/trunk/libc/ports/sysdeps/microblaze/fegetround.c
    fsf/trunk/libc/ports/sysdeps/microblaze/fesetround.c
    fsf/trunk/libc/ports/sysdeps/microblaze/gccframe.h
    fsf/trunk/libc/ports/sysdeps/microblaze/jmpbuf-unwind.h
    fsf/trunk/libc/ports/sysdeps/microblaze/ldsodefs.h
    fsf/trunk/libc/ports/sysdeps/microblaze/libc-tls.c
    fsf/trunk/libc/ports/sysdeps/microblaze/libm-test-ulps
    fsf/trunk/libc/ports/sysdeps/microblaze/libm-test-ulps_new
    fsf/trunk/libc/ports/sysdeps/microblaze/machine-gmon.h
    fsf/trunk/libc/ports/sysdeps/microblaze/math_private.h
    fsf/trunk/libc/ports/sysdeps/microblaze/memusage.h
    fsf/trunk/libc/ports/sysdeps/microblaze/nptl/
    fsf/trunk/libc/ports/sysdeps/microblaze/nptl/Makefile
    fsf/trunk/libc/ports/sysdeps/microblaze/nptl/pthread_spin_lock.c
    fsf/trunk/libc/ports/sysdeps/microblaze/nptl/pthreaddef.h
    fsf/trunk/libc/ports/sysdeps/microblaze/nptl/tcb-offsets.sym
    fsf/trunk/libc/ports/sysdeps/microblaze/nptl/tls.h
    fsf/trunk/libc/ports/sysdeps/microblaze/preconfigure
    fsf/trunk/libc/ports/sysdeps/microblaze/setjmp.S
    fsf/trunk/libc/ports/sysdeps/microblaze/shlib-versions
    fsf/trunk/libc/ports/sysdeps/microblaze/sotruss-lib.c
    fsf/trunk/libc/ports/sysdeps/microblaze/stackinfo.h
    fsf/trunk/libc/ports/sysdeps/microblaze/start.S
    fsf/trunk/libc/ports/sysdeps/microblaze/sysdep.h
    fsf/trunk/libc/ports/sysdeps/microblaze/tls-macros.h
    fsf/trunk/libc/ports/sysdeps/microblaze/tst-audit.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/Makefile
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/Versions
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/____longjmp_chk.S
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/bits/
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/bits/fcntl.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/bits/mman.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/bits/stat.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/brk.c
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/clone.S
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/configure
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/configure.in
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/fcntl.c
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/fxstat.c
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/fxstatat.c
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/getsysstats.c
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/kernel_stat.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/lxstat.c
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/mmap.S
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/msgctl.c
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/bits/
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/bits/pthreadtypes.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/bits/semaphore.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/c++-types.data
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/createthread.c
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/fork.c
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/ld.abilist
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/libBrokenLocale.abilist
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/libanl.abilist
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/libc.abilist
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/libcrypt.abilist
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/libdl.abilist
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/libm.abilist
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/libnsl.abilist
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/libpthread.abilist
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/libresolv.abilist
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/librt.abilist
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/libthread_db.abilist
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/libutil.abilist
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/localplt.data
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/lowlevellock.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/pt-vfork.S
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/pthread_once.c
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/nptl/vfork.S
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/profil-counter.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/semctl.c
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/setgroups.c
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/shmctl.c
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/sigcontextinfo.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/socket.S
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/sys/
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/sys/procfs.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/sys/user.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/syscall.S
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/syscalls.list
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/sysdep.S
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/sysdep.h   (with props)
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/microblaze/xstat.c
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/configure
    fsf/trunk/libc/configure.in
    fsf/trunk/libc/sysdeps/i386/configure
    fsf/trunk/libc/sysdeps/i386/configure.in

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Apr 19 00:01:55 2013
@@ -1,3 +1,11 @@
+2013-04-17  Carlos O'Donell  <carlos@xxxxxxxxxx>
+
+	* configure.in: Remove i386 configure warning. Remove i386 case.
+	* configure: Regenerate.
+	* sysdeps/i386/configure.in: Raise error if config_machine is i386.
+	Add example to error message.
+	* sysdeps/i386/configure: Regenerate.
+
 2013-04-17  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
 
 	* benchtests/Makefile (bench): Add cos, tan, slowcos and

Modified: fsf/trunk/libc/configure
==============================================================================
--- fsf/trunk/libc/configure (original)
+++ fsf/trunk/libc/configure Fri Apr 19 00:01:55 2013
@@ -3741,15 +3741,6 @@
     ;;
 esac
 
-# Configure for i686 if the user asks for i386. We don't support
-# i386 any more but it continues to be common for users to configure
-# 32-bit x86 as i386. We build for i686 instead.
-if test "$machine" = i386; then
-  machine="i686"
-  echo "\
-*** WARNING: Support for i386 is deprecated. Building for i686 instead."
-fi
-
 submachine=
 
 # Check whether --with-cpu was given.
@@ -3945,7 +3936,7 @@
 # type and particular chip.  If an add-on configure fragment already set
 # base_machine, we don't change it.
 test -n "$base_machine" || case "$machine" in
-i[34567]86)	base_machine=i386 machine=i386/$machine ;;
+i[4567]86)	base_machine=i386 machine=i386/$machine ;;
 powerpc)	base_machine=powerpc machine=powerpc/powerpc32 ;;
 powerpc64)	base_machine=powerpc machine=powerpc/powerpc64 ;;
 s390)           base_machine=s390 machine=s390/s390-32 ;;

Modified: fsf/trunk/libc/configure.in
==============================================================================
--- fsf/trunk/libc/configure.in (original)
+++ fsf/trunk/libc/configure.in Fri Apr 19 00:01:55 2013
@@ -389,15 +389,6 @@
     with_fp=no
     ;;
 esac
-
-# Configure for i686 if the user asks for i386. We don't support
-# i386 any more but it continues to be common for users to configure
-# 32-bit x86 as i386. We build for i686 instead.
-if test "$machine" = i386; then
-  machine="i686"
-  echo "\
-*** WARNING: Support for i386 is deprecated. Building for i686 instead."
-fi
 
 submachine=
 AC_ARG_WITH([cpu],
@@ -576,7 +567,7 @@
 # type and particular chip.  If an add-on configure fragment already set
 # base_machine, we don't change it.
 test -n "$base_machine" || case "$machine" in
-i[34567]86)	base_machine=i386 machine=i386/$machine ;;
+i[4567]86)	base_machine=i386 machine=i386/$machine ;;
 powerpc)	base_machine=powerpc machine=powerpc/powerpc32 ;;
 powerpc64)	base_machine=powerpc machine=powerpc/powerpc64 ;;
 s390)           base_machine=s390 machine=s390/s390-32 ;;

Added: fsf/trunk/libc/ports/ChangeLog.microblaze
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.microblaze (added)
+++ fsf/trunk/libc/ports/ChangeLog.microblaze Fri Apr 19 00:01:55 2013
@@ -1,0 +1,101 @@
+2013-03-28  David Holsgrove  <david.holsgrove@xxxxxxxxxx>
+
+	* sysdeps/microblaze/Implies: New file.
+	* sysdeps/microblaze/Makefile: New file.
+	* sysdeps/microblaze/__longjmp.S: New file.
+	* sysdeps/microblaze/_mcount.S: New file.
+	* sysdeps/microblaze/abort-instr.h: New file.
+	* sysdeps/microblaze/asm-syntax.h: New file.
+	* sysdeps/microblaze/backtrace.c: New file.
+	* sysdeps/microblaze/backtrace_linux.c: New file.
+	* sysdeps/microblaze/bits/atomic.h: New file.
+	* sysdeps/microblaze/bits/endian.h: New file.
+	* sysdeps/microblaze/bits/fenv.h: New file.
+	* sysdeps/microblaze/bits/link.h: New file.
+	* sysdeps/microblaze/bits/setjmp.h: New file.
+	* sysdeps/microblaze/bsd-_setjmp.S: New file.
+	* sysdeps/microblaze/bsd-setjmp.S: New file.
+	* sysdeps/microblaze/crti.S: New file.
+	* sysdeps/microblaze/crtn.S: New file.
+	* sysdeps/microblaze/dl-machine.h: New file.
+	* sysdeps/microblaze/dl-tls.h: New file.
+	* sysdeps/microblaze/dl-trampoline.S: New file.
+	* sysdeps/microblaze/fegetround.c: New file.
+	* sysdeps/microblaze/fesetround.c: New file.
+	* sysdeps/microblaze/gccframe.h: New file.
+	* sysdeps/microblaze/jmpbuf-unwind.h: New file.
+	* sysdeps/microblaze/ldsodefs.h: New file.
+	* sysdeps/microblaze/libc-tls.c: New file.
+	* sysdeps/microblaze/libm-test-ulps: New file.
+	* sysdeps/microblaze/machine-gmon.h: New file.
+	* sysdeps/microblaze/math_private.h: New file.
+	* sysdeps/microblaze/memusage.h: New file.
+	* sysdeps/microblaze/nptl/Makefile: New file.
+	* sysdeps/microblaze/nptl/pthread_spin_lock.c: New file.
+	* sysdeps/microblaze/nptl/pthreaddef.h: New file.
+	* sysdeps/microblaze/nptl/tcb-offsets.sym: New file.
+	* sysdeps/microblaze/nptl/tls.h: New file.
+	* sysdeps/microblaze/preconfigure: New file.
+	* sysdeps/microblaze/setjmp.S: New file.
+	* sysdeps/microblaze/shlib-versions: New file.
+	* sysdeps/microblaze/sotruss-lib.c: New file.
+	* sysdeps/microblaze/stackinfo.h: New file.
+	* sysdeps/microblaze/start.S: New file.
+	* sysdeps/microblaze/sysdep.h: New file.
+	* sysdeps/microblaze/tls-macros.h: New file.
+	* sysdeps/microblaze/tst-audit.h: New file.
+	* sysdeps/unix/sysv/linux/microblaze/Makefile: New file.
+	* sysdeps/unix/sysv/linux/microblaze/Versions: New file.
+	* sysdeps/unix/sysv/linux/microblaze/____longjmp_chk.S: New file.
+	* sysdeps/unix/sysv/linux/microblaze/bits/fcntl.h: New file.
+	* sysdeps/unix/sysv/linux/microblaze/bits/mman.h: New file.
+	* sysdeps/unix/sysv/linux/microblaze/bits/stat.h: New file.
+	* sysdeps/unix/sysv/linux/microblaze/brk.c: New file.
+	* sysdeps/unix/sysv/linux/microblaze/clone.S: New file.
+	* sysdeps/unix/sysv/linux/microblaze/configure: New file.
+	* sysdeps/unix/sysv/linux/microblaze/configure.in: New file.
+	* sysdeps/unix/sysv/linux/microblaze/fcntl.c: New file.
+	* sysdeps/unix/sysv/linux/microblaze/fxstat.c: New file.
+	* sysdeps/unix/sysv/linux/microblaze/fxstatat.c: New file.
+	* sysdeps/unix/sysv/linux/microblaze/getsysstats.c: New file.
+	* sysdeps/unix/sysv/linux/microblaze/kernel-features.h: New file.
+	* sysdeps/unix/sysv/linux/microblaze/kernel_stat.h: New file.
+	* sysdeps/unix/sysv/linux/microblaze/lxstat.c: New file.
+	* sysdeps/unix/sysv/linux/microblaze/mmap.S: New file.
+	* sysdeps/unix/sysv/linux/microblaze/msgctl.c: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/bits/pthreadtypes.h: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/bits/semaphore.h: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/c++-types.data: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/createthread.c: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/fork.c: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/ld.abilist: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/libBrokenLocale.abilist: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/libanl.abilist: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/libc.abilist: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/libcrypt.abilist: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/libdl.abilist: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/libm.abilist: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/libnsl.abilist: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/libpthread.abilist: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/libresolv.abilist: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/librt.abilist: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/libthread_db.abilist: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/libutil.abilist: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/localplt.data: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/lowlevellock.h: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/pt-vfork.S: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/pthread_once.c: New file.
+	* sysdeps/unix/sysv/linux/microblaze/nptl/vfork.S: New file.
+	* sysdeps/unix/sysv/linux/microblaze/profil-counter.h: New file.
+	* sysdeps/unix/sysv/linux/microblaze/semctl.c: New file.
+	* sysdeps/unix/sysv/linux/microblaze/shmctl.c: New file.
+	* sysdeps/unix/sysv/linux/microblaze/setgroups.c: New file.
+	* sysdeps/unix/sysv/linux/microblaze/sigcontextinfo.h: New file.
+	* sysdeps/unix/sysv/linux/microblaze/socket.S: New file.
+	* sysdeps/unix/sysv/linux/microblaze/sys/procfs.h: New file.
+	* sysdeps/unix/sysv/linux/microblaze/sys/user.h: New file.
+	* sysdeps/unix/sysv/linux/microblaze/syscall.S: New file.
+	* sysdeps/unix/sysv/linux/microblaze/syscalls.list: New file.
+	* sysdeps/unix/sysv/linux/microblaze/sysdep.S: New file.
+	* sysdeps/unix/sysv/linux/microblaze/sysdep.h: New file.
+	* sysdeps/unix/sysv/linux/microblaze/xstat.c: New file.

Added: fsf/trunk/libc/ports/sysdeps/microblaze/Implies
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/Implies (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/Implies Fri Apr 19 00:01:55 2013
@@ -1,0 +1,4 @@
+wordsize-32
+# MicroBlaze uses IEEE 754 floating point.
+ieee754/flt-32
+ieee754/dbl-64

Added: fsf/trunk/libc/ports/sysdeps/microblaze/Makefile
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/Makefile (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/Makefile Fri Apr 19 00:01:55 2013
@@ -1,0 +1,26 @@
+ifeq ($(subdir),elf)
+CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
+endif
+
+ifeq ($(subdir),gmon)
+sysdep_routines += _mcount
+endif
+
+ifeq ($(subdir),resource)
+sysdep_routines += backtrace_linux
+endif
+
+$(objpfx)libm.so: $(elfobjdir)/ld.so
+$(objpfx)libcrypt.so: $(elfobjdir)/ld.so
+$(objpfx)libresolv.so: $(elfobjdir)/ld.so
+$(objpfx)libnss_dns.so: $(elfobjdir)/ld.so
+$(objpfx)libnss_files.so: $(elfobjdir)/ld.so
+$(objpfx)libnss_db.so: $(elfobjdir)/ld.so
+$(objpfx)libnss_nis.so: $(elfobjdir)/ld.so
+$(objpfx)libnss_nisplus.so: $(elfobjdir)/ld.so
+$(objpfx)libnss_hesiod.so: $(elfobjdir)/ld.so
+$(objpfx)libnss_compat.so: $(elfobjdir)/ld.so
+$(objpfx)libanl.so: $(elfobjdir)/ld.so
+$(objpfx)libnsl.so: $(elfobjdir)/ld.so
+$(objpfx)libcidn.so: $(elfobjdir)/ld.so
+$(objpfx)libutil.so: $(elfobjdir)/ld.so

Added: fsf/trunk/libc/ports/sysdeps/microblaze/__longjmp.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/__longjmp.S (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/__longjmp.S Fri Apr 19 00:01:55 2013
@@ -1,0 +1,55 @@
+/* Copyright (C) 1997-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 <sysdep.h>
+
+/* Jump to the position specified by ENV, causing the
+   setjmp call there to return VAL, or 1 if VAL is 0.  */
+
+/* void __longjmp (__jmp_buf env, int val) */
+
+ENTRY(__longjmp)
+    lwi   r1,r5,0
+    lwi   r2,r5,4
+    lwi   r13,r5,8
+    lwi   r14,r5,12
+    lwi   r15,r5,16
+    lwi   r16,r5,20
+    lwi   r17,r5,24
+    lwi   r18,r5,28
+    lwi   r19,r5,32
+    lwi   r20,r5,36
+    lwi   r21,r5,40
+    lwi   r22,r5,44
+    lwi   r23,r5,48
+    lwi   r24,r5,52
+    lwi   r25,r5,56
+    lwi   r26,r5,60
+    lwi   r27,r5,64
+    lwi   r28,r5,68
+    lwi   r29,r5,72
+    lwi   r30,r5,76
+    lwi   r31,r5,80
+    addk  r3,r6,r0
+    beqi  r3,L(return_1)
+    rtsd  r15,8
+    nop
+L(return_1):
+    rtsd  r15,8
+    addik r3,r0,1	/* delay slot.  */
+END(__longjmp)

Added: fsf/trunk/libc/ports/sysdeps/microblaze/_mcount.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/_mcount.S (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/_mcount.S Fri Apr 19 00:01:55 2013
@@ -1,0 +1,91 @@
+/* Copyright (C) 1997-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/>.  */
+
+	.global	_mcount
+	.type	_mcount, @function
+_mcount:
+	# Save regs.
+	addik   r1, r1,-4 * 24
+	swi	r31, r1, 4 * 23
+	swi	r30, r1, 4 * 22
+	swi	r29, r1, 4 * 21
+	swi	r28, r1, 4 * 20
+	swi	r27, r1, 4 * 19
+	swi	r26, r1, 4 * 18
+	swi	r25, r1, 4 * 17
+	swi	r24, r1, 4 * 16
+	swi	r23, r1, 4 * 15
+	swi	r22, r1, 4 * 14
+	swi	r21, r1, 4 * 13
+	swi	r20, r1, 4 * 12
+	swi	r19, r1, 4 * 11
+	swi	r15, r1, 4 * 10
+	swi	r12, r1, 4 * 9
+	swi	r11, r1, 4 * 8
+	swi	r10, r1, 4 * 7
+	swi	r8, r1, 4 * 6
+	swi	r7, r1, 4 * 5
+	swi	r6, r1, 4 * 4
+	swi	r5, r1, 4 * 3
+	swi	r4, r1, 4 * 2
+	swi	r3, r1, 4 * 1
+	swi	r2, r1, 4 * 0
+
+#ifdef SHARED
+	mfs     r20,rpc
+	addik   r20,r20,_GLOBAL_OFFSET_TABLE_+8
+	addk	r6, r0, r15	# callee is in r15.
+	brlid	r15, __mcount_internal@PLT
+	lwi	r5, r1, 4 * 24	# caller is on the stack.
+#else
+	# Pass from/to in r5 and r6.
+	addk	r6, r0, r15	# callee is in r15.
+	bralid	r15, __mcount_internal
+	lwi	r5, r1, 4 * 24	# caller is on the stack.
+#endif
+
+	# Reload regs
+	lwi	r31, r1, 4 * 23
+	lwi	r30, r1, 4 * 22
+	lwi	r29, r1, 4 * 21
+	lwi	r28, r1, 4 * 20
+	lwi	r27, r1, 4 * 19
+	lwi	r26, r1, 4 * 18
+	lwi	r25, r1, 4 * 17
+	lwi	r24, r1, 4 * 16
+	lwi	r23, r1, 4 * 15
+	lwi	r22, r1, 4 * 14
+	lwi	r21, r1, 4 * 13
+	lwi	r20, r1, 4 * 12
+	lwi	r19, r1, 4 * 11
+	lwi	r15, r1, 4 * 10
+	lwi	r12, r1, 4 * 9
+	lwi	r11, r1, 4 * 8
+	lwi	r10, r1, 4 * 7
+	lwi	r8, r1, 4 * 6
+	lwi	r7, r1, 4 * 5
+	lwi	r6, r1, 4 * 4
+	lwi	r5, r1, 4 * 3
+	lwi	r4, r1, 4 * 2
+	lwi	r3, r1, 4 * 1
+	lwi	r2, r1, 4 * 0
+
+	rtsd	r15, 8
+	addik	r1, r1, 4 * 24
+
+	.size	_mcount, . - _mcount

Added: fsf/trunk/libc/ports/sysdeps/microblaze/abort-instr.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/abort-instr.h (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/abort-instr.h Fri Apr 19 00:01:55 2013
@@ -1,0 +1,2 @@
+/* An instruction which should crash any program is `illegal'.  */
+#define ABORT_INSTRUCTION asm ("brki r0, -1")

Added: fsf/trunk/libc/ports/sysdeps/microblaze/asm-syntax.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/asm-syntax.h (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/asm-syntax.h Fri Apr 19 00:01:55 2013
@@ -1,0 +1,24 @@
+/* Copyright (C) 1997-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/>.  */
+
+#undef ALIGN
+#define ALIGN(log) .align 1<<log
+
+#define R_(r) %##r
+#define R(r) R_(r)
+#define L(label) .##label

Added: fsf/trunk/libc/ports/sysdeps/microblaze/backtrace.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/backtrace.c (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/backtrace.c Fri Apr 19 00:01:55 2013
@@ -1,0 +1,139 @@
+/* Copyright (C) 2005-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 <stdio.h>
+#include <string.h>
+#include <sysdep.h>
+#include <signal.h>
+#include <execinfo.h>
+
+extern int
+_identify_sighandler (unsigned long fp, unsigned long pc,
+                      unsigned long *pprev_fp, unsigned long *pprev_pc,
+                      unsigned long *retaddr);
+
+inline long
+get_frame_size (unsigned long instr)
+{
+  return abs ((short signed) (instr & 0xFFFF));
+}
+
+static unsigned long *
+find_frame_creation (unsigned long *pc)
+{
+  int i;
+
+  /* NOTE: Distance to search is arbitrary.
+     250 works well for most things,
+     750 picks up things like tcp_recvmsg,
+     1000 needed for fat_fill_super.  */
+  for (i = 0; i < 1000; i++, pc--)
+    {
+      unsigned long instr;
+      unsigned long frame_size;
+
+      instr = *pc;
+
+      /* Is the instruction of the form
+         addik r1, r1, foo ? */
+      if ((instr & 0xFFFF0000) != 0x30210000)
+        continue;
+
+      frame_size = get_frame_size (instr);
+
+      if ((frame_size < 8) || (frame_size & 3))
+        return NULL;
+
+      return pc;
+    }
+  return NULL;
+}
+
+static int
+lookup_prev_stack_frame (unsigned long fp, unsigned long pc,
+                         unsigned long *pprev_fp, unsigned long *pprev_pc,
+                         unsigned long *retaddr)
+{
+  unsigned long *prologue = NULL;
+
+  int is_signalhandler = _identify_sighandler (fp, pc, pprev_fp,
+                                               pprev_pc, retaddr);
+
+  if (!is_signalhandler)
+    {
+      prologue = find_frame_creation ((unsigned long *) pc);
+
+      if (prologue)
+        {
+          long frame_size = get_frame_size (*prologue);
+          *pprev_fp = fp + frame_size;
+          if (*retaddr != 0)
+            *pprev_pc = *retaddr;
+          else
+            *pprev_pc = *(unsigned long *) fp;
+
+          *retaddr = 0;
+          if (!*pprev_pc || (*pprev_pc & 3))
+            prologue=0;
+        }
+      else
+        {
+          *pprev_pc = 0;
+          *pprev_fp = fp;
+          *retaddr = 0;
+        }
+    }
+    return (!*pprev_pc || (*pprev_pc & 3)) ? -1 : 0;
+}
+
+int
+__backtrace (void **array, int size)
+{
+  unsigned long pc, fp;
+  unsigned long ppc, pfp;
+  /* Return address(r15) is required in the signal handler case, since the
+     return address of the function which causes the signal may not be
+     recorded in the stack.  */
+  unsigned long retaddr;
+
+  int count;
+  int rc = 0;
+
+  __asm__ __volatile__ ("mfs %0, rpc"
+                        : "=r"(pc));
+
+  __asm__ __volatile__ ("add %0, r1, r0"
+                        : "=r"(fp));
+
+  array[0] = (void *) pc;
+  retaddr = 0;
+  for (count = 1; count < size; count++)
+    {
+      rc = lookup_prev_stack_frame (fp, pc, &pfp, &ppc, &retaddr);
+
+      fp = pfp;
+      pc = ppc;
+      array[count] = (void *) pc;
+      if (rc)
+        return count;
+    }
+  return count;
+}
+
+weak_alias (__backtrace, backtrace)
+libc_hidden_def (__backtrace)

Added: fsf/trunk/libc/ports/sysdeps/microblaze/backtrace_linux.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/backtrace_linux.c (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/backtrace_linux.c Fri Apr 19 00:01:55 2013
@@ -1,0 +1,59 @@
+/* Copyright (C) 2005-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 <stddef.h>
+#include <asm/sigcontext.h>
+#include <linux/signal.h>
+#include <asm-generic/ucontext.h>
+#include <asm/unistd.h>
+
+int
+_identify_sighandler (unsigned long fp, unsigned long pc,
+                      unsigned long *pprev_fp, unsigned long *pprev_pc,
+                      unsigned long *retaddr)
+{
+  unsigned long *tramp = 0;
+  struct ucontext *uc;
+
+  if (*retaddr == 0)
+    {
+      /* Kernel inserts the tramp between the signal handler frame and the
+         caller frame in signal handling.  */
+      tramp = (unsigned long *) pc;
+      tramp += 2;
+      if ((*tramp == (0x31800000 | __NR_rt_sigreturn))
+          && (*(tramp+1) == 0xb9cc0008))
+        {
+          /* Signal handler function argument are:
+             int sig_num, siginfo_t * info, void * ucontext
+             therefore ucontext is the 3rd argument.  */
+          unsigned long ucptr = ((unsigned long) tramp
+                                 - sizeof (struct ucontext));
+          uc = (struct ucontext *) ucptr;
+          *pprev_pc = uc->uc_mcontext.regs.pc;
+          /* Need to record the return address since the return address of the
+             function which causes this signal may not be recorded in the
+             stack.  */
+          *pprev_fp = uc->uc_mcontext.regs.r1;
+          *retaddr = uc->uc_mcontext.regs.r15;
+          /* It is a signal handler.  */
+          return 1;
+        }
+    }
+  return 0;
+}

Added: fsf/trunk/libc/ports/sysdeps/microblaze/bits/atomic.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/bits/atomic.h (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/bits/atomic.h Fri Apr 19 00:01:55 2013
@@ -1,0 +1,269 @@
+/* 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
+   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 <stdint.h>
+#include <sysdep.h>
+
+
+typedef int8_t atomic8_t;
+typedef uint8_t uatomic8_t;
+typedef int_fast8_t atomic_fast8_t;
+typedef uint_fast8_t uatomic_fast8_t;
+
+typedef int32_t atomic32_t;
+typedef uint32_t uatomic32_t;
+typedef int_fast32_t atomic_fast32_t;
+typedef uint_fast32_t uatomic_fast32_t;
+
+typedef intptr_t atomicptr_t;
+typedef uintptr_t uatomicptr_t;
+typedef intmax_t atomic_max_t;
+typedef uintmax_t uatomic_max_t;
+
+
+/* Microblaze does not have byte and halfword forms of load and reserve and
+   store conditional. So for microblaze we stub out the 8- and 16-bit forms.  */
+#define __arch_compare_and_exchange_bool_8_acq(mem, newval, oldval)            \
+  (abort (), 0)
+
+#define __arch_compare_and_exchange_bool_16_acq(mem, newval, oldval)           \
+  (abort (), 0)
+
+#define __arch_compare_and_exchange_bool_8_rel(mem, newval, oldval)            \
+  (abort (), 0)
+
+#define __arch_compare_and_exchange_bool_16_rel(mem, newval, oldval)           \
+  (abort (), 0)
+
+#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval)            \
+  ({                                                                           \
+      __typeof (*(mem)) __tmp;                                                 \
+      __typeof (mem)  __memp = (mem);                                          \
+      int test;                                                                \
+      __asm __volatile (                                                       \
+                "   addc    r0, r0, r0;"                                       \
+                "1: lwx     %0, %3, r0;"                                       \
+                "   addic   %1, r0, 0;"                                        \
+                "   bnei    %1, 1b;"                                           \
+                "   cmp     %1, %0, %4;"                                       \
+                "   bnei    %1, 2f;"                                           \
+                "   swx     %5, %3, r0;"                                       \
+                "   addic   %1, r0, 0;"                                        \
+                "   bnei    %1, 1b;"                                           \
+                "2:"                                                           \
+                    : "=&r" (__tmp),                                           \
+                    "=&r" (test),                                              \
+                    "=m" (*__memp)                                             \
+                    : "r" (__memp),                                            \
+                    "r" (oldval),                                              \
+                    "r" (newval)                                               \
+                    : "cc", "memory");                                         \
+      __tmp;                                                                   \
+  })
+
+#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval)            \
+  (abort (), (__typeof (*mem)) 0)
+
+#define atomic_compare_and_exchange_val_acq(mem, newval, oldval)               \
+  ({                                                                           \
+    __typeof (*(mem)) __result;                                                \
+    if (sizeof (*mem) == 4)                                                    \
+      __result = __arch_compare_and_exchange_val_32_acq (mem, newval, oldval); \
+    else if (sizeof (*mem) == 8)                                               \
+      __result = __arch_compare_and_exchange_val_64_acq (mem, newval, oldval); \
+    else                                                                       \
+       abort ();                                                               \
+    __result;                                                                  \
+  })
+
+#define atomic_compare_and_exchange_val_rel(mem, newval, oldval)               \
+  ({                                                                           \
+    __typeof (*(mem)) __result;                                                \
+    if (sizeof (*mem) == 4)                                                    \
+      __result = __arch_compare_and_exchange_val_32_acq (mem, newval, oldval); \
+    else if (sizeof (*mem) == 8)                                               \
+      __result = __arch_compare_and_exchange_val_64_acq (mem, newval, oldval); \
+    else                                                                       \
+       abort ();                                                               \
+    __result;                                                                  \
+  })
+
+#define __arch_atomic_exchange_32_acq(mem, value)                              \
+  ({                                                                           \
+      __typeof (*(mem)) __tmp;                                                 \
+      __typeof (mem)  __memp = (mem);                                          \
+      int test;                                                                \
+      __asm __volatile (                                                       \
+                "   addc    r0, r0, r0;"                                       \
+                "1: lwx     %0, %4, r0;"                                       \
+                "   addic   %1, r0, 0;"                                        \
+                "   bnei    %1, 1b;"                                           \
+                "   swx     %3, %4, r0;"                                       \
+                "   addic   %1, r0, 0;"                                        \
+                "   bnei    %1, 1b;"                                           \
+                    : "=&r" (__tmp),                                           \
+                    "=&r" (test),                                              \
+                    "=m" (*__memp)                                             \
+                    : "r" (value),                                             \
+                    "r" (__memp)                                               \
+                    : "cc", "memory");                                         \
+      __tmp;                                                                   \
+  })
+
+#define __arch_atomic_exchange_64_acq(mem, newval)                             \
+  (abort (), (__typeof (*mem)) 0)
+
+#define atomic_exchange_acq(mem, value)                                        \
+  ({                                                                           \
+    __typeof (*(mem)) __result;                                                \
+    if (sizeof (*mem) == 4)                                                    \
+      __result = __arch_atomic_exchange_32_acq (mem, value);                   \
+    else if (sizeof (*mem) == 8)                                               \
+      __result = __arch_atomic_exchange_64_acq (mem, value);                   \
+    else                                                                       \
+       abort ();                                                               \
+    __result;                                                                  \
+  })
+
+#define atomic_exchange_rel(mem, value)                                        \
+  ({                                                                           \
+    __typeof (*(mem)) __result;                                                \
+    if (sizeof (*mem) == 4)                                                    \
+      __result = __arch_atomic_exchange_32_acq (mem, value);                   \
+    else if (sizeof (*mem) == 8)                                               \
+      __result = __arch_atomic_exchange_64_acq (mem, value);                   \
+    else                                                                       \
+       abort ();                                                               \
+    __result;                                                                  \
+  })
+
+#define __arch_atomic_exchange_and_add_32(mem, value)                          \
+  ({                                                                           \
+    __typeof (*(mem)) __tmp;                                                   \
+      __typeof (mem)  __memp = (mem);                                          \
+    int test;                                                                  \
+    __asm __volatile (                                                         \
+                "   addc    r0, r0, r0;"                                       \
+                "1: lwx     %0, %4, r0;"                                       \
+                "   addic   %1, r0, 0;"                                        \
+                "   bnei    %1, 1b;"                                           \
+                "   add     %1, %3, %0;"                                       \
+                "   swx     %1, %4, r0;"                                       \
+                "   addic   %1, r0, 0;"                                        \
+                "   bnei    %1, 1b;"                                           \
+                    : "=&r" (__tmp),                                           \
+                    "=&r" (test),                                              \
+                    "=m" (*__memp)                                             \
+                    : "r" (value),                                             \
+                    "r" (__memp)                                               \
+                    : "cc", "memory");                                         \
+    __tmp;                                                                     \
+  })
+
+#define __arch_atomic_exchange_and_add_64(mem, value)                          \
+  (abort (), (__typeof (*mem)) 0)
+
+#define atomic_exchange_and_add(mem, value)                                    \
+  ({                                                                           \
+    __typeof (*(mem)) __result;                                                \
+    if (sizeof (*mem) == 4)                                                    \
+      __result = __arch_atomic_exchange_and_add_32 (mem, value);               \
+    else if (sizeof (*mem) == 8)                                               \
+      __result = __arch_atomic_exchange_and_add_64 (mem, value);               \
+    else                                                                       \
+       abort ();                                                               \
+    __result;                                                                  \
+  })
+
+#define __arch_atomic_increment_val_32(mem)                                    \
+  ({                                                                           \
+    __typeof (*(mem)) __val;                                                   \
+    int test;                                                                  \
+    __asm __volatile (                                                         \
+                "   addc    r0, r0, r0;"                                       \
+                "1: lwx     %0, %3, r0;"                                       \
+                "   addic   %1, r0, 0;"                                        \
+                "   bnei    %1, 1b;"                                           \
+                "   addi    %0, %0, 1;"                                        \
+                "   swx     %0, %3, r0;"                                       \
+                "   addic   %1, r0, 0;"                                        \
+                "   bnei    %1, 1b;"                                           \
+                    : "=&r" (__val),                                           \
+                    "=&r" (test),                                              \
+                    "=m" (*mem)                                                \
+                    : "r" (mem),                                               \
+                    "m" (*mem)                                                 \
+                    : "cc", "memory");                                         \
+    __val;                                                                     \
+  })
+
+#define __arch_atomic_increment_val_64(mem)                                    \
+  (abort (), (__typeof (*mem)) 0)
+
+#define atomic_increment_val(mem)                                              \
+  ({                                                                           \
+    __typeof (*(mem)) __result;                                                \
+    if (sizeof (*(mem)) == 4)                                                  \
+      __result = __arch_atomic_increment_val_32 (mem);                         \
+    else if (sizeof (*(mem)) == 8)                                             \
+      __result = __arch_atomic_increment_val_64 (mem);                         \
+    else                                                                       \
+       abort ();                                                               \
+    __result;                                                                  \
+  })
+
+#define atomic_increment(mem) ({ atomic_increment_val (mem); (void) 0; })
+
+#define __arch_atomic_decrement_val_32(mem)                                    \
+  ({                                                                           \
+    __typeof (*(mem)) __val;                                                   \
+    int test;                                                                  \
+    __asm __volatile (                                                         \
+                "   addc    r0, r0, r0;"                                       \
+                "1: lwx     %0, %3, r0;"                                       \
+                "   addic   %1, r0, 0;"                                        \
+                "   bnei    %1, 1b;"                                           \
+                "   rsubi   %0, %0, 1;"                                        \
+                "   swx     %0, %3, r0;"                                       \
+                "   addic   %1, r0, 0;"                                        \
+                "   bnei    %1, 1b;"                                           \
+                    : "=&r" (__val),                                           \
+                    "=&r" (test),                                              \
+                    "=m" (*mem)                                                \
+                    : "r" (mem),                                               \
+                    "m" (*mem)                                                 \
+                    : "cc", "memory");                                         \
+    __val;                                                                     \
+  })
+
+#define __arch_atomic_decrement_val_64(mem)                                    \
+  (abort (), (__typeof (*mem)) 0)
+
+#define atomic_decrement_val(mem)                                              \
+  ({                                                                           \
+    __typeof (*(mem)) __result;                                                \
+    if (sizeof (*(mem)) == 4)                                                  \
+      __result = __arch_atomic_decrement_val_32 (mem);                         \
+    else if (sizeof (*(mem)) == 8)                                             \
+      __result = __arch_atomic_decrement_val_64 (mem);                         \
+    else                                                                       \
+       abort ();                                                               \
+    __result;                                                                  \
+  })
+
+#define atomic_decrement(mem) ({ atomic_decrement_val (mem); (void) 0; })

Propchange: fsf/trunk/libc/ports/sysdeps/microblaze/bits/atomic.h
------------------------------------------------------------------------------
    svn:executable = *

Added: fsf/trunk/libc/ports/sysdeps/microblaze/bits/endian.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/bits/endian.h (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/bits/endian.h Fri Apr 19 00:01:55 2013
@@ -1,0 +1,30 @@
+/* Copyright (C) 1997-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 _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
+/* MicroBlaze can be either big or little endian.  */
+#ifdef _BIG_ENDIAN
+# define __BYTE_ORDER __BIG_ENDIAN
+# define __FLOAT_WORD_ORDER __BIG_ENDIAN
+#else
+# define __BYTE_ORDER __LITTLE_ENDIAN
+# define __FLOAT_WORD_ORDER __LITTLE_ENDIAN
+#endif

Added: fsf/trunk/libc/ports/sysdeps/microblaze/bits/fenv.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/bits/fenv.h (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/bits/fenv.h Fri Apr 19 00:01:55 2013
@@ -1,0 +1,42 @@
+/* Copyright (C) 2011-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 _FENV_H
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+#endif
+
+/* MicroBlaze supports only round-to-nearest.  The software
+   floating-point support also acts this way.  */
+enum
+  {
+    __FE_UNDEFINED = 0,
+
+    FE_TONEAREST =
+#define FE_TONEAREST	0x1
+    FE_TONEAREST,
+  };
+
+#define FE_ALL_EXCEPT 0
+
+/* Type representing exception flags (if there were any).  */
+typedef unsigned int fexcept_t;
+
+/* Type representing floating-point environment.  */
+typedef unsigned int fenv_t;
+
+/* If the default argument is used we use this value.  */
+#define FE_DFL_ENV	((const fenv_t *) -1l)

Added: fsf/trunk/libc/ports/sysdeps/microblaze/bits/link.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/bits/link.h (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/bits/link.h Fri Apr 19 00:01:55 2013
@@ -1,0 +1,57 @@
+/* Copyright (C) 2005-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 _LINK_H
+# error "Never include <bits/link.h> directly; use <link.h> instead."
+#endif
+
+/* Registers for entry into PLT on Microblaze.  */
+typedef struct La_microblaze_regs
+{
+  uint32_t lr_r0;
+  uint32_t lr_r1;
+  uint32_t lr_sp;
+} La_microblaze_regs;
+
+/* Return values for calls from PLT on Microblaze.  */
+typedef struct La_microblaze_retval
+{
+  uint32_t lrv_r3;
+} La_microblaze_retval;
+
+
+__BEGIN_DECLS
+
+extern Elf32_Addr la_microblaze_gnu_pltenter (Elf32_Sym *__sym,
+                                              unsigned int __ndx,
+                                              uintptr_t *__refcook,
+                                              uintptr_t *__defcook,
+                                              La_microblaze_regs *__regs,
+                                              unsigned int *__flags,
+                                              const char *__symname,
+                                              long int *__framesizep);
+
+extern unsigned int la_microblaze_gnu_pltexit (Elf32_Sym *__sym,
+                                               unsigned int __ndx,
+                                               uintptr_t *__refcook,
+                                               uintptr_t *__defcook,
+                                               const La_microblaze_regs *__inregs,
+                                               La_microblaze_retval *__outregs,
+                                               const char *__symname);
+
+__END_DECLS

Added: fsf/trunk/libc/ports/sysdeps/microblaze/bits/setjmp.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/bits/setjmp.h (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/bits/setjmp.h Fri Apr 19 00:01:55 2013
@@ -1,0 +1,37 @@
+/* Copyright (C) 1997-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/>.  */
+
+/* Define the machine-dependent type `jmp_buf'.  */
+
+#ifndef _BITS_SETJMP_H
+# define _BITS_SETJMP_H 1
+
+#if !defined _SETJMP_H && !defined _PTHREAD_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
+typedef struct
+  {
+    /* There are 21 4-byte registers that should be saved:
+       r1, r2, r13-r31. Actually, there seems no need to save
+       r14, r16, r17, r18 (return addresses for interrupt/exception/trap).  */
+    int *__sp; /* dedicated name for r1.  */
+    long int __gregs[20];
+  } __jmp_buf[1];
+
+#endif

Added: fsf/trunk/libc/ports/sysdeps/microblaze/bsd-_setjmp.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/bsd-_setjmp.S (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/bsd-_setjmp.S Fri Apr 19 00:01:55 2013
@@ -1,0 +1,22 @@
+/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'.
+   Copyright (C) 1997-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/>.  */
+
+#define setjmp_name _setjmp
+#define SAVEMASK 0
+
+#include <setjmp.S>

Added: fsf/trunk/libc/ports/sysdeps/microblaze/bsd-setjmp.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/bsd-setjmp.S (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/bsd-setjmp.S Fri Apr 19 00:01:55 2013
@@ -1,0 +1,22 @@
+/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'.
+   Copyright (C) 1995-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/>.  */
+
+#define setjmp_name setjmp
+#define SAVEMASK 1
+
+#include <setjmp.S>

Added: fsf/trunk/libc/ports/sysdeps/microblaze/crti.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/crti.S (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/crti.S Fri Apr 19 00:01:55 2013
@@ -1,0 +1,88 @@
+/* Special .init and .fini section support for MicroBlaze.
+   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
+   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.
+
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file with other
+   programs, and to distribute those programs without any restriction
+   coming from the use of this file. (The GNU Lesser General Public
+   License restrictions do apply in other respects; for example, they
+   cover modification of the file, and distribution when not linked
+   into another program.)
+
+   Note that people who make modified versions of this file are not
+   obligated to grant this special exception for their modified
+   versions; it is their choice whether to do so. The GNU Lesser
+   General Public License gives permission to release a modified
+   version without this exception; this exception also makes it
+   possible to release a modified version which carries forward this
+   exception.
+
+   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/>.  */
+
+/* crti.S puts a function prologue at the beginning of the .init and
+   .fini sections and defines global symbols for those addresses, so
+   they can be called as functions.  The symbols _init and _fini are
+   magic and cause the linker to emit DT_INIT and DT_FINI.  */
+
+#include <libc-symbols.h>
+#include <sysdep.h>
+
+#ifndef PREINIT_FUNCTION
+# define PREINIT_FUNCTION __gmon_start__
+#endif
+
+#ifndef PREINIT_FUNCTION_WEAK
+# define PREINIT_FUNCTION_WEAK 1
+#endif
+
+#if PREINIT_FUNCTION_WEAK
+	weak_extern (PREINIT_FUNCTION)
+#else
+	.hidden PREINIT_FUNCTION
+#endif
+
+	.section .init,"ax",@progbits
+	.align	2
+	.globl	_init
+	.type	_init, @function
+_init:
+	addik	r1,r1,-32
+	swi	r20,r1,28
+	mfs	r20,rpc
+	addik	r20,r20,_GLOBAL_OFFSET_TABLE_+8
+	lwi	r3,r20,PREINIT_FUNCTION@GOT
+#if PREINIT_FUNCTION_WEAK
+	beqid   r3,$Lno_weak_fn:
+	swi     r15,r1,0
+	brlid	r15,PREINIT_FUNCTION@PLT
+$Lno_weak_fn:
+#else
+	swi     r15,r1,0
+	brald	r15,r3
+#endif
+	nop		# Unfilled delay slot
+
+	.section .fini,"ax",@progbits
+	.align	2
+	.globl	_fini
+	.type	_fini, @function
+_fini:
+	addik	r1,r1,-32
+	swi	r20,r1,28
+	swi	r15,r1,0
+	mfs	r20,rpc
+	addik	r20,r20,_GLOBAL_OFFSET_TABLE_+8

Added: fsf/trunk/libc/ports/sysdeps/microblaze/crtn.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/crtn.S (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/crtn.S Fri Apr 19 00:01:55 2013
@@ -1,0 +1,51 @@
+/* Special .init and .fini section support for MicroBlaze.
+   Copyright (C) 1995-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.
+
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file with other
+   programs, and to distribute those programs without any restriction
+   coming from the use of this file. (The GNU Lesser General Public
+   License restrictions do apply in other respects; for example, they
+   cover modification of the file, and distribution when not linked
+   into another program.)
+
+   Note that people who make modified versions of this file are not
+   obligated to grant this special exception for their modified
+   versions; it is their choice whether to do so. The GNU Lesser
+   General Public License gives permission to release a modified
+   version without this exception; this exception also makes it
+   possible to release a modified version which carries forward this
+   exception.
+
+   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/>.  */
+
+/* crtn.S puts function epilogues in the .init and .fini sections
+   corresponding to the prologues in crti.S. */
+
+#include <sysdep.h>
+
+	.section .init,"ax",@progbits
+	lwi	r15,r1,0
+	lwi	r20,r1,28
+	rtsd	r15,8
+	addik	r1,r1,32
+
+	.section .fini,"ax",@progbits
+	lwi	r15,r1,0
+	lwi	r20,r1,28
+	rtsd	r15,8
+	addik	r1,r1,32

Added: fsf/trunk/libc/ports/sysdeps/microblaze/dl-machine.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/dl-machine.h (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/dl-machine.h Fri Apr 19 00:01:55 2013
@@ -1,0 +1,299 @@
+/* Copyright (C) 1995-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 dl_machine_h
+#define dl_machine_h
+
+#define ELF_MACHINE_NAME "microblaze"
+
+#include <sys/param.h>
+#include <tls.h>
+
+/* Return nonzero iff ELF header is compatible with the running host.  */
+static inline int
+elf_machine_matches_host (const Elf32_Ehdr *ehdr)
+{
+  return (ehdr->e_machine == EM_MICROBLAZE);
+}
+
+/* Return the link-time address of _DYNAMIC.  Conveniently, this is the
+   first element of the GOT.  This must be inlined in a function which
+   uses global data.  */
+static inline Elf32_Addr
+elf_machine_dynamic (void)
+{
+  /* This produces a GOTOFF reloc that resolves to zero at link time, so in
+     fact just loads from the GOT register directly.  By doing it without
+     an asm we can let the compiler choose any register.  */
+
+  Elf32_Addr got_entry_0;
+  __asm__ __volatile__(
+    "lwi %0,r20,0"
+    :"=r"(got_entry_0)
+    );
+  return got_entry_0;
+}
+
+/* Return the run-time load address of the shared object.  */
+static inline Elf32_Addr
+elf_machine_load_address (void)
+{
+  /* Compute the difference between the runtime address of _DYNAMIC as seen
+     by a GOTOFF reference, and the link-time address found in the special
+     unrelocated first GOT entry.  */
+
+  Elf32_Addr dyn;
+  __asm__ __volatile__ (
+    "addik %0,r20,_DYNAMIC@GOTOFF"
+    : "=r"(dyn)
+    );
+  return dyn - elf_machine_dynamic ();
+}
+
+/* Set up the loaded object described by L so its unrelocated PLT
+   entries will jump to the on-demand fixup code in dl-runtime.c.  */
+
+static inline int __attribute__ ((always_inline))
+elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
+{
+  extern void _dl_runtime_resolve (Elf32_Word);
+  extern void _dl_runtime_profile (Elf32_Word);
+
+  return lazy;
+}
+
+/* The PLT uses Elf32_Rela relocs.  */
+#define elf_machine_relplt elf_machine_rela
+
+/* Mask identifying addresses reserved for the user program,
+   where the dynamic linker should not map anything.  */
+#define ELF_MACHINE_USER_ADDRESS_MASK	0x80000000UL
+
+/* Initial entry point code for the dynamic linker.
+   The C function `_dl_start' is the real entry point;
+   its return value is the user program's entry point.  */
+
+#define RTLD_START asm ("\
+	.text\n\
+	.globl _start\n\
+	.type _start,@function\n\
+_start:\n\
+	addk  r5,r0,r1\n\
+	addk  r3,r0,r0\n\
+1:\n\
+	addik r5,r5,4\n\
+	lw    r4,r5,r0\n\
+	bneid r4,1b\n\
+	addik r3,r3,1\n\
+	addik r3,r3,-1\n\
+	addk  r5,r0,r1\n\
+	sw    r3,r5,r0\n\
+	addik r1,r1,-24\n\
+	sw    r15,r1,r0\n\
+	brlid r15,_dl_start\n\
+	nop\n\
+	/* FALLTHRU.  */\n\
+\n\
+	.globl _dl_start_user\n\
+	.type _dl_start_user,@function\n\
+_dl_start_user:\n\
+	mfs   r20,rpc\n\
+	addik r20,r20,_GLOBAL_OFFSET_TABLE_+8\n\
+	lwi   r4,r20,_dl_skip_args@GOTOFF\n\
+	lwi   r5,r1,24\n\
+	rsubk r5,r4,r5\n\
+	addk  r4,r4,r4\n\
+	addk  r4,r4,r4\n\
+	addk  r1,r1,r4\n\
+	swi   r5,r1,24\n\
+	swi   r3,r1,20\n\
+	addk  r6,r5,r0\n\
+	addk  r5,r5,r5\n\
+	addk  r5,r5,r5\n\
+	addik r7,r1,28\n\
+	addk  r8,r7,r5\n\
+	addik r8,r8,4\n\
+	lwi   r5,r20,_rtld_local@GOTOFF\n\
+	brlid r15,_dl_init_internal\n\
+	nop\n\
+	lwi   r5,r1,24\n\
+	lwi   r3,r1,20\n\
+	addk  r4,r5,r5\n\
+	addk  r4,r4,r4\n\
+	addik r6,r1,28\n\
+	addk  r7,r6,r4\n\
+	addik r7,r7,4\n\
+	addik r15,r20,_dl_fini@GOTOFF\n\
+	addik r15,r15,-8\n\
+	brad  r3\n\
+	addik r1,r1,24\n\
+	nop\n\
+	.size _dl_start_user, . - _dl_start_user\n\
+	.previous");
+
+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
+   TLS variable, so undefined references should not be allowed to
+   define the value.
+   ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+   of the main executable's symbols, as for a COPY reloc.  */
+#ifndef RTLD_BOOTSTRAP
+# define elf_machine_type_class(type) \
+  (((type) == R_MICROBLAZE_JUMP_SLOT || \
+    (type) == R_MICROBLAZE_TLSDTPREL32 || \
+    (type) == R_MICROBLAZE_TLSDTPMOD32 || \
+    (type) == R_MICROBLAZE_TLSTPREL32) \
+    * ELF_RTYPE_CLASS_PLT \
+   | ((type) == R_MICROBLAZE_COPY) * ELF_RTYPE_CLASS_COPY)
+#else
+# define elf_machine_type_class(type) \
+  (((type) == R_MICROBLAZE_JUMP_SLOT) * ELF_RTYPE_CLASS_PLT \
+   | ((type) == R_MICROBLAZE_COPY) * ELF_RTYPE_CLASS_COPY)
+#endif
+
+/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries.  */
+#define ELF_MACHINE_JMP_SLOT	R_MICROBLAZE_JUMP_SLOT
+
+/* The microblaze never uses Elf32_Rel relocations.  */
+#define ELF_MACHINE_NO_REL 1
+
+static inline Elf32_Addr
+elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+		       const Elf32_Rela *reloc,
+		       Elf32_Addr *reloc_addr, Elf32_Addr value)
+{
+  return *reloc_addr = value;
+}
+
+/* Return the final value of a plt relocation. Ignore the addend.  */
+static inline Elf32_Addr
+elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
+		       Elf32_Addr value)
+{
+  return value;
+}
+
+#endif /* !dl_machine_h.  */
+
+/* Names of the architecture-specific auditing callback functions.  */
+#define ARCH_LA_PLTENTER microblaze_gnu_pltenter
+#define ARCH_LA_PLTEXIT microblaze_gnu_pltexit
+
+#ifdef RESOLVE_MAP
+
+/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
+   MAP is the object containing the reloc.  */
+
+/* Macro to put 32-bit relocation value into 2 words.  */
+#define PUT_REL_64(rel_addr,val) \
+  do { \
+    ((unsigned short *)(rel_addr))[1] = (val) >> 16; \
+    ((unsigned short *)(rel_addr))[3] = (val) & 0xffff; \
+  } while (0)
+
+auto inline void __attribute__ ((always_inline))
+elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
+		  const Elf32_Sym *sym, const struct r_found_version *version,
+		  void *const reloc_addr_arg, int skip_ifunc)
+{
+  Elf32_Addr *const reloc_addr = reloc_addr_arg;
+  const int r_type = ELF32_R_TYPE (reloc->r_info);
+
+  if (__builtin_expect (r_type == R_MICROBLAZE_64_PCREL, 0))
+    PUT_REL_64 (reloc_addr, map->l_addr + reloc->r_addend);
+  else if (r_type == R_MICROBLAZE_REL)
+    *reloc_addr = map->l_addr + reloc->r_addend;
+  else
+    {
+      const Elf32_Sym *const refsym = sym;
+      struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
+      Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value;
+
+      value += reloc->r_addend;
+      if (r_type == R_MICROBLAZE_GLOB_DAT ||
+          r_type == R_MICROBLAZE_JUMP_SLOT ||
+          r_type == R_MICROBLAZE_32)
+	{
+	  *reloc_addr = value;
+	}
+      else if (r_type == R_MICROBLAZE_COPY)
+	{
+	  if (sym != NULL && (sym->st_size > refsym->st_size
+	      || (sym->st_size < refsym->st_size && GLRO (dl_verbose))) )
+	    {
+	      const char *strtab;
+
+	      strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
+	      _dl_error_printf ("\
+%s: Symbol `%s' has different size in shared object, consider re-linking\n",
+				rtld_progname ?: "<program name unknown>",
+				strtab + refsym->st_name);
+	    }
+	  memcpy (reloc_addr_arg, (void *) value,
+		  MIN (sym->st_size, refsym->st_size));
+	}
+      else if (r_type == R_MICROBLAZE_NONE)
+	{
+	}
+#if !defined RTLD_BOOTSTRAP
+      else if (r_type == R_MICROBLAZE_TLSDTPMOD32)
+	{
+	  if (sym_map != NULL)
+	    *reloc_addr = sym_map->l_tls_modid;
+	}
+      else if (r_type == R_MICROBLAZE_TLSDTPREL32)
+	{
+	  if (sym != NULL)
+	    *reloc_addr = sym->st_value + reloc->r_addend;
+	}
+      else if (r_type == R_MICROBLAZE_TLSTPREL32)
+	{
+	  if (sym != NULL)
+	    {
+	      CHECK_STATIC_TLS (map, sym_map);
+	      *reloc_addr = sym->st_value + sym_map->l_tls_offset + reloc->r_addend;
+	    }
+	}
+#endif
+      else
+	{
+	  _dl_reloc_bad_type (map, r_type, 0);
+	}
+    }
+}
+
+auto inline void
+elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
+			   void *const reloc_addr_arg)
+{
+  Elf32_Addr *const reloc_addr = reloc_addr_arg;
+  PUT_REL_64 (reloc_addr, l_addr + reloc->r_addend);
+}
+
+auto inline void
+elf_machine_lazy_rel (struct link_map *map,
+		      Elf32_Addr l_addr, const Elf32_Rela *reloc,
+		      int skip_ifunc)
+{
+  Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
+  if (ELF32_R_TYPE (reloc->r_info) == R_MICROBLAZE_JUMP_SLOT)
+    *reloc_addr += l_addr;
+  else
+    _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1);
+}
+
+#endif /* RESOLVE_MAP.  */

Added: fsf/trunk/libc/ports/sysdeps/microblaze/dl-tls.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/dl-tls.h (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/dl-tls.h Fri Apr 19 00:01:55 2013
@@ -1,0 +1,29 @@
+/* Copyright (C) 2005-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/>.  */
+
+/* Type used for the representation of TLS information in the GOT.  */
+typedef struct
+{
+  unsigned long int ti_module;
+  unsigned long int ti_offset;
+} tls_index;
+
+extern void *__tls_get_addr (tls_index *ti);
+
+/* Value used for dtv entries for which the allocation is delayed.  */
+#define TLS_DTV_UNALLOCATED	((void *) -1l)

Added: fsf/trunk/libc/ports/sysdeps/microblaze/dl-trampoline.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/dl-trampoline.S (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/dl-trampoline.S Fri Apr 19 00:01:55 2013
@@ -1,0 +1,109 @@
+/* Copyright (C) 2005-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 <sysdep.h>
+#include <libc-symbols.h>
+
+#ifndef PROF
+
+    .text
+    .globl  _dl_runtime_resolve
+    .type   _dl_runtime_resolve, @function
+    .align  4
+_dl_runtime_resolve:
+    addik r1,r1,-40
+    swi   r5,r1,12
+    swi   r6,r1,16
+    swi   r7,r1,20
+    swi   r8,r1,24
+    swi   r9,r1,28
+    swi   r10,r1,32
+    swi   r15,r1,0
+    addk r5,r0,r4
+    brlid r15, _dl_fixup
+    addk r6,r0,r3; /* delay slot.  */
+    lwi   r10,r1,32
+    lwi   r9,r1,28
+    lwi   r8,r1,24
+    lwi   r7,r1,20
+    lwi   r6,r1,16
+    lwi   r5,r1,12
+    lwi   r15,r1,0
+    brad  r3
+    addik r1,r1,40; /* delay slot.  */
+    .size _dl_runtime_resolve, . - _dl_runtime_resolve
+
+    .text
+    .globl  _dl_runtime_profile
+    .type   _dl_runtime_profile, @function
+    .align  4
+_dl_runtime_profile:
+    addik r1,r1,-40
+    swi   r5,r1,12
+    swi   r6,r1,16
+    swi   r7,r1,20
+    swi   r8,r1,24
+    swi   r9,r1,28
+    swi   r10,r1,32
+    swi   r15,r1,0
+    addk r5,r0,r4
+    brlid r15, _dl_profile_fixup
+    addk r6,r0,r3; /* delay slot.  */
+    lwi   r10,r1,32
+    lwi   r9,r1,28
+    lwi   r8,r1,24
+    lwi   r7,r1,20
+    lwi   r6,r1,16
+    lwi   r5,r1,12
+    lwi   r15,r1,0
+    brad  r3
+    addik r1,r1,40; /* delay slot.  */
+    .size _dl_runtime_profile, . - _dl_runtime_profile
+
+#else
+
+    .text
+    .globl  _dl_runtime_resolve
+    .type   _dl_runtime_resolve, @function
+    .align  4
+_dl_runtime_resolve:
+    addik r1,r1,-40
+    swi   r5,r1,12
+    swi   r6,r1,16
+    swi   r7,r1,20
+    swi   r8,r1,24
+    swi   r9,r1,28
+    swi   r10,r1,32
+    swi   r15,r1,0
+    addk r5,r0,r4
+    brlid r15, fixup
+    addk r6,r0,r3; /* delay slot.  */
+    lwi   r10,r1,32
+    lwi   r9,r1,28
+    lwi   r8,r1,24
+    lwi   r7,r1,20
+    lwi   r6,r1,16
+    lwi   r5,r1,12
+    lwi   r15,r1,0
+    brad  r3
+    addik r1,r1,40; /* delay slot.  */
+    .size _dl_runtime_resolve, . - _dl_runtime_resolve
+    .globl _dl_runtime_profile
+    .set _dl_runtime_profile, _dl_runtime_resolve
+
+#endif

Added: fsf/trunk/libc/ports/sysdeps/microblaze/fegetround.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/fegetround.c (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/fegetround.c Fri Apr 19 00:01:55 2013
@@ -1,0 +1,24 @@
+/* Copyright (C) 2011-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 <fenv.h>
+
+int
+fegetround (void)
+{
+  return FE_TONEAREST;
+}

Added: fsf/trunk/libc/ports/sysdeps/microblaze/fesetround.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/fesetround.c (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/fesetround.c Fri Apr 19 00:01:55 2013
@@ -1,0 +1,25 @@
+/* Copyright (C) 2011-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 <fenv.h>
+
+int
+fesetround (int round)
+{
+  return (round == FE_TONEAREST) ? 0 : 1;
+}
+libm_hidden_def (fesetround)

Added: fsf/trunk/libc/ports/sysdeps/microblaze/gccframe.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/gccframe.h (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/gccframe.h Fri Apr 19 00:01:55 2013
@@ -1,0 +1,21 @@
+/* Copyright (C) 2005-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/>.  */
+
+#define FIRST_PSEUDO_REGISTER 78
+
+#include <sysdeps/generic/gccframe.h>

Added: fsf/trunk/libc/ports/sysdeps/microblaze/jmpbuf-unwind.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/jmpbuf-unwind.h (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/jmpbuf-unwind.h Fri Apr 19 00:01:55 2013
@@ -1,0 +1,46 @@
+/* Copyright (C) 2005-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 <setjmp.h>
+#include <stdint.h>
+#include <unwind.h>
+#include <sysdep.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+   containing a local variable at ADDRESS.  */
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle)		\
+  ((void *) (address) < (void *) demangle ((jmpbuf)[0].__sp))
+
+#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
+  _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+
+static inline uintptr_t __attribute__ ((unused))
+_jmpbuf_sp (__jmp_buf regs)
+{
+  uintptr_t sp = regs[0].__sp;
+#ifdef PTR_DEMANGLE
+  PTR_DEMANGLE (sp);
+#endif
+  return sp;
+}
+
+#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
+  ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
+
+/* We use the normal longjmp for unwinding.  */
+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)

Added: fsf/trunk/libc/ports/sysdeps/microblaze/ldsodefs.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/ldsodefs.h (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/ldsodefs.h Fri Apr 19 00:01:55 2013
@@ -1,0 +1,45 @@
+/* Copyright (C) 2005-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 _MICROBLAZE_LDSODEFS_H
+#define _MICROBLAZE_LDSODEFS_H 1
+
+#include <elf.h>
+
+struct La_microblaze_regs;
+struct La_microblaze_retval;
+
+#define ARCH_PLTENTER_MEMBERS                                                \
+  Elf32_Addr (*microblaze_gnu_pltenter) (Elf32_Sym *, unsigned int,          \
+                                         uintptr_t *,                        \
+                                         uintptr_t *,                        \
+                                         struct La_microblaze_regs *,        \
+                                         unsigned int *, const char *name,   \
+                                         long int *framesizep);
+
+#define ARCH_PLTEXIT_MEMBERS                                                 \
+  unsigned int (*microblaze_gnu_pltexit) (Elf32_Sym *, unsigned int,         \
+                                          uintptr_t *,                       \
+                                          uintptr_t *,                       \
+                                          const struct La_microblaze_regs *, \
+                                          struct La_microblaze_retval *,     \
+                                          const char *);
+
+#include_next <ldsodefs.h>
+
+#endif

Added: fsf/trunk/libc/ports/sysdeps/microblaze/libc-tls.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/libc-tls.c (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/libc-tls.c Fri Apr 19 00:01:55 2013
@@ -1,0 +1,32 @@
+/* Copyright (C) 2005-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 <csu/libc-tls.c>
+#include <dl-tls.h>
+
+/* On Microblaze, linker optimizations are not required, so __tls_get_addr
+   can be called even in statically linked binaries.  In this case module
+   must be always 1 and PT_TLS segment exist in the binary, otherwise it
+   would not link.  */
+
+void *
+__tls_get_addr (tls_index *ti)
+{
+  dtv_t *dtv = THREAD_DTV ();
+  return (char *) dtv[1].pointer.val + ti->ti_offset;
+}

Added: fsf/trunk/libc/ports/sysdeps/microblaze/libm-test-ulps
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/libm-test-ulps (added)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/libm-test-ulps Fri Apr 19 00:01:55 2013
@@ -1,0 +1,1728 @@
+# Begin of automatic generation
+
+# atan2
+Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
+float: 1
+ifloat: 1
+Test "atan2 (-max_value, -min_value) == -pi/2":
+float: 1
+ifloat: 1
+Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
+float: 1
+ifloat: 1
+Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772":
+float: 1
+ifloat: 1
+
+# atanh
+Test "atanh (0.75) == 0.972955074527656652552676371721589865":
+float: 1
+ifloat: 1
+
+# cacos
+Test "Imaginary part of: cacos (+0 + 0.5 i) == pi/2 - 0.4812118250596034474977589134243684231352 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: cacos (+0 + 1.0 i) == pi/2 - 0.8813735870195430252326093249797923090282 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: cacos (+0 + 1.5 i) == pi/2 - 1.194763217287109304111930828519090523536 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: cacos (+0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: cacos (+0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: cacos (+0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: cacos (-0 + 0.5 i) == pi/2 - 0.4812118250596034474977589134243684231352 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: cacos (-0 + 1.0 i) == pi/2 - 0.8813735870195430252326093249797923090282 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: cacos (-0 + 1.5 i) == pi/2 - 1.194763217287109304111930828519090523536 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: cacos (-0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: cacos (-0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: cacos (-0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i":
+double: 1
+idouble: 1
+Test "Real part of: cacos (-1.0 + 0x1p50 i) == 1.570796326794897507409741391764983781004 - 3.535050620855721078027883819436759661753e1 i":
+float: 1
+ifloat: 1
+Test "Real part of: cacos (-1.0 - 0x1p50 i) == 1.570796326794897507409741391764983781004 + 3.535050620855721078027883819436759661753e1 i":
+float: 1
+ifloat: 1
+Test "Real part of: cacos (-2 - 3 i) == 2.1414491111159960199416055713254211 + 1.9833870299165354323470769028940395 i":
+float: 1
+ifloat: 1
+Test "Real part of: cacos (0.5 + +0 i) == 1.047197551196597746154214461093167628066 - 0 i":
+double: 1
+idouble: 1
+Test "Real part of: cacos (0.5 - 0 i) == 1.047197551196597746154214461093167628066 + +0 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: cacos (0x1.fp1023 + 0x1.fp1023 i) == 7.853981633974483096156608458198757210493e-1 - 7.107906849659093345062145442726115449315e2 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: cacos (0x1.fp127 + 0x1.fp127 i) == 7.853981633974483096156608458198757210493e-1 - 8.973081118419833726837456344608533993585e1 i":
+double: 1
+idouble: 1
+
+# cacosh
+Test "Real part of: cacosh (+0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i":
+float: 1
+ifloat: 1
+Test "Real part of: cacosh (+0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: cacosh (+0 + 1.5 i) == 1.194763217287109304111930828519090523536 + pi/2 i":
+double: 1
+idouble: 1
+Test "Real part of: cacosh (+0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i":
+float: 1
+ifloat: 1
+Test "Real part of: cacosh (+0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: cacosh (+0 - 1.5 i) == 1.194763217287109304111930828519090523536 - pi/2 i":
+double: 1
+idouble: 1
+Test "Real part of: cacosh (-0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i":
+float: 1
+ifloat: 1
+Test "Real part of: cacosh (-0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: cacosh (-0 + 1.5 i) == 1.194763217287109304111930828519090523536 + pi/2 i":
+double: 1
+idouble: 1
+Test "Real part of: cacosh (-0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i":
+float: 1
+ifloat: 1
+Test "Real part of: cacosh (-0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: cacosh (-0 - 1.5 i) == 1.194763217287109304111930828519090523536 - pi/2 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: cacosh (-0.5 + +0 i) == +0 + 2.094395102393195492308428922186335256131 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: cacosh (-0.5 - 0 i) == +0 - 2.094395102393195492308428922186335256131 i":
+double: 1
+idouble: 1
+Test "Real part of: cacosh (-1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + pi i":
+float: 1
+ifloat: 1
+Test "Real part of: cacosh (-1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - pi i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
+float: 1
+ifloat: 1
+Test "Real part of: cacosh (1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + +0 i":
+float: 1
+ifloat: 1
+Test "Real part of: cacosh (1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - 0 i":
+float: 1
+ifloat: 1
+
+# casin
+Test "Imaginary part of: casin (+0 + 0.5 i) == +0 + 0.4812118250596034474977589134243684231352 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: casin (+0 + 1.0 i) == +0 + 0.8813735870195430252326093249797923090282 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: casin (+0 + 1.5 i) == +0 + 1.194763217287109304111930828519090523536 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: casin (+0 - 0.5 i) == +0 - 0.4812118250596034474977589134243684231352 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: casin (+0 - 1.0 i) == +0 - 0.8813735870195430252326093249797923090282 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: casin (+0 - 1.5 i) == +0 - 1.194763217287109304111930828519090523536 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: casin (-0 + 0.5 i) == -0 + 0.4812118250596034474977589134243684231352 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: casin (-0 + 1.0 i) == -0 + 0.8813735870195430252326093249797923090282 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: casin (-0 + 1.5 i) == -0 + 1.194763217287109304111930828519090523536 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: casin (-0 - 0.5 i) == -0 - 0.4812118250596034474977589134243684231352 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: casin (-0 - 1.0 i) == -0 - 0.8813735870195430252326093249797923090282 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: casin (-0 - 1.5 i) == -0 - 1.194763217287109304111930828519090523536 i":
+double: 1
+idouble: 1
+Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: casin (0x1.fp1023 + 0x1.fp1023 i) == 7.853981633974483096156608458198757210493e-1 + 7.107906849659093345062145442726115449315e2 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: casin (0x1.fp127 + 0x1.fp127 i) == 7.853981633974483096156608458198757210493e-1 + 8.973081118419833726837456344608533993585e1 i":
+double: 1
+idouble: 1
+
+# casinh
+Test "Real part of: casinh (-0.5 + +0 i) == -0.4812118250596034474977589134243684231352 + +0 i":
+float: 1
+ifloat: 1
+Test "Real part of: casinh (-0.5 - 0 i) == -0.4812118250596034474977589134243684231352 - 0 i":
+float: 1
+ifloat: 1
+Test "Real part of: casinh (-1.0 + +0 i) == -0.8813735870195430252326093249797923090282 + +0 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: casinh (-1.0 - 0 i) == -0.8813735870195430252326093249797923090282 - 0 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: casinh (-1.5 + +0 i) == -1.194763217287109304111930828519090523536 + +0 i":
+double: 1
+idouble: 1
+Test "Real part of: casinh (-1.5 - 0 i) == -1.194763217287109304111930828519090523536 - 0 i":
+double: 1
+idouble: 1
+Test "Real part of: casinh (0.5 + +0 i) == 0.4812118250596034474977589134243684231352 + +0 i":
+float: 1
+ifloat: 1
+Test "Real part of: casinh (0.5 - 0 i) == 0.4812118250596034474977589134243684231352 - 0 i":
+float: 1
+ifloat: 1
+Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: casinh (0x1.fp1023 + 0x1.fp1023 i) == 7.107906849659093345062145442726115449315e2 + 7.853981633974483096156608458198757210493e-1 i":
+double: 1
+idouble: 1
+Test "Real part of: casinh (0x1.fp127 + 0x1.fp127 i) == 8.973081118419833726837456344608533993585e1 + 7.853981633974483096156608458198757210493e-1 i":
+double: 1
+idouble: 1
+Test "Real part of: casinh (1.0 + +0 i) == 0.8813735870195430252326093249797923090282 + +0 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: casinh (1.0 - 0 i) == 0.8813735870195430252326093249797923090282 - 0 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: casinh (1.5 + +0 i) == 1.194763217287109304111930828519090523536 + +0 i":
+double: 1
+idouble: 1
+Test "Real part of: casinh (1.5 - 0 i) == 1.194763217287109304111930828519090523536 - 0 i":
+double: 1
+idouble: 1
+
+# catan
+Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# catanh
+Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
+double: 4
+idouble: 4
+Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
+double: 1
+idouble: 1
+
+# cbrt
+Test "cbrt (-27.0) == -3.0":
+double: 1
+idouble: 1
+Test "cbrt (0.75) == 0.908560296416069829445605878163630251":
+double: 1
+idouble: 1
+Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217":
+double: 1
+idouble: 1
+
+# ccos
+Test "Imaginary part of: ccos (-0.75 + 710.5 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: ccos (-0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ccos (-0.75 - 710.5 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: ccos (-0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
+float: 1
+ifloat: 1
+Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ccos (0.75 + 710.5 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: ccos (0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ccos (0.75 - 710.5 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i":
+double: 1
+idouble: 1

[... 10927 lines stripped ...]
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits