summaryrefslogtreecommitdiff
path: root/libc/ports/sysdeps
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-07-31 15:30:38 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-07-31 15:30:38 +0000
commitdd3105b347f432016fcdc1abd472c3717f557c9e (patch)
treecbaaecdaa1d3ad240177c9040f7f46c1387716ce /libc/ports/sysdeps
parent20f73aac36c2b2c240dcc379d5117488fe44960c (diff)
Merge changes between r19464 and r19920 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@19921 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/ports/sysdeps')
-rw-r--r--libc/ports/sysdeps/alpha/tst-audit.h1
-rw-r--r--libc/ports/sysdeps/arm/configure36
-rw-r--r--libc/ports/sysdeps/arm/configure.in25
-rw-r--r--libc/ports/sysdeps/arm/preconfigure2
-rw-r--r--libc/ports/sysdeps/arm/static-stubs.c7
-rw-r--r--libc/ports/sysdeps/arm/sysdep.h2
-rw-r--r--libc/ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps328
-rw-r--r--libc/ports/sysdeps/mips/bits/atomic.h211
-rw-r--r--libc/ports/sysdeps/mips/configure120
-rw-r--r--libc/ports/sysdeps/mips/configure.in27
-rw-r--r--libc/ports/sysdeps/mips/dl-machine.h5
-rw-r--r--libc/ports/sysdeps/tile/libm-test-ulps116
-rw-r--r--libc/ports/sysdeps/tile/sysdep.h2
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h11
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/c++-types.data67
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist3
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data20
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h14
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/arm/nptl/c++-types.data67
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist3
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/arm/nptl/localplt.data13
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/hppa/sys/epoll.h4
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/c++-types.data67
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist3
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/localplt.data8
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h14
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist3
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h10
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/Makefile3
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/getcontext.S63
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/makecontext.S100
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist3
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/setcontext.S94
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/swapcontext.S108
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/ucontext_i.sym20
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/c++-types.data67
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/localplt.data8
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/c++-types.data67
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist3
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/mips/mips64/mmap64.c1
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/c++-types.data67
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist3
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/c++-types.data67
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist3
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list2
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/c++-types.data67
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/localplt.data13
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/c++-types.data67
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/localplt.data31
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/c++-types.data67
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist3
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/localplt.data41
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h11
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/tile/makecontext.c2
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/tile/setcontext.S5
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/tile/sys/ptrace.h14
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/c++-types.data67
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist3
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/c++-types.data67
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist3
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/c++-types.data67
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist3
62 files changed, 2112 insertions, 287 deletions
diff --git a/libc/ports/sysdeps/alpha/tst-audit.h b/libc/ports/sysdeps/alpha/tst-audit.h
index 7e3022a1b..44e0db4af 100644
--- a/libc/ports/sysdeps/alpha/tst-audit.h
+++ b/libc/ports/sysdeps/alpha/tst-audit.h
@@ -21,3 +21,4 @@
#define pltexit la_alpha_gnu_pltexit
#define La_regs La_alpha_regs
#define La_retval La_alpha_retval
+#define int_retval lrv_r0
diff --git a/libc/ports/sysdeps/arm/configure b/libc/ports/sysdeps/arm/configure
index 665151fea..51fd72557 100644
--- a/libc/ports/sysdeps/arm/configure
+++ b/libc/ports/sysdeps/arm/configure
@@ -100,42 +100,6 @@ $as_echo X/"$0" |
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/arm.
-# Check for support of thread-local storage handling in assembler and
-# linker.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ARM TLS support" >&5
-$as_echo_n "checking for ARM TLS support... " >&6; }
-if ${libc_cv_arm_tls+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.s <<\EOF
- .section ".tdata", "awT", %progbits
- .globl foo
-foo: .long 1
- .section ".tbss", "awT", %nobits
- .globl bar
-bar: .skip 4
- .text
-.word foo(tpoff)
-.word foo(tlsgd)
-EOF
-if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- libc_cv_arm_tls=yes
-else
- libc_cv_arm_tls=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_tls" >&5
-$as_echo "$libc_cv_arm_tls" >&6; }
-if test $libc_cv_arm_tls = no; then
- as_fn_error $? "the assembler must support TLS" "$LINENO" 5
-fi
-
#AC_DEFINE(PI_STATIC_AND_HIDDEN)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the CFI directive .cfi_sections is supported" >&5
diff --git a/libc/ports/sysdeps/arm/configure.in b/libc/ports/sysdeps/arm/configure.in
index 64cef5f94..7e9133259 100644
--- a/libc/ports/sysdeps/arm/configure.in
+++ b/libc/ports/sysdeps/arm/configure.in
@@ -1,31 +1,6 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/arm.
-# Check for support of thread-local storage handling in assembler and
-# linker.
-AC_CACHE_CHECK(for ARM TLS support, libc_cv_arm_tls, [dnl
-cat > conftest.s <<\EOF
- .section ".tdata", "awT", %progbits
- .globl foo
-foo: .long 1
- .section ".tbss", "awT", %nobits
- .globl bar
-bar: .skip 4
- .text
-.word foo(tpoff)
-.word foo(tlsgd)
-EOF
-dnl
-if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
- libc_cv_arm_tls=yes
-else
- libc_cv_arm_tls=no
-fi
-rm -f conftest*])
-if test $libc_cv_arm_tls = no; then
- AC_MSG_ERROR([the assembler must support TLS])
-fi
-
dnl It is always possible to access static and hidden symbols in an
dnl position independent way.
dnl NOTE: This feature was added by the GCC TLS patches. We should test for
diff --git a/libc/ports/sysdeps/arm/preconfigure b/libc/ports/sysdeps/arm/preconfigure
index d98c167a9..20f6d91a1 100644
--- a/libc/ports/sysdeps/arm/preconfigure
+++ b/libc/ports/sysdeps/arm/preconfigure
@@ -41,7 +41,7 @@ arm*)
fi
CFLAGS="$CFLAGS -fno-unwind-tables"
;;
- *)
+ linux*)
echo "Old ABI no longer supported" 2>&1
exit 1
;;
diff --git a/libc/ports/sysdeps/arm/static-stubs.c b/libc/ports/sysdeps/arm/static-stubs.c
new file mode 100644
index 000000000..d90d603a9
--- /dev/null
+++ b/libc/ports/sysdeps/arm/static-stubs.c
@@ -0,0 +1,7 @@
+/* When building with GCC with static-only libgcc, the dummy
+ _Unwind_Resume from static-stubs.c needs to be used together with
+ the dummy __aeabi_unwind_cpp_pr* from aeabi_unwind_cpp_pr1.c
+ instead of the copies from libgcc. */
+
+#include <elf/static-stubs.c>
+#include <aeabi_unwind_cpp_pr1.c>
diff --git a/libc/ports/sysdeps/arm/sysdep.h b/libc/ports/sysdeps/arm/sysdep.h
index 7800456f6..cd3d70b5a 100644
--- a/libc/ports/sysdeps/arm/sysdep.h
+++ b/libc/ports/sysdeps/arm/sysdep.h
@@ -62,7 +62,7 @@
/* Define an entry point visible from C. */
#define ENTRY(name) \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \
+ .globl C_SYMBOL_NAME(name); \
ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),function) \
.align ALIGNARG(4); \
C_LABEL(name) \
diff --git a/libc/ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps b/libc/ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps
index 9c011e629..66dc109e0 100644
--- a/libc/ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps
+++ b/libc/ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps
@@ -619,6 +619,9 @@ ldouble: 1
Test "Imaginary part of: clog (0x1.fp+16383 + 0x1p+16383 i) == 11356.60974243783798653123798337822335902 + 0.4764674194737066993385333770295162295856 i":
ildouble: 1
ldouble: 1
+Test "Real part of: clog (1.0 + 0x1.234566p-10 i) == 6.172834701221959432440126967147726538097e-7 + 1.111110564353742042376451655136933182201e-3 i":
+float: 1
+ifloat: 1
# clog10
Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
@@ -627,6 +630,12 @@ ifloat: 1
Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
+Test "Imaginary part of: clog10 (-0x1.234566p-40 - 1.0 i) == 2.325249110681915353442924915876654139373e-25 - 6.821881769213700828789403802671540158935e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-1.0 + 0x1.234566p-20 i) == 2.556638434669064077889576526006849923281e-13 + 1.364375882602207106407956770293808181427 i":
+double: 1
+idouble: 1
Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
ildouble: 1
ldouble: 1
@@ -669,9 +678,18 @@ double: 1
idouble: 1
ildouble: 2
ldouble: 2
+Test "Real part of: clog10 (0x1.234566p-30 + 1.0 i) == 2.438200411482400072282924063740535840474e-19 + 6.821881764607257184291586401763604544928e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1.234566p-50 + 1.0 i) == 2.217530356103816369479108963807448194409e-31 + 6.821881769209202348667823902864283966959e-1 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (0x1p-16440 + 0x1p-16441 i) == -4948.884673709346821106688037612752099609 + 0.2013595981366865710389502301937289472543 i":
ildouble: 1
ldouble: 1
+Test "Imaginary part of: clog10 (1.0 + 0x1.234566p-10 i) == 2.680828048441605163181684680300513080769e-7 + 4.825491868832381486767558728169977751564e-4 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
float: 1
ifloat: 1
@@ -973,6 +991,34 @@ float: 1
ifloat: 1
# csqrt
+Test "Real part of: csqrt (-0x1.0000000000000002p-16382 - 0x1.0000000000000002p-16382 i) == 8.344545284118961664300307045791497724440e-2467 - 2.014551439675644900131815801350165472778e-2466 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (-0x1.0000000000000002p-16382 - 0x1.0000000000000002p-16382 i) == 8.344545284118961664300307045791497724440e-2467 - 2.014551439675644900131815801350165472778e-2466 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: csqrt (-0x1.0000000000001p-1022 - 0x1.0000000000001p-1022 i) == 6.788430486774966350907249113759995429568e-155 - 1.638872094839911521020410942677082920935e-154 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: csqrt (-0x1.000002p-126 - 0x1.000002p-126 i) == 4.934094449071842328766868579214125217132e-20 - 1.191195773697904627170323731331667740087e-19 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: csqrt (0x1.0000000000000002p-16382 + 0x1.0000000000000002p-16382 i) == 2.014551439675644900131815801350165472778e-2466 + 8.344545284118961664300307045791497724440e-2467 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0x1.0000000000000002p-16382 + 0x1.0000000000000002p-16382 i) == 2.014551439675644900131815801350165472778e-2466 + 8.344545284118961664300307045791497724440e-2467 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0x1.0000000000001p-1022 + 0x1.0000000000001p-1022 i) == 1.638872094839911521020410942677082920935e-154 + 6.788430486774966350907249113759995429568e-155 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0x1.000002p-126 + 0x1.000002p-126 i) == 1.191195773697904627170323731331667740087e-19 + 4.934094449071842328766868579214125217132e-20 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i":
double: 1
idouble: 1
@@ -1001,7 +1047,9 @@ ldouble: 1
# ctan
Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
double: 1
+float: 1
idouble: 1
+ifloat: 1
ildouble: 2
ldouble: 2
Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
@@ -1044,6 +1092,88 @@ Test "Real part of: ctan (1 + 5680 i) == 4.7252145961368120196167009204769497983
ildouble: 1
ldouble: 1
+# ctan_downward
+Test "Imaginary part of: ctan_downward (0x1.921fb54442d1846ap+0 + 0x1p-16445 i) == -3.986797629811710706723242948653362815645e19 + 5.793882568875674066286163141055208625180e-4912 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan_downward (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+double: 3
+idouble: 3
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan_downward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctan_downward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+
+# ctan_tonearest
+Test "Imaginary part of: ctan_tonearest (0x1.921fb54442d1846ap+0 + 0x1p-16445 i) == -3.986797629811710706723242948653362815645e19 + 5.793882568875674066286163141055208625180e-4912 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan_tonearest (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan_tonearest (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ctan_tonearest (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# ctan_towardzero
+Test "Real part of: ctan_towardzero (0x1.921fb54442d1846ap+0 + 0x1p-16445 i) == -3.986797629811710706723242948653362815645e19 + 5.793882568875674066286163141055208625180e-4912 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan_towardzero (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+double: 3
+idouble: 3
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan_towardzero (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan_towardzero (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+ildouble: 4
+ldouble: 4
+
+# ctan_upward
+Test "Real part of: ctan_upward (0x1.921fb54442d1846ap+0 + 0x1p-16445 i) == -3.986797629811710706723242948653362815645e19 + 5.793882568875674066286163141055208625180e-4912 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan_upward (0x1.921fb54442d1846ap+0 + 0x1p-16445 i) == -3.986797629811710706723242948653362815645e19 + 5.793882568875674066286163141055208625180e-4912 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan_upward (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctan_upward (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+Test "Real part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 1
+idouble: 1
+ildouble: 8
+ldouble: 8
+
# ctanh
Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
ildouble: 1
@@ -1066,9 +1196,9 @@ float: 1
ifloat: 1
Test "Imaginary part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
double: 1
-float: 1
+float: 2
idouble: 1
-ifloat: 1
+ifloat: 2
ildouble: 1
ldouble: 1
Test "Imaginary part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i":
@@ -1095,6 +1225,88 @@ Test "Imaginary part of: ctanh (5680 + 1 i) == 1.0 + 4.7252145961368120196167009
ildouble: 1
ldouble: 1
+# ctanh_downward
+Test "Real part of: ctanh_downward (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+double: 3
+idouble: 3
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctanh_downward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "Imaginary part of: ctanh_downward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Real part of: ctanh_downward (0x1p-16445 + 0x1.921fb54442d1846ap+0 i) == 5.793882568875674066286163141055208625180e-4912 - 3.986797629811710706723242948653362815645e19 i":
+ildouble: 1
+ldouble: 1
+
+# ctanh_tonearest
+Test "Real part of: ctanh_tonearest (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctanh_tonearest (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh_tonearest (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+Test "Real part of: ctanh_tonearest (0x1p-16445 + 0x1.921fb54442d1846ap+0 i) == 5.793882568875674066286163141055208625180e-4912 - 3.986797629811710706723242948653362815645e19 i":
+ildouble: 1
+ldouble: 1
+
+# ctanh_towardzero
+Test "Real part of: ctanh_towardzero (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+double: 3
+idouble: 3
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctanh_towardzero (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+ildouble: 4
+ldouble: 4
+Test "Imaginary part of: ctanh_towardzero (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh_towardzero (0x1p-16445 + 0x1.921fb54442d1846ap+0 i) == 5.793882568875674066286163141055208625180e-4912 - 3.986797629811710706723242948653362815645e19 i":
+ildouble: 1
+ldouble: 1
+
+# ctanh_upward
+Test "Real part of: ctanh_upward (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctanh_upward (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 2
+ldouble: 2
+Test "Real part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 1
+idouble: 1
+ildouble: 8
+ldouble: 8
+Test "Imaginary part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: ctanh_upward (0x1p-16445 + 0x1.921fb54442d1846ap+0 i) == 5.793882568875674066286163141055208625180e-4912 - 3.986797629811710706723242948653362815645e19 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh_upward (0x1p-16445 + 0x1.921fb54442d1846ap+0 i) == 5.793882568875674066286163141055208625180e-4912 - 3.986797629811710706723242948653362815645e19 i":
+ildouble: 1
+ldouble: 1
+
# erfc
Test "erfc (0.75) == 0.288844366346484868401062165408589223":
float: 1
@@ -1471,6 +1683,12 @@ ldouble: 1
Test "pow (0.75, 1.25) == 0.697953644326574699205914060237425566":
ildouble: 1
ldouble: 1
+Test "pow (0x0.ffffffp0, -0x1p24) == 2.7182819094701610539628664526874952929416":
+float: 1
+ifloat: 1
+Test "pow (0x0.ffffffp0, 0x1p24) == 0.3678794302077803437135155590023422899744":
+float: 1
+ifloat: 1
Test "pow (0x1p64, 0.125) == 256":
ildouble: 1
ldouble: 1
@@ -2330,6 +2548,8 @@ ifloat: 1
Function: Real part of "csqrt":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "csqrt":
double: 1
@@ -2351,6 +2571,58 @@ ifloat: 1
ildouble: 1
ldouble: 1
+Function: Real part of "ctan_downward":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: Imaginary part of "ctan_downward":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "ctan_tonearest":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "ctan_tonearest":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "ctan_towardzero":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "ctan_towardzero":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+ildouble: 4
+ldouble: 4
+
+Function: Real part of "ctan_upward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: Imaginary part of "ctan_upward":
+double: 1
+idouble: 1
+ildouble: 8
+ldouble: 8
+
Function: Real part of "ctanh":
float: 1
ifloat: 1
@@ -2359,6 +2631,58 @@ ldouble: 1
Function: Imaginary part of "ctanh":
double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 2
+ldouble: 2
+
+Function: Real part of "ctanh_downward":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "ctanh_downward":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: Real part of "ctanh_tonearest":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "ctanh_tonearest":
+float: 1
+ifloat: 1
+
+Function: Real part of "ctanh_towardzero":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+ildouble: 4
+ldouble: 4
+
+Function: Imaginary part of "ctanh_towardzero":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "ctanh_upward":
+double: 1
+idouble: 1
+ildouble: 8
+ldouble: 8
+
+Function: Imaginary part of "ctanh_upward":
+double: 1
float: 1
idouble: 1
ifloat: 1
diff --git a/libc/ports/sysdeps/mips/bits/atomic.h b/libc/ports/sysdeps/mips/bits/atomic.h
index 4d51d7fa2..b0942737d 100644
--- a/libc/ports/sysdeps/mips/bits/atomic.h
+++ b/libc/ports/sysdeps/mips/bits/atomic.h
@@ -1,5 +1,5 @@
/* Low-level functions for atomic operations. Mips version.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -78,17 +78,141 @@ typedef uintmax_t uatomic_max_t;
#define MIPS_SYNC_STR_1(X) MIPS_SYNC_STR_2(X)
#define MIPS_SYNC_STR MIPS_SYNC_STR_1(MIPS_SYNC)
+#if __GNUC_PREREQ (4, 8)
+/* The __atomic_* builtins are available in GCC 4.7 and later, but MIPS
+ support for their efficient implementation was added only in GCC 4.8. */
+
+/* Compare and exchange.
+ For all "bool" routines, we return FALSE if exchange succesful. */
+
+# define __arch_compare_and_exchange_bool_8_int(mem, newval, oldval, model) \
+ (abort (), 0)
+
+# define __arch_compare_and_exchange_bool_16_int(mem, newval, oldval, model) \
+ (abort (), 0)
+
+# define __arch_compare_and_exchange_bool_32_int(mem, newval, oldval, model) \
+ ({ \
+ typeof (*mem) __oldval = (oldval); \
+ !__atomic_compare_exchange_n (mem, (void *) &__oldval, newval, 0, \
+ model, __ATOMIC_RELAXED); \
+ })
+
+# define __arch_compare_and_exchange_val_8_int(mem, newval, oldval, model) \
+ (abort (), (typeof(*mem)) 0)
+
+# define __arch_compare_and_exchange_val_16_int(mem, newval, oldval, model) \
+ (abort (), (typeof(*mem)) 0)
+
+# define __arch_compare_and_exchange_val_32_int(mem, newval, oldval, model) \
+ ({ \
+ typeof (*mem) __oldval = (oldval); \
+ __atomic_compare_exchange_n (mem, (void *) &__oldval, newval, 0, \
+ model, __ATOMIC_RELAXED); \
+ __oldval; \
+ })
+
+# if _MIPS_SIM == _ABIO32
+ /* We can't do an atomic 64-bit operation in O32. */
+# define __arch_compare_and_exchange_bool_64_int(mem, newval, oldval, model) \
+ (abort (), 0)
+# define __arch_compare_and_exchange_val_64_int(mem, newval, oldval, model) \
+ (abort (), (typeof(*mem)) 0)
+# else
+# define __arch_compare_and_exchange_bool_64_int(mem, newval, oldval, model) \
+ __arch_compare_and_exchange_bool_32_int (mem, newval, oldval, model)
+# define __arch_compare_and_exchange_val_64_int(mem, newval, oldval, model) \
+ __arch_compare_and_exchange_val_32_int (mem, newval, oldval, model)
+# endif
+
+/* Compare and exchange with "acquire" semantics, ie barrier after. */
+
+# define atomic_compare_and_exchange_bool_acq(mem, new, old) \
+ __atomic_bool_bysize (__arch_compare_and_exchange_bool, int, \
+ mem, new, old, __ATOMIC_ACQUIRE)
+
+# define atomic_compare_and_exchange_val_acq(mem, new, old) \
+ __atomic_val_bysize (__arch_compare_and_exchange_val, int, \
+ mem, new, old, __ATOMIC_ACQUIRE)
+
+/* Compare and exchange with "release" semantics, ie barrier before. */
+
+# define atomic_compare_and_exchange_bool_rel(mem, new, old) \
+ __atomic_bool_bysize (__arch_compare_and_exchange_bool, int, \
+ mem, new, old, __ATOMIC_RELEASE)
+
+# define atomic_compare_and_exchange_val_rel(mem, new, old) \
+ __atomic_val_bysize (__arch_compare_and_exchange_val, int, \
+ mem, new, old, __ATOMIC_RELEASE)
+
+
+/* Atomic exchange (without compare). */
+
+# define __arch_exchange_8_int(mem, newval, model) \
+ (abort (), (typeof(*mem)) 0)
+
+# define __arch_exchange_16_int(mem, newval, model) \
+ (abort (), (typeof(*mem)) 0)
+
+# define __arch_exchange_32_int(mem, newval, model) \
+ __atomic_exchange_n (mem, newval, model)
+
+# if _MIPS_SIM == _ABIO32
+/* We can't do an atomic 64-bit operation in O32. */
+# define __arch_exchange_64_int(mem, newval, model) \
+ (abort (), (typeof(*mem)) 0)
+# else
+# define __arch_exchange_64_int(mem, newval, model) \
+ __atomic_exchange_n (mem, newval, model)
+# endif
+
+# define atomic_exchange_acq(mem, value) \
+ __atomic_val_bysize (__arch_exchange, int, mem, value, __ATOMIC_ACQUIRE)
+
+# define atomic_exchange_rel(mem, value) \
+ __atomic_val_bysize (__arch_exchange, int, mem, value, __ATOMIC_RELEASE)
+
+
+/* Atomically add value and return the previous (unincremented) value. */
+
+# define __arch_exchange_and_add_8_int(mem, value, model) \
+ (abort (), (typeof(*mem)) 0)
+
+# define __arch_exchange_and_add_16_int(mem, value, model) \
+ (abort (), (typeof(*mem)) 0)
+
+# define __arch_exchange_and_add_32_int(mem, value, model) \
+ __atomic_fetch_add (mem, value, model)
+
+# if _MIPS_SIM == _ABIO32
+/* We can't do an atomic 64-bit operation in O32. */
+# define __arch_exchange_and_add_64_int(mem, value, model) \
+ (abort (), (typeof(*mem)) 0)
+# else
+# define __arch_exchange_and_add_64_int(mem, value, model) \
+ __atomic_fetch_add (mem, value, model)
+# endif
+
+/* ??? Barrier semantics for atomic_exchange_and_add appear to be
+ undefined. Use full barrier for now, as that's safe. */
+# define atomic_exchange_and_add(mem, value) \
+ __atomic_val_bysize (__arch_exchange_and_add, int, mem, value, \
+ __ATOMIC_ACQ_REL)
+#else /* !__GNUC_PREREQ (4, 8) */
+/* This implementation using inline assembly will be removed once glibc
+ requires GCC 4.8 or later to build. */
+
/* Compare and exchange. For all of the "xxx" routines, we expect a
"__prev" and a "__cmp" variable to be provided by the enclosing scope,
in which values are returned. */
-#define __arch_compare_and_exchange_xxx_8_int(mem, newval, oldval, rel, acq) \
+# define __arch_compare_and_exchange_xxx_8_int(mem, newval, oldval, rel, acq) \
(abort (), __prev = __cmp = 0)
-#define __arch_compare_and_exchange_xxx_16_int(mem, newval, oldval, rel, acq) \
+# define __arch_compare_and_exchange_xxx_16_int(mem, newval, oldval, rel, acq) \
(abort (), __prev = __cmp = 0)
-#define __arch_compare_and_exchange_xxx_32_int(mem, newval, oldval, rel, acq) \
+# define __arch_compare_and_exchange_xxx_32_int(mem, newval, oldval, rel, acq) \
__asm__ __volatile__ ( \
".set push\n\t" \
MIPS_PUSH_MIPS2 \
@@ -107,12 +231,12 @@ typedef uintmax_t uatomic_max_t;
: "r" (oldval), "r" (newval), "m" (*mem) \
: "memory")
-#if _MIPS_SIM == _ABIO32
+# if _MIPS_SIM == _ABIO32
/* We can't do an atomic 64-bit operation in O32. */
-#define __arch_compare_and_exchange_xxx_64_int(mem, newval, oldval, rel, acq) \
+# define __arch_compare_and_exchange_xxx_64_int(mem, newval, oldval, rel, acq) \
(abort (), __prev = __cmp = 0)
-#else
-#define __arch_compare_and_exchange_xxx_64_int(mem, newval, oldval, rel, acq) \
+# else
+# define __arch_compare_and_exchange_xxx_64_int(mem, newval, oldval, rel, acq) \
__asm__ __volatile__ ("\n" \
".set push\n\t" \
MIPS_PUSH_MIPS2 \
@@ -130,26 +254,26 @@ typedef uintmax_t uatomic_max_t;
: "=&r" (__prev), "=&r" (__cmp), "=m" (*mem) \
: "r" (oldval), "r" (newval), "m" (*mem) \
: "memory")
-#endif
+# endif
/* For all "bool" routines, we return FALSE if exchange succesful. */
-#define __arch_compare_and_exchange_bool_8_int(mem, new, old, rel, acq) \
+# define __arch_compare_and_exchange_bool_8_int(mem, new, old, rel, acq) \
({ typeof (*mem) __prev; int __cmp; \
__arch_compare_and_exchange_xxx_8_int(mem, new, old, rel, acq); \
!__cmp; })
-#define __arch_compare_and_exchange_bool_16_int(mem, new, old, rel, acq) \
+# define __arch_compare_and_exchange_bool_16_int(mem, new, old, rel, acq) \
({ typeof (*mem) __prev; int __cmp; \
__arch_compare_and_exchange_xxx_16_int(mem, new, old, rel, acq); \
!__cmp; })
-#define __arch_compare_and_exchange_bool_32_int(mem, new, old, rel, acq) \
+# define __arch_compare_and_exchange_bool_32_int(mem, new, old, rel, acq) \
({ typeof (*mem) __prev; int __cmp; \
__arch_compare_and_exchange_xxx_32_int(mem, new, old, rel, acq); \
!__cmp; })
-#define __arch_compare_and_exchange_bool_64_int(mem, new, old, rel, acq) \
+# define __arch_compare_and_exchange_bool_64_int(mem, new, old, rel, acq) \
({ typeof (*mem) __prev; int __cmp; \
__arch_compare_and_exchange_xxx_64_int(mem, new, old, rel, acq); \
!__cmp; })
@@ -157,43 +281,43 @@ typedef uintmax_t uatomic_max_t;
/* For all "val" routines, return the old value whether exchange
successful or not. */
-#define __arch_compare_and_exchange_val_8_int(mem, new, old, rel, acq) \
+# define __arch_compare_and_exchange_val_8_int(mem, new, old, rel, acq) \
({ typeof (*mem) __prev; int __cmp; \
__arch_compare_and_exchange_xxx_8_int(mem, new, old, rel, acq); \
(typeof (*mem))__prev; })
-#define __arch_compare_and_exchange_val_16_int(mem, new, old, rel, acq) \
+# define __arch_compare_and_exchange_val_16_int(mem, new, old, rel, acq) \
({ typeof (*mem) __prev; int __cmp; \
__arch_compare_and_exchange_xxx_16_int(mem, new, old, rel, acq); \
(typeof (*mem))__prev; })
-#define __arch_compare_and_exchange_val_32_int(mem, new, old, rel, acq) \
+# define __arch_compare_and_exchange_val_32_int(mem, new, old, rel, acq) \
({ typeof (*mem) __prev; int __cmp; \
__arch_compare_and_exchange_xxx_32_int(mem, new, old, rel, acq); \
(typeof (*mem))__prev; })
-#define __arch_compare_and_exchange_val_64_int(mem, new, old, rel, acq) \
+# define __arch_compare_and_exchange_val_64_int(mem, new, old, rel, acq) \
({ typeof (*mem) __prev; int __cmp; \
__arch_compare_and_exchange_xxx_64_int(mem, new, old, rel, acq); \
(typeof (*mem))__prev; })
/* Compare and exchange with "acquire" semantics, ie barrier after. */
-#define atomic_compare_and_exchange_bool_acq(mem, new, old) \
+# define atomic_compare_and_exchange_bool_acq(mem, new, old) \
__atomic_bool_bysize (__arch_compare_and_exchange_bool, int, \
mem, new, old, "", MIPS_SYNC_STR)
-#define atomic_compare_and_exchange_val_acq(mem, new, old) \
+# define atomic_compare_and_exchange_val_acq(mem, new, old) \
__atomic_val_bysize (__arch_compare_and_exchange_val, int, \
mem, new, old, "", MIPS_SYNC_STR)
/* Compare and exchange with "release" semantics, ie barrier before. */
-#define atomic_compare_and_exchange_bool_rel(mem, new, old) \
+# define atomic_compare_and_exchange_bool_rel(mem, new, old) \
__atomic_bool_bysize (__arch_compare_and_exchange_bool, int, \
mem, new, old, MIPS_SYNC_STR, "")
-#define atomic_compare_and_exchange_val_rel(mem, new, old) \
+# define atomic_compare_and_exchange_val_rel(mem, new, old) \
__atomic_val_bysize (__arch_compare_and_exchange_val, int, \
mem, new, old, MIPS_SYNC_STR, "")
@@ -201,13 +325,13 @@ typedef uintmax_t uatomic_max_t;
/* Atomic exchange (without compare). */
-#define __arch_exchange_xxx_8_int(mem, newval, rel, acq) \
- (abort (), 0)
+# define __arch_exchange_xxx_8_int(mem, newval, rel, acq) \
+ (abort (), (typeof(*mem)) 0)
-#define __arch_exchange_xxx_16_int(mem, newval, rel, acq) \
- (abort (), 0)
+# define __arch_exchange_xxx_16_int(mem, newval, rel, acq) \
+ (abort (), (typeof(*mem)) 0)
-#define __arch_exchange_xxx_32_int(mem, newval, rel, acq) \
+# define __arch_exchange_xxx_32_int(mem, newval, rel, acq) \
({ typeof (*mem) __prev; int __cmp; \
__asm__ __volatile__ ("\n" \
".set push\n\t" \
@@ -226,12 +350,12 @@ typedef uintmax_t uatomic_max_t;
: "memory"); \
__prev; })
-#if _MIPS_SIM == _ABIO32
+# if _MIPS_SIM == _ABIO32
/* We can't do an atomic 64-bit operation in O32. */
-#define __arch_exchange_xxx_64_int(mem, newval, rel, acq) \
- (abort (), 0)
-#else
-#define __arch_exchange_xxx_64_int(mem, newval, rel, acq) \
+# define __arch_exchange_xxx_64_int(mem, newval, rel, acq) \
+ (abort (), (typeof(*mem)) 0)
+# else
+# define __arch_exchange_xxx_64_int(mem, newval, rel, acq) \
({ typeof (*mem) __prev; int __cmp; \
__asm__ __volatile__ ("\n" \
".set push\n\t" \
@@ -249,24 +373,24 @@ typedef uintmax_t uatomic_max_t;
: "r" (newval), "m" (*mem) \
: "memory"); \
__prev; })
-#endif
+# endif
-#define atomic_exchange_acq(mem, value) \
+# define atomic_exchange_acq(mem, value) \
__atomic_val_bysize (__arch_exchange_xxx, int, mem, value, "", MIPS_SYNC_STR)
-#define atomic_exchange_rel(mem, value) \
+# define atomic_exchange_rel(mem, value) \
__atomic_val_bysize (__arch_exchange_xxx, int, mem, value, MIPS_SYNC_STR, "")
/* Atomically add value and return the previous (unincremented) value. */
-#define __arch_exchange_and_add_8_int(mem, newval, rel, acq) \
+# define __arch_exchange_and_add_8_int(mem, newval, rel, acq) \
(abort (), (typeof(*mem)) 0)
-#define __arch_exchange_and_add_16_int(mem, newval, rel, acq) \
+# define __arch_exchange_and_add_16_int(mem, newval, rel, acq) \
(abort (), (typeof(*mem)) 0)
-#define __arch_exchange_and_add_32_int(mem, value, rel, acq) \
+# define __arch_exchange_and_add_32_int(mem, value, rel, acq) \
({ typeof (*mem) __prev; int __cmp; \
__asm__ __volatile__ ("\n" \
".set push\n\t" \
@@ -285,12 +409,12 @@ typedef uintmax_t uatomic_max_t;
: "memory"); \
__prev; })
-#if _MIPS_SIM == _ABIO32
+# if _MIPS_SIM == _ABIO32
/* We can't do an atomic 64-bit operation in O32. */
-#define __arch_exchange_and_add_64_int(mem, value, rel, acq) \
+# define __arch_exchange_and_add_64_int(mem, value, rel, acq) \
(abort (), (typeof(*mem)) 0)
-#else
-#define __arch_exchange_and_add_64_int(mem, value, rel, acq) \
+# else
+# define __arch_exchange_and_add_64_int(mem, value, rel, acq) \
({ typeof (*mem) __prev; int __cmp; \
__asm__ __volatile__ ( \
".set push\n\t" \
@@ -308,13 +432,14 @@ typedef uintmax_t uatomic_max_t;
: "r" (value), "m" (*mem) \
: "memory"); \
__prev; })
-#endif
+# endif
/* ??? Barrier semantics for atomic_exchange_and_add appear to be
undefined. Use full barrier for now, as that's safe. */
-#define atomic_exchange_and_add(mem, value) \
+# define atomic_exchange_and_add(mem, value) \
__atomic_val_bysize (__arch_exchange_and_add, int, mem, value, \
MIPS_SYNC_STR, MIPS_SYNC_STR)
+#endif /* __GNUC_PREREQ (4, 8) */
/* TODO: More atomic operations could be implemented efficiently; only the
basic requirements are done. */
diff --git a/libc/ports/sysdeps/mips/configure b/libc/ports/sysdeps/mips/configure
index e80f0a01a..898e4c3f2 100644
--- a/libc/ports/sysdeps/mips/configure
+++ b/libc/ports/sysdeps/mips/configure
@@ -1,123 +1,3 @@
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/mips.
-# Check for support of thread-local storage handling in assembler and
-# linker.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MIPS TLS support" >&5
-$as_echo_n "checking for MIPS TLS support... " >&6; }
-if ${libc_cv_mips_tls+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.s <<\EOF
- .section ".tdata", "awT", %progbits
- .globl foo
-foo: .long 1
- .section ".tbss", "awT", %nobits
- .globl bar
-bar: .skip 4
- .text
-
- lw $25, %call16(__tls_get_addr)($28)
- jalr $25
- addiu $4, $28, %tlsgd(x)
-EOF
-if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- libc_cv_mips_tls=yes
-else
- libc_cv_mips_tls=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mips_tls" >&5
-$as_echo "$libc_cv_mips_tls" >&6; }
-if test $libc_cv_mips_tls = no; then
- as_fn_error $? "the assembler must support TLS" "$LINENO" 5
-fi
-
diff --git a/libc/ports/sysdeps/mips/configure.in b/libc/ports/sysdeps/mips/configure.in
index ed92d2938..be9672d82 100644
--- a/libc/ports/sysdeps/mips/configure.in
+++ b/libc/ports/sysdeps/mips/configure.in
@@ -1,33 +1,6 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/mips.
-# Check for support of thread-local storage handling in assembler and
-# linker.
-AC_CACHE_CHECK(for MIPS TLS support, libc_cv_mips_tls, [dnl
-cat > conftest.s <<\EOF
- .section ".tdata", "awT", %progbits
- .globl foo
-foo: .long 1
- .section ".tbss", "awT", %nobits
- .globl bar
-bar: .skip 4
- .text
-
- lw $25, %call16(__tls_get_addr)($28)
- jalr $25
- addiu $4, $28, %tlsgd(x)
-EOF
-dnl
-if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
- libc_cv_mips_tls=yes
-else
- libc_cv_mips_tls=no
-fi
-rm -f conftest*])
-if test $libc_cv_mips_tls = no; then
- AC_MSG_ERROR([the assembler must support TLS])
-fi
-
dnl No MIPS GCC supports accessing static and hidden symbols in an
dnl position independent way.
dnl AC_DEFINE(PI_STATIC_AND_HIDDEN)
diff --git a/libc/ports/sysdeps/mips/dl-machine.h b/libc/ports/sysdeps/mips/dl-machine.h
index 9b52a9289..d2218fc8f 100644
--- a/libc/ports/sysdeps/mips/dl-machine.h
+++ b/libc/ports/sysdeps/mips/dl-machine.h
@@ -266,13 +266,14 @@ do { \
" STRINGXP(PTR_ADDU) " $7, $7, " STRINGXP (PTRSIZE) " \n\
# Make sure the stack pointer is aligned for _dl_init_internal.\n\
and $2, $29, -2 * " STRINGXP(SZREG) "\n\
- " STRINGXP(PTR_S) " $29, -" STRINGXP(SZREG) "($2)\n\
+ move $8, $29\n\
" STRINGXP(PTR_SUBIU) " $29, $2, 32\n\
+ " STRINGXP(PTR_S) " $8, (32 - " STRINGXP(SZREG) ")($29)\n\
" STRINGXP(SAVE_GP(16)) "\n\
# Call the function to run the initializers.\n\
jal _dl_init_internal\n\
# Restore the stack pointer for _start.\n\
- " STRINGXP(PTR_L) " $29, 32-" STRINGXP(SZREG) "($29)\n\
+ " STRINGXP(PTR_L) " $29, (32 - " STRINGXP(SZREG) ")($29)\n\
# Pass our finalizer function to the user in $2 as per ELF ABI.\n\
" STRINGXP(PTR_LA) " $2, _dl_fini\n\
# Jump to the user entry point.\n\
diff --git a/libc/ports/sysdeps/tile/libm-test-ulps b/libc/ports/sysdeps/tile/libm-test-ulps
index a42da1773..9f5d08559 100644
--- a/libc/ports/sysdeps/tile/libm-test-ulps
+++ b/libc/ports/sysdeps/tile/libm-test-ulps
@@ -460,15 +460,45 @@ float: 2
ifloat: 2
# clog
+Test "Real part of: clog (-0x1.fp+127 + 0x1p-149 i) == 88.69109041335841930424871526389807508374 + pi i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (-0x1.fp+127 - 0x1p-149 i) == 88.69109041335841930424871526389807508374 - pi i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (-0x1p-149 + 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 + pi/2 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog (-0x1p-149 + 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 + pi/2 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (-0x1p-149 - 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 - pi/2 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog (-0x1p-149 - 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 - pi/2 i":
+float: 1
+ifloat: 1
Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
float: 1
ifloat: 1
+Test "Real part of: clog (0x1.fp+127 + 0x1p-149 i) == 88.69109041335841930424871526389807508374 + +0 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (0x1.fp+127 - 0x1p-149 i) == 88.69109041335841930424871526389807508374 - 0 i":
+float: 1
+ifloat: 1
Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i) == -744.0934983311012896593986823853525458290 + pi/4 i":
double: 1
idouble: 1
Test "Real part of: clog (0x1p-147 + 0x1p-147 i) == -101.5460619520319878296245057936228672231 + pi/4 i":
float: 1
ifloat: 1
+Test "Real part of: clog (0x1p-149 + 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 + pi/2 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (0x1p-149 - 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 - pi/2 i":
+float: 1
+ifloat: 1
# clog10
Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
@@ -477,6 +507,34 @@ ifloat: 1
Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
+Test "Imaginary part of: clog10 (-0x1.fp+1023 + 0x1p-1074 i) == 308.2409272754311106024666378243768099991 + 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1.fp+1023 - 0x1p-1074 i) == 308.2409272754311106024666378243768099991 - 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1.fp+127 + 0x1p-149 i) == 38.51805116050395969095658815123105801479 + 1.364376353841841347485783625431355770210 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-0x1.fp+127 - 0x1p-149 i) == 38.51805116050395969095658815123105801479 - 1.364376353841841347485783625431355770210 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-0x1p-1074 + 0x1.fp+1023 i) == 308.2409272754311106024666378243768099991 + 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1p-1074 - 0x1.fp+1023 i) == 308.2409272754311106024666378243768099991 - 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1p-149 + 0x1.fp+127 i) == 38.51805116050395969095658815123105801479 + 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1p-149 - 0x1.fp+127 i) == 38.51805116050395969095658815123105801479 - 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
double: 1
idouble: 1
@@ -513,15 +571,31 @@ ifloat: 1
Test "Real part of: clog10 (0x1.fffffep+127 + 1.0 i) == 38.53183941910362389414093724045094697423 + 1.276276851248440096917018665609900318458e-39 i":
float: 1
ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-1074 + 0x1.fp+1023 i) == 308.2409272754311106024666378243768099991 + 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
Test "Real part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i":
double: 1
idouble: 1
+Test "Imaginary part of: clog10 (0x1p-1074 - 0x1.fp+1023 i) == 308.2409272754311106024666378243768099991 - 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (0x1p-147 + 0x1p-147 i) == -44.10089436477324509881274807713822842154 + pi/4*log10(e) i":
float: 1
ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-149 + 0x1.fp+127 i) == 38.51805116050395969095658815123105801479 + 0.6821881769209206737428918127156778851051 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "Imaginary part of: clog10 (0x1p-149 + 0x1p-149 i) == -44.70295435610120748924022586658721447508 + pi/4*log10(e) i":
float: 1
ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-149 - 0x1.fp+127 i) == 38.51805116050395969095658815123105801479 - 0.6821881769209206737428918127156778851051 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
float: 1
ifloat: 1
@@ -655,12 +729,18 @@ float: 1
ifloat: 1
# csqrt
+Test "Real part of: csqrt (-0x1.000002p-126 - 0x1.000002p-126 i) == 4.934094449071842328766868579214125217132e-20 - 1.191195773697904627170323731331667740087e-19 i":
+double: 1
+idouble: 1
Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
float: 1
ifloat: 1
Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
float: 1
ifloat: 1
+Test "Imaginary part of: csqrt (0x1.000002p-126 + 0x1.000002p-126 i) == 1.191195773697904627170323731331667740087e-19 + 4.934094449071842328766868579214125217132e-20 i":
+double: 1
+idouble: 1
Test "Imaginary part of: csqrt (0x1.fffffep+127 + 1.0 i) == 1.844674352395372953599975585936590505260e+19 + 2.710505511993121390769065968615872097053e-20 i":
float: 1
ifloat: 1
@@ -694,6 +774,14 @@ Test "Real part of: ctan (0x3.243f6cp-1 + 0 i) == -2.287733242885645987394874673
float: 1
ifloat: 1
+# ctan_tonearest
+Test "Real part of: ctan_tonearest (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ctan_tonearest (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+
# ctanh
Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
double: 1
@@ -728,6 +816,14 @@ Test "Real part of: ctanh (1 + 0x1p127 i) == 0.910133404767618376153287379442647
double: 1
idouble: 1
+# ctanh_tonearest
+Test "Real part of: ctanh_tonearest (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ctanh_tonearest (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+
# erf
Test "erf (1.25) == 0.922900128256458230136523481197281140":
double: 1
@@ -1291,6 +1387,10 @@ float: 1
idouble: 1
ifloat: 1
+Function: Imaginary part of "clog":
+float: 1
+ifloat: 1
+
Function: Real part of "clog10":
double: 1
float: 1
@@ -1363,6 +1463,14 @@ Function: Imaginary part of "ctan":
double: 1
idouble: 1
+Function: Real part of "ctan_tonearest":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "ctan_tonearest":
+float: 1
+ifloat: 1
+
Function: Real part of "ctanh":
double: 1
float: 1
@@ -1375,6 +1483,14 @@ float: 2
idouble: 1
ifloat: 2
+Function: Real part of "ctanh_tonearest":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "ctanh_tonearest":
+float: 1
+ifloat: 1
+
Function: "erf":
double: 1
idouble: 1
diff --git a/libc/ports/sysdeps/tile/sysdep.h b/libc/ports/sysdeps/tile/sysdep.h
index 58432eb03..34d704659 100644
--- a/libc/ports/sysdeps/tile/sysdep.h
+++ b/libc/ports/sysdeps/tile/sysdep.h
@@ -30,7 +30,7 @@
/* Define an entry point visible from C. */
#define ENTRY(name) \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \
+ .globl C_SYMBOL_NAME(name); \
ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
.align 8; \
C_LABEL(name) \
diff --git a/libc/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/libc/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
index 4a465a5bd..4a8c8d56b 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
@@ -97,6 +97,14 @@ typedef struct
int si_band; /* Band event for SIGPOLL. */
int si_fd;
} _sigpoll;
+
+ /* SIGSYS. */
+ struct
+ {
+ void *_call_addr; /* Calling user insn. */
+ int _syscall; /* Triggering system call number. */
+ unsigned int _arch; /* AUDIT_ARCH_* of syscall. */
+ } _sigsys;
} _sifields;
} siginfo_t;
@@ -115,6 +123,9 @@ typedef struct
# define si_addr _sifields._sigfault.si_addr
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
+# define si_call_addr _sifields._sigsys._call_addr
+# define si_syscall _sifields._sigsys._syscall
+# define si_arch _sifields._sigsys._arch
/* Values for `si_code'. Positive values are reserved for kernel-generated
diff --git a/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/c++-types.data b/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/c++-types.data
new file mode 100644
index 000000000..f264ed84b
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/c++-types.data
@@ -0,0 +1,67 @@
+blkcnt64_t:m
+blkcnt_t:j
+blksize_t:j
+caddr_t:Pc
+clockid_t:i
+clock_t:l
+daddr_t:i
+dev_t:m
+fd_mask:l
+fsblkcnt64_t:l
+fsblkcnt_t:i
+fsfilcnt64_t:m
+fsfilcnt_t:j
+fsid_t:8__fsid_t
+gid_t:j
+id_t:j
+ino64_t:m
+ino_t:j
+int16_t:s
+int32_t:i
+int64_t:l
+int8_t:a
+intptr_t:l
+key_t:i
+loff_t:l
+mode_t:j
+nlink_t:j
+off64_t:l
+off_t:l
+pid_t:i
+pthread_attr_t:14pthread_attr_t
+pthread_barrier_t:17pthread_barrier_t
+pthread_barrierattr_t:21pthread_barrierattr_t
+pthread_cond_t:14pthread_cond_t
+pthread_condattr_t:18pthread_condattr_t
+pthread_key_t:j
+pthread_mutex_t:15pthread_mutex_t
+pthread_mutexattr_t:19pthread_mutexattr_t
+pthread_once_t:i
+pthread_rwlock_t:16pthread_rwlock_t
+pthread_rwlockattr_t:20pthread_rwlockattr_t
+pthread_spinlock_t:i
+pthread_t:m
+quad_t:l
+register_t:l
+rlim64_t:m
+rlim_t:m
+sigset_t:10__sigset_t
+size_t:m
+socklen_t:j
+ssize_t:l
+suseconds_t:l
+time_t:l
+u_char:h
+uid_t:j
+uint:j
+u_int:j
+u_int16_t:t
+u_int32_t:j
+u_int64_t:m
+u_int8_t:h
+ulong:m
+u_long:m
+u_quad_t:m
+useconds_t:j
+ushort:t
+u_short:t
diff --git a/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist b/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist
index 6d333aa52..f8a3295ad 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist
+++ b/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist
@@ -1811,6 +1811,9 @@ GLIBC_2.16
sys_errlist D 0x460
sys_nerr D 0x4
timespec_get F
+GLIBC_2.17
+ GLIBC_2.17 A
+ secure_getenv F
GLIBC_2.2
GLIBC_2.2 A
_IO_adjust_wcolumn F
diff --git a/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data b/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data
new file mode 100644
index 000000000..00700d1e0
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data
@@ -0,0 +1,20 @@
+libc.so: _OtsAddX ?
+libc.so: _OtsConvertFloatXT ?
+libc.so: _OtsCvtQX ?
+libc.so: _OtsDivX ?
+libc.so: _OtsEqlX ?
+libc.so: _OtsGeqX ?
+libc.so: _OtsLssX ?
+libc.so: _OtsMulX ?
+libc.so: _OtsNeqX ?
+libc.so: _OtsSubX ?
+libc.so: _Unwind_Find_FDE
+libc.so: calloc ?
+libc.so: free ?
+libc.so: malloc ?
+libc.so: memalign ?
+libc.so: realloc ?
+libm.so: matherr
+# We used to offer inline functions that used this, so it must be exported.
+# Ought to reorg things such that carg isn't thus forced to use a plt.
+libm.so: __atan2
diff --git a/libc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h b/libc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
index 74d549a99..9092df719 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
@@ -24,20 +24,14 @@
/* On ARM the mmap2/stat64/lstat64/fstat64 syscalls were introduced in
2.3.35. */
-#if __LINUX_KERNEL_VERSION >= 131875
-# define __ASSUME_MMAP2_SYSCALL 1
-# define __ASSUME_STAT64_SYSCALL 1
-#endif
+#define __ASSUME_MMAP2_SYSCALL 1
+#define __ASSUME_STAT64_SYSCALL 1
/* Arm got fcntl64 in 2.4.4. */
-#if __LINUX_KERNEL_VERSION >= 132100
-# define __ASSUME_FCNTL64 1
-#endif
+#define __ASSUME_FCNTL64 1
/* The vfork syscall on arm was definitely available in 2.4. */
-#if __LINUX_KERNEL_VERSION >= 132097
-# define __ASSUME_VFORK_SYSCALL 1
-#endif
+#define __ASSUME_VFORK_SYSCALL 1
/* The signal frame layout changed in 2.6.18. */
#if __LINUX_KERNEL_VERSION >= 132626
diff --git a/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/c++-types.data b/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/c++-types.data
new file mode 100644
index 000000000..fde53bf33
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/c++-types.data
@@ -0,0 +1,67 @@
+blkcnt64_t:x
+blkcnt_t:l
+blksize_t:l
+caddr_t:Pc
+clockid_t:i
+clock_t:l
+daddr_t:i
+dev_t:y
+fd_mask:l
+fsblkcnt64_t:y
+fsblkcnt_t:m
+fsfilcnt64_t:y
+fsfilcnt_t:m
+fsid_t:8__fsid_t
+gid_t:j
+id_t:j
+ino64_t:y
+ino_t:m
+int16_t:s
+int32_t:i
+int64_t:x
+int8_t:a
+intptr_t:i
+key_t:i
+loff_t:x
+mode_t:j
+nlink_t:j
+off64_t:x
+off_t:l
+pid_t:i
+pthread_attr_t:14pthread_attr_t
+pthread_barrier_t:17pthread_barrier_t
+pthread_barrierattr_t:21pthread_barrierattr_t
+pthread_cond_t:14pthread_cond_t
+pthread_condattr_t:18pthread_condattr_t
+pthread_key_t:j
+pthread_mutex_t:15pthread_mutex_t
+pthread_mutexattr_t:19pthread_mutexattr_t
+pthread_once_t:i
+pthread_rwlock_t:16pthread_rwlock_t
+pthread_rwlockattr_t:20pthread_rwlockattr_t
+pthread_spinlock_t:i
+pthread_t:m
+quad_t:x
+register_t:i
+rlim64_t:y
+rlim_t:m
+sigset_t:10__sigset_t
+size_t:j
+socklen_t:j
+ssize_t:i
+suseconds_t:l
+time_t:l
+u_char:h
+uid_t:j
+uint:j
+u_int:j
+u_int16_t:t
+u_int32_t:j
+u_int64_t:y
+u_int8_t:h
+ulong:m
+u_long:m
+u_quad_t:y
+useconds_t:j
+ushort:t
+u_short:t
diff --git a/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist b/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist
index 1f496fb61..5523fdd2a 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist
+++ b/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist
@@ -78,6 +78,9 @@ GLIBC_2.16
mbrtoc16 F
mbrtoc32 F
timespec_get F
+GLIBC_2.17
+ GLIBC_2.17 A
+ secure_getenv F
GLIBC_2.4
GLIBC_2.4 A
_Exit F
diff --git a/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/localplt.data b/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/localplt.data
new file mode 100644
index 000000000..109522e37
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/localplt.data
@@ -0,0 +1,13 @@
+libc.so: __signbit
+libc.so: calloc
+libc.so: free
+libc.so: fscanf
+libc.so: malloc
+libc.so: memalign
+libc.so: raise
+libc.so: realloc
+libm.so: __signbit
+libm.so: __signbitf
+libm.so: matherr
+libpthread.so: __errno_location
+libpthread.so: raise
diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/sys/epoll.h b/libc/ports/sysdeps/unix/sysv/linux/hppa/sys/epoll.h
index 0adf09029..e06d5668f 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/hppa/sys/epoll.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/hppa/sys/epoll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2009, 2012 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -64,6 +64,8 @@ enum EPOLL_EVENTS
#define EPOLLHUP EPOLLHUP
EPOLLRDHUP = 0x2000,
#define EPOLLRDHUP EPOLLRDHUP
+ EPOLLWAKEUP = 1u << 29,
+#define EPOLLWAKEUP EPOLLWAKEUP
EPOLLONESHOT = 1u << 30,
#define EPOLLONESHOT EPOLLONESHOT
EPOLLET = 1u << 31
diff --git a/libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/c++-types.data b/libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/c++-types.data
new file mode 100644
index 000000000..23c11dc41
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/c++-types.data
@@ -0,0 +1,67 @@
+blkcnt64_t:l
+blkcnt_t:l
+blksize_t:l
+caddr_t:Pc
+clockid_t:i
+clock_t:l
+daddr_t:i
+dev_t:m
+fd_mask:l
+fsblkcnt64_t:m
+fsblkcnt_t:m
+fsfilcnt64_t:m
+fsfilcnt_t:m
+fsid_t:8__fsid_t
+gid_t:j
+id_t:j
+ino64_t:m
+ino_t:m
+int16_t:s
+int32_t:i
+int64_t:l
+int8_t:a
+intptr_t:l
+key_t:i
+loff_t:l
+mode_t:j
+nlink_t:m
+off64_t:l
+off_t:l
+pid_t:i
+pthread_attr_t:14pthread_attr_t
+pthread_barrier_t:17pthread_barrier_t
+pthread_barrierattr_t:21pthread_barrierattr_t
+pthread_cond_t:14pthread_cond_t
+pthread_condattr_t:18pthread_condattr_t
+pthread_key_t:j
+pthread_mutex_t:15pthread_mutex_t
+pthread_mutexattr_t:19pthread_mutexattr_t
+pthread_once_t:i
+pthread_rwlock_t:16pthread_rwlock_t
+pthread_rwlockattr_t:20pthread_rwlockattr_t
+pthread_spinlock_t:i
+pthread_t:m
+quad_t:l
+register_t:l
+rlim64_t:m
+rlim_t:m
+sigset_t:10__sigset_t
+size_t:m
+socklen_t:j
+ssize_t:l
+suseconds_t:l
+time_t:l
+u_char:h
+uid_t:j
+uint:j
+u_int:j
+u_int16_t:t
+u_int32_t:j
+u_int64_t:m
+u_int8_t:h
+ulong:m
+u_long:m
+u_quad_t:m
+useconds_t:j
+ushort:t
+u_short:t
diff --git a/libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist b/libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist
index 6939ad73b..b73f5ca8f 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist
+++ b/libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist
@@ -78,6 +78,9 @@ GLIBC_2.16
mbrtoc16 F
mbrtoc32 F
timespec_get F
+GLIBC_2.17
+ GLIBC_2.17 A
+ secure_getenv F
GLIBC_2.2
GLIBC_2.2 A
_Exit F
diff --git a/libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/localplt.data b/libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/localplt.data
new file mode 100644
index 000000000..ba488163b
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/localplt.data
@@ -0,0 +1,8 @@
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: matherr
+libm.so: matherrf
+libm.so: matherrl
diff --git a/libc/ports/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h b/libc/ports/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
index ae94464b2..ba72704e8 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
@@ -1,5 +1,5 @@
/* `ptrace' debugger support interface. Linux/ia64 version.
- Copyright (C) 2001, 2006, 2007, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -154,7 +154,8 @@ struct pt_all_user_regs
};
/* Options set using PTRACE_SETOPTIONS. */
-enum __ptrace_setoptions {
+enum __ptrace_setoptions
+{
PTRACE_O_TRACESYSGOOD = 0x00000001,
PTRACE_O_TRACEFORK = 0x00000002,
PTRACE_O_TRACEVFORK = 0x00000004,
@@ -162,17 +163,20 @@ enum __ptrace_setoptions {
PTRACE_O_TRACEEXEC = 0x00000010,
PTRACE_O_TRACEVFORKDONE = 0x00000020,
PTRACE_O_TRACEEXIT = 0x00000040,
- PTRACE_O_MASK = 0x0000007f
+ PTRACE_O_TRACESECCOMP = 0x00000080,
+ PTRACE_O_MASK = 0x000000ff
};
/* Wait extended result codes for the above trace options. */
-enum __ptrace_eventcodes {
+enum __ptrace_eventcodes
+{
PTRACE_EVENT_FORK = 1,
PTRACE_EVENT_VFORK = 2,
PTRACE_EVENT_CLONE = 3,
PTRACE_EVENT_EXEC = 4,
PTRACE_EVENT_VFORK_DONE = 5,
- PTRACE_EVENT_EXIT = 6
+ PTRACE_EVENT_EXIT = 6,
+ PTRACE_EVENT_SECCOMP = 7
};
/* Perform process tracing functions. REQUEST is one of the values
diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist b/libc/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist
index ca31ead95..9a924571e 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist
+++ b/libc/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist
@@ -79,6 +79,9 @@ GLIBC_2.16
mbrtoc16 F
mbrtoc32 F
timespec_get F
+GLIBC_2.17
+ GLIBC_2.17 A
+ secure_getenv F
GLIBC_2.4
GLIBC_2.4 A
_Exit F
diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/libc/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h
index 9b0a300c4..6fb37a616 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h
@@ -18,12 +18,10 @@
<http://www.gnu.org/licenses/>. */
/* These features were surely available with 2.4.12. */
-#if __LINUX_KERNEL_VERSION >= 132108
-# define __ASSUME_MMAP2_SYSCALL 1
-# define __ASSUME_STAT64_SYSCALL 1
-# define __ASSUME_FCNTL64 1
-# define __ASSUME_VFORK_SYSCALL 1
-#endif
+#define __ASSUME_MMAP2_SYSCALL 1
+#define __ASSUME_STAT64_SYSCALL 1
+#define __ASSUME_FCNTL64 1
+#define __ASSUME_VFORK_SYSCALL 1
/* Many syscalls were added in 2.6.10 for m68k. */
#if __LINUX_KERNEL_VERSION >= 132618
diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/Makefile b/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/Makefile
new file mode 100644
index 000000000..91bd35800
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/Makefile
@@ -0,0 +1,3 @@
+ifeq ($(subdir),stdlib)
+gen-as-const-headers += ucontext_i.sym
+endif
diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/getcontext.S b/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/getcontext.S
new file mode 100644
index 000000000..4f31d2afc
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/getcontext.S
@@ -0,0 +1,63 @@
+/* Save current context.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#include "ucontext_i.h"
+
+
+ENTRY(__getcontext)
+ /* Load address of the context data structure. */
+ move.l 4(%sp), %a0
+
+ /* Save the preserved registers and the return address. */
+ movem.l %d2-%d7, oGREGS+2*4(%a0)
+ movem.l %a2-%a6, oGREGS+10*4(%a0)
+ lea 4(%sp), %a1
+ move.l %a1, oSP(%a0)
+ move.l (%sp), oPC(%a0)
+ fmovem.l %fpsr/%fpcr/%fpiar, oFPREGS(%a0)
+ fmovem.x %fp2-%fp7, oFP2(%a0)
+ cfi_def_cfa (%a0, 0)
+ cfi_offset (%d2, oGREGS+2*4)
+ cfi_offset (%d3, oGREGS+3*4)
+ cfi_offset (%pc, oPC)
+
+ /* Save the current signal mask. */
+ lea oSIGMASK(%a0), %a1
+ move.l %a1, %d3
+ clr.l %d2
+ move.l #SIG_SETMASK, %d1
+ move.l #__NR_sigprocmask, %d0
+ trap #0
+ /* Restore registers. */
+ move.l oGREGS+2*4(%a0), %d2
+ cfi_restore (%d2)
+ move.l oGREGS+3*4(%a0), %d3
+ cfi_restore (%d3)
+ cfi_def_cfa (%sp, 4)
+ cfi_offset (%pc, -4)
+ cmp.l #-4095, %d0 /* Check %d0 for error. */
+ jcc SYSCALL_ERROR_LABEL /* Jump to error handler. */
+
+0: /* All done, return 0 for success. */
+ clr.l %d0
+ rts
+PSEUDO_END(__getcontext)
+
+weak_alias (__getcontext, getcontext)
diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/makecontext.S b/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/makecontext.S
new file mode 100644
index 000000000..a7048b1d3
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/makecontext.S
@@ -0,0 +1,100 @@
+/* Create new context.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#include "ucontext_i.h"
+
+
+ENTRY(__makecontext)
+ move.l 4(%sp), %a0
+
+ /* Get the address of the function we are supposed to run. */
+ move.l 8(%sp), oPC(%a0)
+
+ /* Compute the address of the stack. The information comes from
+ to us_stack element. */
+ move.l oSS_SP(%a0), %a1
+ add.l oSS_SIZE(%a0), %a1
+
+ /* Remember the number of parameters for the exit handler since
+ it has to remove them. We store the number in the D7 register
+ which the function we will call must preserve. */
+ move.l 12(%sp), %d1
+ move.l %d1, oGREGS+7*4(%a0)
+
+ /* Make room on the new stack for the parameters.
+ Room for the arguments, return address (== 1f) and
+ oLINK pointer is needed. */
+ neg.l %d1
+ lea -8(%a1,%d1.l*4), %a1
+ neg.l %d1
+
+ /* Store the future stack pointer. */
+ move.l %a1, oSP(%a0)
+
+ /* Put the next context on the new stack (from the uc_link
+ element). */
+ move.l oLINK(%a0), 4(%a1,%d1.l*4)
+
+ /* Copy all the parameters. */
+1: subq.l #1,%d1
+ jmi 2f
+ move.l 16(%sp,%d1.l*4), 4(%a1,%d1.l*4)
+ jra 1b
+2:
+
+ /* If the function we call returns we must continue with the
+ context which is given in the uc_link element. To do this
+ set the return address for the function the user provides
+ to a little bit of helper code which does the magic (see
+ below). */
+ lea 1f(%pc), %a0
+ move.l %a0, (%a1)
+ /* 'makecontext' returns no value. */
+ rts
+
+ /* This is the helper code which gets called if a function which
+ is registered with 'makecontext' returns. In this case we
+ have to install the context listed in the uc_link element of
+ the context 'makecontext' manipulated at the time of the
+ 'makecontext' call. If the pointer is NULL the process must
+ terminate. */
+ cfi_endproc
+1:
+ /* This removes the parameters passed to the function given to
+ 'makecontext' from the stack. D7 contains the number of
+ parameters (see above). */
+ lea (%sp,%d7.l*4), %sp
+
+ tst.l (%sp) /* Check the next context. */
+ jeq 2f /* If it is zero exit. */
+
+ jbsr JUMPTARGET(__setcontext)
+ /* If this returns (which can happen if the syscall fails) we'll
+ exit the program with the return error value (-1). */
+
+ move.l %d0, (%sp)
+2: jbsr HIDDEN_JUMPTARGET(exit)
+ /* The 'exit' call should never return. In case it does cause
+ the process to terminate. */
+ illegal
+ cfi_startproc
+END(__makecontext)
+
+weak_alias (__makecontext, makecontext)
diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist b/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist
index c2706f1e1..fbcd20897 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist
+++ b/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist
@@ -1767,6 +1767,9 @@ GLIBC_2.16
mbrtoc16 F
mbrtoc32 F
timespec_get F
+GLIBC_2.17
+ GLIBC_2.17 A
+ secure_getenv F
GLIBC_2.2
GLIBC_2.2 A
_IO_adjust_wcolumn F
diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/setcontext.S b/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/setcontext.S
new file mode 100644
index 000000000..a8d53a555
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/setcontext.S
@@ -0,0 +1,94 @@
+/* Install given context.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#include "ucontext_i.h"
+
+ENTRY(__setcontext)
+ /* Load address of the context data structure. */
+ move.l 4(%sp), %a0
+
+ /* Get the current signal mask. Note that we preserve D2/D3 in case
+ the system call fails and we return from the function with an
+ error. */
+ move.l %d3, -(%sp)
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (%d3, 0)
+ move.l %d2, -(%sp)
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (%d2, 0)
+ clr.l %d3
+ lea oSIGMASK(%a0), %a1
+ move.l %a1, %d2
+ move.l #SIG_SETMASK, %d1
+ move.l #__NR_sigprocmask, %d0
+ trap #0
+ cmp.l #-4095, %d0 /* Check %d0 for error. */
+ jcs 0f
+ move.l (%sp)+, %d2
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (d2)
+ move.l (%sp)+, %d3
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (d3)
+ jra SYSCALL_ERROR_LABEL /* Jump to error handler if error. */
+
+0: /* Load the new stack pointer. */
+ move.l oSP(%a0), %sp
+ cfi_def_cfa (%a0, 0)
+ cfi_offset (%d2, oGREGS+2*4)
+ cfi_offset (%d3, oGREGS+3*4)
+ cfi_offset (%d4, oGREGS+4*4)
+ cfi_offset (%d5, oGREGS+5*4)
+ cfi_offset (%d6, oGREGS+6*4)
+ cfi_offset (%d7, oGREGS+7*4)
+ cfi_offset (%a2, oGREGS+10*4)
+ cfi_offset (%a3, oGREGS+11*4)
+ cfi_offset (%a4, oGREGS+12*4)
+ cfi_offset (%a5, oGREGS+13*4)
+ cfi_offset (%a6, oGREGS+14*4)
+ cfi_offset (%fp2, oFP2+0*12)
+ cfi_offset (%fp3, oFP2+1*12)
+ cfi_offset (%fp4, oFP2+2*12)
+ cfi_offset (%fp5, oFP2+3*12)
+ cfi_offset (%fp6, oFP2+4*12)
+ cfi_offset (%fp7, oFP2+5*12)
+ cfi_offset (%pc, oPC)
+
+ /* Load the values of all the preserved registers (except SP). */
+ movem.l oGREGS+2*4(%a0), %d2-%d7
+ movem.l oGREGS+10*4(%a0), %a2-%a6
+ fmovem.l oFPREGS(%a0), %fpsr/%fpcr/%fpiar
+ fmovem.x oFP2(%a0), %fp2-%fp7
+ clr.l %d0
+
+ /* Fetch the address to return to. */
+ movl oPC(%a0), %a1
+
+ /* End FDE here, we fall into another context. */
+ cfi_endproc
+ cfi_startproc
+ cfi_register (%pc, %a1)
+
+ jmp (%a1)
+
+ cfi_offset (%pc, -4)
+PSEUDO_END(__setcontext)
+
+weak_alias (__setcontext, setcontext)
diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/swapcontext.S b/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/swapcontext.S
new file mode 100644
index 000000000..b65aed8ff
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/swapcontext.S
@@ -0,0 +1,108 @@
+/* Save current context and install the given one.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#include "ucontext_i.h"
+
+
+ENTRY(__swapcontext)
+ /* Load address of the context data structure we save in. */
+ move.l 4(%sp), %a0
+
+ /* Save the preserved registers and the return address. */
+ movem.l %d2-%d7, oGREGS+2*4(%a0)
+ movem.l %a2-%a6, oGREGS+10*4(%a0)
+ lea 4(%sp), %a1
+ move.l %a1, oSP(%a0)
+ move.l (%sp), oPC(%a0)
+ fmovem.l %fpsr/%fpcr/%fpiar, oFPREGS(%a0)
+ fmovem.x %fp2-%fp7, oFP2(%a0)
+ cfi_def_cfa (%a0, 0)
+ cfi_offset (%d2, oGREGS+2*4)
+ cfi_offset (%d3, oGREGS+3*4)
+ cfi_offset (%a2, oGREGS+10*4)
+ cfi_offset (%pc, oPC)
+
+ /* Load address of the context data structure we have to load. */
+ move.l 8(%sp), %a1
+
+ /* Save the current signal mask and install the new one. */
+ lea oSIGMASK(%a0), %a2
+ move.l %a2, %d3
+ lea oSIGMASK(%a1), %a2
+ move.l %a2, %d2
+ move.l #SIG_SETMASK, %d1
+ move.l #__NR_sigprocmask, %d0
+ trap #0
+ cmp.l #-4095, %d0 /* Check %d0 for error. */
+ jcs 0f
+ /* Restore registers. */
+ move.l oGREGS+2*4(%a0), %d2
+ cfi_restore (%d2)
+ move.l oGREGS+3*4(%a0), %d3
+ cfi_restore (%d3)
+ move.l oGREGS+10*4(%a0), %a2
+ cfi_restore (%a2)
+ jra SYSCALL_ERROR_LABEL /* Jump to error handler. */
+
+0: /* Load the new stack pointer. */
+ move.l oSP(%a1), %sp
+ cfi_def_cfa (%a1, 0)
+ cfi_offset (%d2, oGREGS+2*4)
+ cfi_offset (%d3, oGREGS+3*4)
+ cfi_offset (%d4, oGREGS+4*4)
+ cfi_offset (%d5, oGREGS+5*4)
+ cfi_offset (%d6, oGREGS+6*4)
+ cfi_offset (%d7, oGREGS+7*4)
+ cfi_offset (%a2, oGREGS+10*4)
+ cfi_offset (%a3, oGREGS+11*4)
+ cfi_offset (%a4, oGREGS+12*4)
+ cfi_offset (%a5, oGREGS+13*4)
+ cfi_offset (%a6, oGREGS+14*4)
+ cfi_offset (%fp2, oFP2+0*12)
+ cfi_offset (%fp3, oFP2+1*12)
+ cfi_offset (%fp4, oFP2+2*12)
+ cfi_offset (%fp5, oFP2+3*12)
+ cfi_offset (%fp6, oFP2+4*12)
+ cfi_offset (%fp7, oFP2+5*12)
+ cfi_offset (%pc, oPC)
+
+ /* Load the values of all the preserved registers (except SP). */
+ movem.l oGREGS+2*4(%a1), %d2-%d7
+ movem.l oGREGS+10*4(%a1), %a2-%a6
+ fmovem.l oFPREGS(%a1), %fpsr/%fpcr/%fpiar
+ fmovem.x oFP2(%a1), %fp2-%fp7
+
+ /* Clear D0 to indicate success. */
+ clr.l %d0
+
+ /* Fetch the address to return to. */
+ move.l oPC(%a1), %a0
+
+ /* End FDE here, we fall into another context. */
+ cfi_endproc
+ cfi_startproc
+ cfi_register (%pc, %a0)
+
+ jmp (%a0)
+
+ cfi_offset (%pc, -4)
+PSEUDO_END(__swapcontext)
+
+weak_alias (__swapcontext, swapcontext)
diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/ucontext_i.sym b/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/ucontext_i.sym
new file mode 100644
index 000000000..46bd4bf15
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/m68k/m680x0/ucontext_i.sym
@@ -0,0 +1,20 @@
+#include <stddef.h>
+#include <signal.h>
+#include <sys/ucontext.h>
+
+--
+
+SIG_SETMASK
+
+#define ucontext(member) offsetof (ucontext_t, member)
+#define mcontext(member) ucontext (uc_mcontext.member)
+
+oLINK ucontext (uc_link)
+oSS_SP ucontext (uc_stack.ss_sp)
+oSS_SIZE ucontext (uc_stack.ss_size)
+oGREGS mcontext (gregs)
+oSP mcontext (gregs[R_SP])
+oPC mcontext (gregs[R_PC])
+oFPREGS mcontext (fpregs)
+oFP2 mcontext (fpregs.f_fpregs[2])
+oSIGMASK ucontext (uc_sigmask)
diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/c++-types.data b/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/c++-types.data
new file mode 100644
index 000000000..fde53bf33
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/c++-types.data
@@ -0,0 +1,67 @@
+blkcnt64_t:x
+blkcnt_t:l
+blksize_t:l
+caddr_t:Pc
+clockid_t:i
+clock_t:l
+daddr_t:i
+dev_t:y
+fd_mask:l
+fsblkcnt64_t:y
+fsblkcnt_t:m
+fsfilcnt64_t:y
+fsfilcnt_t:m
+fsid_t:8__fsid_t
+gid_t:j
+id_t:j
+ino64_t:y
+ino_t:m
+int16_t:s
+int32_t:i
+int64_t:x
+int8_t:a
+intptr_t:i
+key_t:i
+loff_t:x
+mode_t:j
+nlink_t:j
+off64_t:x
+off_t:l
+pid_t:i
+pthread_attr_t:14pthread_attr_t
+pthread_barrier_t:17pthread_barrier_t
+pthread_barrierattr_t:21pthread_barrierattr_t
+pthread_cond_t:14pthread_cond_t
+pthread_condattr_t:18pthread_condattr_t
+pthread_key_t:j
+pthread_mutex_t:15pthread_mutex_t
+pthread_mutexattr_t:19pthread_mutexattr_t
+pthread_once_t:i
+pthread_rwlock_t:16pthread_rwlock_t
+pthread_rwlockattr_t:20pthread_rwlockattr_t
+pthread_spinlock_t:i
+pthread_t:m
+quad_t:x
+register_t:i
+rlim64_t:y
+rlim_t:m
+sigset_t:10__sigset_t
+size_t:j
+socklen_t:j
+ssize_t:i
+suseconds_t:l
+time_t:l
+u_char:h
+uid_t:j
+uint:j
+u_int:j
+u_int16_t:t
+u_int32_t:j
+u_int64_t:y
+u_int8_t:h
+ulong:m
+u_long:m
+u_quad_t:y
+useconds_t:j
+ushort:t
+u_short:t
diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/localplt.data b/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/localplt.data
new file mode 100644
index 000000000..d266b8f74
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/localplt.data
@@ -0,0 +1,8 @@
+libc.so: _Unwind_Find_FDE
+libc.so: __m68k_read_tp
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: matherr
diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/c++-types.data b/libc/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/c++-types.data
new file mode 100644
index 000000000..fde53bf33
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/c++-types.data
@@ -0,0 +1,67 @@
+blkcnt64_t:x
+blkcnt_t:l
+blksize_t:l
+caddr_t:Pc
+clockid_t:i
+clock_t:l
+daddr_t:i
+dev_t:y
+fd_mask:l
+fsblkcnt64_t:y
+fsblkcnt_t:m
+fsfilcnt64_t:y
+fsfilcnt_t:m
+fsid_t:8__fsid_t
+gid_t:j
+id_t:j
+ino64_t:y
+ino_t:m
+int16_t:s
+int32_t:i
+int64_t:x
+int8_t:a
+intptr_t:i
+key_t:i
+loff_t:x
+mode_t:j
+nlink_t:j
+off64_t:x
+off_t:l
+pid_t:i
+pthread_attr_t:14pthread_attr_t
+pthread_barrier_t:17pthread_barrier_t
+pthread_barrierattr_t:21pthread_barrierattr_t
+pthread_cond_t:14pthread_cond_t
+pthread_condattr_t:18pthread_condattr_t
+pthread_key_t:j
+pthread_mutex_t:15pthread_mutex_t
+pthread_mutexattr_t:19pthread_mutexattr_t
+pthread_once_t:i
+pthread_rwlock_t:16pthread_rwlock_t
+pthread_rwlockattr_t:20pthread_rwlockattr_t
+pthread_spinlock_t:i
+pthread_t:m
+quad_t:x
+register_t:i
+rlim64_t:y
+rlim_t:m
+sigset_t:10__sigset_t
+size_t:j
+socklen_t:j
+ssize_t:i
+suseconds_t:l
+time_t:l
+u_char:h
+uid_t:j
+uint:j
+u_int:j
+u_int16_t:t
+u_int32_t:j
+u_int64_t:y
+u_int8_t:h
+ulong:m
+u_long:m
+u_quad_t:y
+useconds_t:j
+ushort:t
+u_short:t
diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist b/libc/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist
index 80f7d3321..54e8d1a94 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist
+++ b/libc/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist
@@ -2242,3 +2242,6 @@ GLIBC_2.9
pipe2 F
_gp_disp
_gp_disp A
+GLIBC_2.17
+ GLIBC_2.17 A
+ secure_getenv F
diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/mmap64.c b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/mmap64.c
new file mode 100644
index 000000000..0dbd384a6
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/mmap64.c
@@ -0,0 +1 @@
+/* mmap64 is the same as mmap. */
diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/c++-types.data b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/c++-types.data
new file mode 100644
index 000000000..39212e50b
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/c++-types.data
@@ -0,0 +1,67 @@
+blkcnt64_t:x
+blkcnt_t:l
+blksize_t:l
+caddr_t:Pc
+clockid_t:i
+clock_t:l
+daddr_t:i
+dev_t:y
+fd_mask:l
+fsblkcnt64_t:y
+fsblkcnt_t:m
+fsfilcnt64_t:y
+fsfilcnt_t:m
+fsid_t:8__fsid_t
+gid_t:j
+id_t:j
+ino64_t:y
+ino_t:m
+int16_t:s
+int32_t:i
+int64_t:x
+int8_t:a
+intptr_t:i
+key_t:i
+loff_t:x
+mode_t:j
+nlink_t:j
+off64_t:x
+off_t:l
+pid_t:i
+pthread_attr_t:14pthread_attr_t
+pthread_barrier_t:17pthread_barrier_t
+pthread_barrierattr_t:21pthread_barrierattr_t
+pthread_cond_t:14pthread_cond_t
+pthread_condattr_t:18pthread_condattr_t
+pthread_key_t:j
+pthread_mutex_t:15pthread_mutex_t
+pthread_mutexattr_t:19pthread_mutexattr_t
+pthread_once_t:i
+pthread_rwlock_t:16pthread_rwlock_t
+pthread_rwlockattr_t:20pthread_rwlockattr_t
+pthread_spinlock_t:i
+pthread_t:m
+quad_t:x
+register_t:x
+rlim64_t:y
+rlim_t:m
+sigset_t:10__sigset_t
+size_t:j
+socklen_t:j
+ssize_t:i
+suseconds_t:l
+time_t:l
+u_char:h
+uid_t:j
+uint:j
+u_int:j
+u_int16_t:t
+u_int32_t:j
+u_int64_t:y
+u_int8_t:h
+ulong:m
+u_long:m
+u_quad_t:y
+useconds_t:j
+ushort:t
+u_short:t
diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist
index 6d64e1d23..2a0e2a2d9 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist
+++ b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist
@@ -1390,6 +1390,9 @@ GLIBC_2.16
mbrtoc16 F
mbrtoc32 F
timespec_get F
+GLIBC_2.17
+ GLIBC_2.17 A
+ secure_getenv F
GLIBC_2.2
GLIBC_2.2 A
_Exit F
diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/c++-types.data b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/c++-types.data
new file mode 100644
index 000000000..23c11dc41
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/c++-types.data
@@ -0,0 +1,67 @@
+blkcnt64_t:l
+blkcnt_t:l
+blksize_t:l
+caddr_t:Pc
+clockid_t:i
+clock_t:l
+daddr_t:i
+dev_t:m
+fd_mask:l
+fsblkcnt64_t:m
+fsblkcnt_t:m
+fsfilcnt64_t:m
+fsfilcnt_t:m
+fsid_t:8__fsid_t
+gid_t:j
+id_t:j
+ino64_t:m
+ino_t:m
+int16_t:s
+int32_t:i
+int64_t:l
+int8_t:a
+intptr_t:l
+key_t:i
+loff_t:l
+mode_t:j
+nlink_t:m
+off64_t:l
+off_t:l
+pid_t:i
+pthread_attr_t:14pthread_attr_t
+pthread_barrier_t:17pthread_barrier_t
+pthread_barrierattr_t:21pthread_barrierattr_t
+pthread_cond_t:14pthread_cond_t
+pthread_condattr_t:18pthread_condattr_t
+pthread_key_t:j
+pthread_mutex_t:15pthread_mutex_t
+pthread_mutexattr_t:19pthread_mutexattr_t
+pthread_once_t:i
+pthread_rwlock_t:16pthread_rwlock_t
+pthread_rwlockattr_t:20pthread_rwlockattr_t
+pthread_spinlock_t:i
+pthread_t:m
+quad_t:l
+register_t:l
+rlim64_t:m
+rlim_t:m
+sigset_t:10__sigset_t
+size_t:m
+socklen_t:j
+ssize_t:l
+suseconds_t:l
+time_t:l
+u_char:h
+uid_t:j
+uint:j
+u_int:j
+u_int16_t:t
+u_int32_t:j
+u_int64_t:m
+u_int8_t:h
+ulong:m
+u_long:m
+u_quad_t:m
+useconds_t:j
+ushort:t
+u_short:t
diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist
index 701152eeb..0e21194ac 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist
+++ b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist
@@ -1388,6 +1388,9 @@ GLIBC_2.16
mbrtoc16 F
mbrtoc32 F
timespec_get F
+GLIBC_2.17
+ GLIBC_2.17 A
+ secure_getenv F
GLIBC_2.2
GLIBC_2.2 A
_Exit F
diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
index 867323a96..50d5ba319 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
+++ b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
@@ -2,6 +2,8 @@
lseek - lseek Ci:iii __libc_lseek __lseek lseek __llseek llseek __libc_lseek64 __lseek64 lseek64
+mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64
+
ftruncate - ftruncate i:ii __ftruncate ftruncate ftruncate64 __ftruncate64
truncate - truncate i:si truncate truncate64
diff --git a/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/c++-types.data b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/c++-types.data
new file mode 100644
index 000000000..fde53bf33
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/c++-types.data
@@ -0,0 +1,67 @@
+blkcnt64_t:x
+blkcnt_t:l
+blksize_t:l
+caddr_t:Pc
+clockid_t:i
+clock_t:l
+daddr_t:i
+dev_t:y
+fd_mask:l
+fsblkcnt64_t:y
+fsblkcnt_t:m
+fsfilcnt64_t:y
+fsfilcnt_t:m
+fsid_t:8__fsid_t
+gid_t:j
+id_t:j
+ino64_t:y
+ino_t:m
+int16_t:s
+int32_t:i
+int64_t:x
+int8_t:a
+intptr_t:i
+key_t:i
+loff_t:x
+mode_t:j
+nlink_t:j
+off64_t:x
+off_t:l
+pid_t:i
+pthread_attr_t:14pthread_attr_t
+pthread_barrier_t:17pthread_barrier_t
+pthread_barrierattr_t:21pthread_barrierattr_t
+pthread_cond_t:14pthread_cond_t
+pthread_condattr_t:18pthread_condattr_t
+pthread_key_t:j
+pthread_mutex_t:15pthread_mutex_t
+pthread_mutexattr_t:19pthread_mutexattr_t
+pthread_once_t:i
+pthread_rwlock_t:16pthread_rwlock_t
+pthread_rwlockattr_t:20pthread_rwlockattr_t
+pthread_spinlock_t:i
+pthread_t:m
+quad_t:x
+register_t:i
+rlim64_t:y
+rlim_t:m
+sigset_t:10__sigset_t
+size_t:j
+socklen_t:j
+ssize_t:i
+suseconds_t:l
+time_t:l
+u_char:h
+uid_t:j
+uint:j
+u_int:j
+u_int16_t:t
+u_int32_t:j
+u_int64_t:y
+u_int8_t:h
+ulong:m
+u_long:m
+u_quad_t:y
+useconds_t:j
+ushort:t
+u_short:t
diff --git a/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/localplt.data b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/localplt.data
new file mode 100644
index 000000000..3c64ec9d9
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/localplt.data
@@ -0,0 +1,13 @@
+libc.so: __signbit
+libc.so: __signbitl
+libc.so: abort
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: __signbit
+libm.so: __signbitf
+libm.so: __signbitl
+libm.so: fegetround
+libm.so: matherr
diff --git a/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/c++-types.data b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/c++-types.data
new file mode 100644
index 000000000..fde53bf33
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/c++-types.data
@@ -0,0 +1,67 @@
+blkcnt64_t:x
+blkcnt_t:l
+blksize_t:l
+caddr_t:Pc
+clockid_t:i
+clock_t:l
+daddr_t:i
+dev_t:y
+fd_mask:l
+fsblkcnt64_t:y
+fsblkcnt_t:m
+fsfilcnt64_t:y
+fsfilcnt_t:m
+fsid_t:8__fsid_t
+gid_t:j
+id_t:j
+ino64_t:y
+ino_t:m
+int16_t:s
+int32_t:i
+int64_t:x
+int8_t:a
+intptr_t:i
+key_t:i
+loff_t:x
+mode_t:j
+nlink_t:j
+off64_t:x
+off_t:l
+pid_t:i
+pthread_attr_t:14pthread_attr_t
+pthread_barrier_t:17pthread_barrier_t
+pthread_barrierattr_t:21pthread_barrierattr_t
+pthread_cond_t:14pthread_cond_t
+pthread_condattr_t:18pthread_condattr_t
+pthread_key_t:j
+pthread_mutex_t:15pthread_mutex_t
+pthread_mutexattr_t:19pthread_mutexattr_t
+pthread_once_t:i
+pthread_rwlock_t:16pthread_rwlock_t
+pthread_rwlockattr_t:20pthread_rwlockattr_t
+pthread_spinlock_t:i
+pthread_t:m
+quad_t:x
+register_t:i
+rlim64_t:y
+rlim_t:m
+sigset_t:10__sigset_t
+size_t:j
+socklen_t:j
+ssize_t:i
+suseconds_t:l
+time_t:l
+u_char:h
+uid_t:j
+uint:j
+u_int:j
+u_int16_t:t
+u_int32_t:j
+u_int64_t:y
+u_int8_t:h
+ulong:m
+u_long:m
+u_quad_t:y
+useconds_t:j
+ushort:t
+u_short:t
diff --git a/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/localplt.data b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/localplt.data
new file mode 100644
index 000000000..f38522386
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/localplt.data
@@ -0,0 +1,31 @@
+libc.so: __adddf3
+libc.so: __divdf3
+libc.so: __eqdf2
+libc.so: __extendsfdf2
+libc.so: __fixdfsi
+libc.so: __fixunsdfsi
+libc.so: __floatsidf
+libc.so: __floatunsidf
+libc.so: __gedf2
+libc.so: __gtdf2
+libc.so: __ledf2
+libc.so: __ltdf2
+libc.so: __muldf3
+libc.so: __nedf2
+libc.so: __signbit
+libc.so: __signbitl
+libc.so: __subdf3
+libc.so: __truncdfsf2
+libc.so: __unorddf2
+libc.so: abort
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: __signbit
+libm.so: __signbitf
+libm.so: __signbitl
+libm.so: copysignl
+libm.so: fegetround
+libm.so: matherr
diff --git a/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/c++-types.data b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/c++-types.data
new file mode 100644
index 000000000..fde53bf33
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/c++-types.data
@@ -0,0 +1,67 @@
+blkcnt64_t:x
+blkcnt_t:l
+blksize_t:l
+caddr_t:Pc
+clockid_t:i
+clock_t:l
+daddr_t:i
+dev_t:y
+fd_mask:l
+fsblkcnt64_t:y
+fsblkcnt_t:m
+fsfilcnt64_t:y
+fsfilcnt_t:m
+fsid_t:8__fsid_t
+gid_t:j
+id_t:j
+ino64_t:y
+ino_t:m
+int16_t:s
+int32_t:i
+int64_t:x
+int8_t:a
+intptr_t:i
+key_t:i
+loff_t:x
+mode_t:j
+nlink_t:j
+off64_t:x
+off_t:l
+pid_t:i
+pthread_attr_t:14pthread_attr_t
+pthread_barrier_t:17pthread_barrier_t
+pthread_barrierattr_t:21pthread_barrierattr_t
+pthread_cond_t:14pthread_cond_t
+pthread_condattr_t:18pthread_condattr_t
+pthread_key_t:j
+pthread_mutex_t:15pthread_mutex_t
+pthread_mutexattr_t:19pthread_mutexattr_t
+pthread_once_t:i
+pthread_rwlock_t:16pthread_rwlock_t
+pthread_rwlockattr_t:20pthread_rwlockattr_t
+pthread_spinlock_t:i
+pthread_t:m
+quad_t:x
+register_t:i
+rlim64_t:y
+rlim_t:m
+sigset_t:10__sigset_t
+size_t:j
+socklen_t:j
+ssize_t:i
+suseconds_t:l
+time_t:l
+u_char:h
+uid_t:j
+uint:j
+u_int:j
+u_int16_t:t
+u_int32_t:j
+u_int64_t:y
+u_int8_t:h
+ulong:m
+u_long:m
+u_quad_t:y
+useconds_t:j
+ushort:t
+u_short:t
diff --git a/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist
index 43015f4e9..11ad6a525 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist
+++ b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist
@@ -1772,6 +1772,9 @@ GLIBC_2.16
mbrtoc16 F
mbrtoc32 F
timespec_get F
+GLIBC_2.17
+ GLIBC_2.17 A
+ secure_getenv F
GLIBC_2.2
GLIBC_2.2 A
_IO_adjust_wcolumn F
diff --git a/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/localplt.data b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/localplt.data
new file mode 100644
index 000000000..0743b08a3
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/localplt.data
@@ -0,0 +1,41 @@
+libc.so: _Unwind_Find_FDE
+libc.so: __adddf3 ?
+libc.so: __addsf3 ?
+libc.so: __divdf3 ?
+libc.so: __divsf3 ?
+libc.so: __eqdf2 ?
+libc.so: __eqsf2 ?
+libc.so: __extendsfdf2 ?
+libc.so: __fixdfsi ?
+libc.so: __fixsfsi ?
+libc.so: __fixunsdfsi ?
+libc.so: __floatsidf ?
+libc.so: __floatsisf ?
+libc.so: __floatunsidf ?
+libc.so: __floatunsisf ?
+libc.so: __gedf2 ?
+libc.so: __gtdf2 ?
+libc.so: __ledf2 ?
+libc.so: __ltdf2 ?
+libc.so: __muldf3 ?
+libc.so: __mulsf3 ?
+libc.so: __nedf2 ?
+libc.so: __signbit
+libc.so: __signbitl
+libc.so: __subdf3 ?
+libc.so: __subsf3 ?
+libc.so: __truncdfsf2 ?
+libc.so: __unorddf2 ?
+libc.so: abort ?
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: __signbit
+libm.so: __signbitf
+libm.so: __signbitl
+libm.so: copysignl
+libm.so: fabsl
+libm.so: fegetround
+libm.so: matherr
diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h b/libc/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
index 44ffcc04d..6fa354a78 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
@@ -104,6 +104,14 @@ typedef struct
long int si_band; /* Band event for SIGPOLL. */
int si_fd;
} _sigpoll;
+
+ /* SIGSYS. */
+ struct
+ {
+ void *_call_addr; /* Calling user insn. */
+ int _syscall; /* Triggering system call number. */
+ unsigned int _arch; /* AUDIT_ARCH_* of syscall. */
+ } _sigsys;
} _sifields;
} siginfo_t;
@@ -123,6 +131,9 @@ typedef struct
# define si_trapno _sifields._sigfault.si_trapno
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
+# define si_call_addr _sifields._sigsys._call_addr
+# define si_syscall _sifields._sigsys._syscall
+# define si_arch _sifields._sigsys._arch
/* Values for `si_code'. Positive values are reserved for kernel-generated
diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/makecontext.c b/libc/ports/sysdeps/unix/sysv/linux/tile/makecontext.c
index e3f66bccb..d7584e072 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/tile/makecontext.c
+++ b/libc/ports/sysdeps/unix/sysv/linux/tile/makecontext.c
@@ -61,7 +61,7 @@ __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
/* Set the return address to trampoline. */
ucp->uc_mcontext.lr = (long) __startcontext;
- /* Pass ucp->uc_link to __start_context in r30. */
+ /* Pass ucp->uc_link to __startcontext in r30. */
ucp->uc_mcontext.gregs[30] = (long) ucp->uc_link;
}
weak_alias (__makecontext, makecontext)
diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/setcontext.S b/libc/ports/sysdeps/unix/sysv/linux/tile/setcontext.S
index f95ad7cca..587097e90 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/tile/setcontext.S
+++ b/libc/ports/sysdeps/unix/sysv/linux/tile/setcontext.S
@@ -196,6 +196,9 @@ ENTRY (__startcontext)
move r0, r30
jal __setcontext
}
-1: j HIDDEN_JUMPTARGET(exit)
+1: {
+ movei r0, 0
+ j HIDDEN_JUMPTARGET(exit)
+ }
END (__startcontext)
.hidden __startcontext
diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/sys/ptrace.h b/libc/ports/sysdeps/unix/sysv/linux/tile/sys/ptrace.h
index 702f19e41..820d94cda 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/tile/sys/ptrace.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/tile/sys/ptrace.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
@@ -107,7 +107,8 @@ enum __ptrace_request
/* Options set using PTRACE_SETOPTIONS. */
-enum __ptrace_setoptions {
+enum __ptrace_setoptions
+{
PTRACE_O_TRACESYSGOOD = 0x00000001,
PTRACE_O_TRACEFORK = 0x00000002,
PTRACE_O_TRACEVFORK = 0x00000004,
@@ -115,17 +116,20 @@ enum __ptrace_setoptions {
PTRACE_O_TRACEEXEC = 0x00000010,
PTRACE_O_TRACEVFORKDONE = 0x00000020,
PTRACE_O_TRACEEXIT = 0x00000040,
- PTRACE_O_MASK = 0x0000007f
+ PTRACE_O_TRACESECCOMP = 0x00000080,
+ PTRACE_O_MASK = 0x000000ff
};
/* Wait extended result codes for the above trace options. */
-enum __ptrace_eventcodes {
+enum __ptrace_eventcodes
+{
PTRACE_EVENT_FORK = 1,
PTRACE_EVENT_VFORK = 2,
PTRACE_EVENT_CLONE = 3,
PTRACE_EVENT_EXEC = 4,
PTRACE_EVENT_VFORK_DONE = 5,
- PTRACE_EVENT_EXIT = 6
+ PTRACE_EVENT_EXIT = 6,
+ PTRACE_EVENT_SECCOMP = 7
};
/* Perform process tracing functions. REQUEST is one of the values
diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/c++-types.data b/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/c++-types.data
new file mode 100644
index 000000000..1a7bcb38d
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/c++-types.data
@@ -0,0 +1,67 @@
+blkcnt64_t:x
+blkcnt_t:l
+blksize_t:i
+caddr_t:Pc
+clockid_t:i
+clock_t:l
+daddr_t:i
+dev_t:y
+fd_mask:l
+fsblkcnt64_t:y
+fsblkcnt_t:m
+fsfilcnt64_t:y
+fsfilcnt_t:m
+fsid_t:8__fsid_t
+gid_t:j
+id_t:j
+ino64_t:y
+ino_t:m
+int16_t:s
+int32_t:i
+int64_t:x
+int8_t:a
+intptr_t:i
+key_t:i
+loff_t:x
+mode_t:j
+nlink_t:j
+off64_t:x
+off_t:l
+pid_t:i
+pthread_attr_t:14pthread_attr_t
+pthread_barrier_t:17pthread_barrier_t
+pthread_barrierattr_t:21pthread_barrierattr_t
+pthread_cond_t:14pthread_cond_t
+pthread_condattr_t:18pthread_condattr_t
+pthread_key_t:j
+pthread_mutex_t:15pthread_mutex_t
+pthread_mutexattr_t:19pthread_mutexattr_t
+pthread_once_t:i
+pthread_rwlock_t:16pthread_rwlock_t
+pthread_rwlockattr_t:20pthread_rwlockattr_t
+pthread_spinlock_t:i
+pthread_t:m
+quad_t:x
+register_t:x
+rlim64_t:y
+rlim_t:m
+sigset_t:10__sigset_t
+size_t:j
+socklen_t:j
+ssize_t:i
+suseconds_t:l
+time_t:l
+u_char:h
+uid_t:j
+uint:j
+u_int:j
+u_int16_t:t
+u_int32_t:j
+u_int64_t:y
+u_int8_t:h
+ulong:m
+u_long:m
+u_quad_t:y
+useconds_t:j
+ushort:t
+u_short:t
diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist b/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist
index eed3b4937..48f0c69eb 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist
+++ b/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist
@@ -2080,3 +2080,6 @@ GLIBC_2.16
mbrtoc16 F
mbrtoc32 F
timespec_get F
+GLIBC_2.17
+ GLIBC_2.17 A
+ secure_getenv F
diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/c++-types.data b/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/c++-types.data
new file mode 100644
index 000000000..ac925ccb3
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/c++-types.data
@@ -0,0 +1,67 @@
+blkcnt64_t:l
+blkcnt_t:l
+blksize_t:i
+caddr_t:Pc
+clockid_t:i
+clock_t:l
+daddr_t:i
+dev_t:m
+fd_mask:l
+fsblkcnt64_t:m
+fsblkcnt_t:m
+fsfilcnt64_t:m
+fsfilcnt_t:m
+fsid_t:8__fsid_t
+gid_t:j
+id_t:j
+ino64_t:m
+ino_t:m
+int16_t:s
+int32_t:i
+int64_t:l
+int8_t:a
+intptr_t:l
+key_t:i
+loff_t:l
+mode_t:j
+nlink_t:j
+off64_t:l
+off_t:l
+pid_t:i
+pthread_attr_t:14pthread_attr_t
+pthread_barrier_t:17pthread_barrier_t
+pthread_barrierattr_t:21pthread_barrierattr_t
+pthread_cond_t:14pthread_cond_t
+pthread_condattr_t:18pthread_condattr_t
+pthread_key_t:j
+pthread_mutex_t:15pthread_mutex_t
+pthread_mutexattr_t:19pthread_mutexattr_t
+pthread_once_t:i
+pthread_rwlock_t:16pthread_rwlock_t
+pthread_rwlockattr_t:20pthread_rwlockattr_t
+pthread_spinlock_t:i
+pthread_t:m
+quad_t:l
+register_t:l
+rlim64_t:m
+rlim_t:m
+sigset_t:10__sigset_t
+size_t:m
+socklen_t:j
+ssize_t:l
+suseconds_t:l
+time_t:l
+u_char:h
+uid_t:j
+uint:j
+u_int:j
+u_int16_t:t
+u_int32_t:j
+u_int64_t:m
+u_int8_t:h
+ulong:m
+u_long:m
+u_quad_t:m
+useconds_t:j
+ushort:t
+u_short:t
diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist b/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist
index 2dbce23ec..3aa70a100 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist
+++ b/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist
@@ -2080,3 +2080,6 @@ GLIBC_2.16
mbrtoc16 F
mbrtoc32 F
timespec_get F
+GLIBC_2.17
+ GLIBC_2.17 A
+ secure_getenv F
diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/c++-types.data b/libc/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/c++-types.data
new file mode 100644
index 000000000..303f4570c
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/c++-types.data
@@ -0,0 +1,67 @@
+blkcnt64_t:x
+blkcnt_t:l
+blksize_t:i
+caddr_t:Pc
+clockid_t:i
+clock_t:l
+daddr_t:i
+dev_t:y
+fd_mask:l
+fsblkcnt64_t:y
+fsblkcnt_t:m
+fsfilcnt64_t:y
+fsfilcnt_t:m
+fsid_t:8__fsid_t
+gid_t:j
+id_t:j
+ino64_t:y
+ino_t:m
+int16_t:s
+int32_t:i
+int64_t:x
+int8_t:a
+intptr_t:i
+key_t:i
+loff_t:x
+mode_t:j
+nlink_t:j
+off64_t:x
+off_t:l
+pid_t:i
+pthread_attr_t:14pthread_attr_t
+pthread_barrier_t:17pthread_barrier_t
+pthread_barrierattr_t:21pthread_barrierattr_t
+pthread_cond_t:14pthread_cond_t
+pthread_condattr_t:18pthread_condattr_t
+pthread_key_t:j
+pthread_mutex_t:15pthread_mutex_t
+pthread_mutexattr_t:19pthread_mutexattr_t
+pthread_once_t:i
+pthread_rwlock_t:16pthread_rwlock_t
+pthread_rwlockattr_t:20pthread_rwlockattr_t
+pthread_spinlock_t:i
+pthread_t:m
+quad_t:x
+register_t:i
+rlim64_t:y
+rlim_t:m
+sigset_t:10__sigset_t
+size_t:j
+socklen_t:j
+ssize_t:i
+suseconds_t:l
+time_t:l
+u_char:h
+uid_t:j
+uint:j
+u_int:j
+u_int16_t:t
+u_int32_t:j
+u_int64_t:y
+u_int8_t:h
+ulong:m
+u_long:m
+u_quad_t:y
+useconds_t:j
+ushort:t
+u_short:t
diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist b/libc/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist
index eed3b4937..48f0c69eb 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist
+++ b/libc/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist
@@ -2080,3 +2080,6 @@ GLIBC_2.16
mbrtoc16 F
mbrtoc32 F
timespec_get F
+GLIBC_2.17
+ GLIBC_2.17 A
+ secure_getenv F