summaryrefslogtreecommitdiff
path: root/libc/ports/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'libc/ports/sysdeps')
-rw-r--r--libc/ports/sysdeps/aarch64/dl-tlsdesc.S2
-rw-r--r--libc/ports/sysdeps/aarch64/dl-tlsdesc.h2
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_ceil.c21
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_ceilf.c21
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_floor.c21
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_floorf.c21
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_fma.c47
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_fmaf.c22
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_fmax.c21
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_fmaxf.c23
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_fmin.c49
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_fminf.c22
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_frint.c49
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_frintf.c24
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_llrint.c21
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_llrintf.c23
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_llround.c21
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_llroundf.c23
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_lrint.c53
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_lrintf.c22
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_lround.c51
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_lroundf.c22
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_nearbyint.c21
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_nearbyintf.c21
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_rint.c21
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_rintf.c21
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_round.c21
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_roundf.c21
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_trunc.c21
-rw-r--r--libc/ports/sysdeps/aarch64/fpu/s_truncf.c21
-rw-r--r--libc/ports/sysdeps/aarch64/libm-test-ulps45
-rw-r--r--libc/ports/sysdeps/aarch64/tlsdesc.c2
-rw-r--r--libc/ports/sysdeps/alpha/fpu/libm-test-ulps250
-rw-r--r--libc/ports/sysdeps/alpha/sotruss-lib.c50
-rw-r--r--libc/ports/sysdeps/arm/configure3
-rw-r--r--libc/ports/sysdeps/arm/configure.in3
-rw-r--r--libc/ports/sysdeps/arm/fesetenv.c10
-rw-r--r--libc/ports/sysdeps/arm/libm-test-ulps436
-rw-r--r--libc/ports/sysdeps/hppa/__longjmp.S71
-rw-r--r--libc/ports/sysdeps/hppa/__longjmp.c83
-rw-r--r--libc/ports/sysdeps/hppa/bits/setjmp.h39
-rw-r--r--libc/ports/sysdeps/hppa/fpu/fegetround.c13
-rw-r--r--libc/ports/sysdeps/hppa/fpu/feholdexcpt.c4
-rw-r--r--libc/ports/sysdeps/hppa/fpu/fesetenv.c2
-rw-r--r--libc/ports/sysdeps/hppa/fpu/fpu_control.h66
-rw-r--r--libc/ports/sysdeps/hppa/get-rounding-mode.h (renamed from libc/ports/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c)26
-rw-r--r--libc/ports/sysdeps/hppa/setjmp.S8
-rw-r--r--libc/ports/sysdeps/m68k/dl-machine.h4
-rw-r--r--libc/ports/sysdeps/m68k/dl-trampoline.S2
-rw-r--r--libc/ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps162
-rw-r--r--libc/ports/sysdeps/m68k/m680x0/fpu/s_atan.c6
-rw-r--r--libc/ports/sysdeps/m68k/m680x0/fpu/s_ccosh.c5
-rw-r--r--libc/ports/sysdeps/m68k/m680x0/fpu/s_cexp.c5
-rw-r--r--libc/ports/sysdeps/m68k/m680x0/fpu/s_csin.c5
-rw-r--r--libc/ports/sysdeps/m68k/m680x0/fpu/s_csinh.c5
-rw-r--r--libc/ports/sysdeps/m68k/m680x0/fpu/s_expm1.c4
-rw-r--r--libc/ports/sysdeps/m68k/m680x0/fpu/s_frexp.c6
-rw-r--r--libc/ports/sysdeps/m68k/m680x0/fpu/s_isinf.c5
-rw-r--r--libc/ports/sysdeps/m68k/m680x0/fpu/s_lrint.c6
-rw-r--r--libc/ports/sysdeps/m68k/m680x0/fpu/s_modf.c6
-rw-r--r--libc/ports/sysdeps/m68k/m680x0/fpu/s_remquo.c5
-rw-r--r--libc/ports/sysdeps/m68k/m680x0/fpu/s_scalbn.c11
-rw-r--r--libc/ports/sysdeps/m68k/m680x0/fpu/s_sin.c4
-rw-r--r--libc/ports/sysdeps/m68k/m680x0/fpu/s_sincos.c6
-rw-r--r--libc/ports/sysdeps/m68k/sotruss-lib.c51
-rw-r--r--libc/ports/sysdeps/mips/bits/atomic.h6
-rw-r--r--libc/ports/sysdeps/mips/dl-machine.h2
-rw-r--r--libc/ports/sysdeps/mips/jmpbuf-unwind.h10
-rw-r--r--libc/ports/sysdeps/mips/mips32/libm-test-ulps436
-rw-r--r--libc/ports/sysdeps/mips/mips64/libm-test-ulps863
-rw-r--r--libc/ports/sysdeps/mips/mips64/n32/_itoa.h4
-rw-r--r--libc/ports/sysdeps/mips/sotruss-lib.c117
-rw-r--r--libc/ports/sysdeps/powerpc/nofpu/libm-test-ulps735
-rw-r--r--libc/ports/sysdeps/tile/bits/byteswap.h4
-rw-r--r--libc/ports/sysdeps/tile/libm-test-ulps34
-rw-r--r--libc/ports/sysdeps/tile/s_fma.c4
-rw-r--r--libc/ports/sysdeps/tile/s_fmaf.c4
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/aarch64/dl-cache.h45
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/aarch64/nptl/lowlevellock.h2
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/arm/Makefile23
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/hppa/____longjmp_chk.c47
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/hppa/bits/socket.h444
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/hppa/bits/socket_type.h55
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/hppa/mmap.c4
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c4
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h14
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h10
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c4
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h56
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h6
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/sendfile64.c1
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list2
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h48
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/mips/register-dump.h41
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h14
95 files changed, 4374 insertions, 823 deletions
diff --git a/libc/ports/sysdeps/aarch64/dl-tlsdesc.S b/libc/ports/sysdeps/aarch64/dl-tlsdesc.S
index 0e590518f..b78a096e5 100644
--- a/libc/ports/sysdeps/aarch64/dl-tlsdesc.S
+++ b/libc/ports/sysdeps/aarch64/dl-tlsdesc.S
@@ -1,6 +1,6 @@
/* Thread-local storage handling in the ELF dynamic linker.
AArch64 version.
- Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/libc/ports/sysdeps/aarch64/dl-tlsdesc.h b/libc/ports/sysdeps/aarch64/dl-tlsdesc.h
index 514e4ecfb..3e2eaa0a8 100644
--- a/libc/ports/sysdeps/aarch64/dl-tlsdesc.h
+++ b/libc/ports/sysdeps/aarch64/dl-tlsdesc.h
@@ -1,6 +1,6 @@
/* Thread-local storage descriptor handling in the ELF dynamic linker.
AArch64 version.
- Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_ceil.c b/libc/ports/sysdeps/aarch64/fpu/s_ceil.c
new file mode 100644
index 000000000..5010c4f79
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_ceil.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC ceil
+#define INSN "frintp"
+#include <s_frint.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_ceilf.c b/libc/ports/sysdeps/aarch64/fpu/s_ceilf.c
new file mode 100644
index 000000000..e7f47361f
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_ceilf.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC ceilf
+#define INSN "frintp"
+#include <s_frintf.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_floor.c b/libc/ports/sysdeps/aarch64/fpu/s_floor.c
new file mode 100644
index 000000000..26b79b447
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_floor.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC floor
+#define INSN "frintm"
+#include <s_frint.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_floorf.c b/libc/ports/sysdeps/aarch64/fpu/s_floorf.c
new file mode 100644
index 000000000..1b7e01908
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_floorf.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC floorf
+#define INSN "frintm"
+#include <s_frintf.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_fma.c b/libc/ports/sysdeps/aarch64/fpu/s_fma.c
index 8f6260587..c3b2344f7 100644
--- a/libc/ports/sysdeps/aarch64/fpu/s_fma.c
+++ b/libc/ports/sysdeps/aarch64/fpu/s_fma.c
@@ -1,2 +1,45 @@
-/* Always use dbl-64 version because long double is emulated in software. */
-#include <sysdeps/ieee754/dbl-64/s_fma.c>
+/* Copyright (C) 1996-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 <math.h>
+
+#ifndef FUNC
+# define FUNC fma
+#endif
+
+#ifndef TYPE
+# define TYPE double
+# define REGS "d"
+#else
+# ifndef REGS
+# error REGS not defined
+# endif
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+TYPE
+__CONCATX(__,FUNC) (TYPE x, TYPE y, TYPE z)
+{
+ TYPE result;
+ asm ( "fmadd" "\t%" REGS "0, %" REGS "1, %" REGS "2, %" REGS "3"
+ : "=w" (result) : "w" (x), "w" (y), "w" (z) );
+ return result;
+}
+
+weak_alias (__CONCATX(__,FUNC), FUNC)
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_fmaf.c b/libc/ports/sysdeps/aarch64/fpu/s_fmaf.c
new file mode 100644
index 000000000..016d7bd64
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_fmaf.c
@@ -0,0 +1,22 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC fmaf
+#define TYPE float
+#define REGS "s"
+#include <s_fma.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_fmax.c b/libc/ports/sysdeps/aarch64/fpu/s_fmax.c
new file mode 100644
index 000000000..40804cc46
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_fmax.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC fmax
+#define INSN "fmaxnm"
+#include <s_fmin.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_fmaxf.c b/libc/ports/sysdeps/aarch64/fpu/s_fmaxf.c
new file mode 100644
index 000000000..ed282bbda
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_fmaxf.c
@@ -0,0 +1,23 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC fmaxf
+#define INSN "fmaxnm"
+#define TYPE float
+#define REGS "s"
+#include <s_fmin.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_fmin.c b/libc/ports/sysdeps/aarch64/fpu/s_fmin.c
new file mode 100644
index 000000000..49ff9b365
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_fmin.c
@@ -0,0 +1,49 @@
+/* Copyright (C) 1996-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 <math.h>
+
+#ifndef FUNC
+# define FUNC fmin
+#endif
+
+#ifndef INSN
+# define INSN "fminnm"
+#endif
+
+#ifndef TYPE
+# define TYPE double
+# define REGS "d"
+#else
+# ifndef REGS
+# error REGS not defined
+# endif
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+TYPE
+__CONCATX(__,FUNC) (TYPE x, TYPE y)
+{
+ TYPE result;
+ asm ( INSN "\t%" REGS "0, %" REGS "1, %" REGS "2"
+ : "=w" (result) : "w" (x), "w" (y) );
+ return result;
+}
+
+weak_alias (__CONCATX(__,FUNC), FUNC)
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_fminf.c b/libc/ports/sysdeps/aarch64/fpu/s_fminf.c
new file mode 100644
index 000000000..18b6ac026
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_fminf.c
@@ -0,0 +1,22 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC fminf
+#define TYPE float
+#define REGS "s"
+#include <s_fmin.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_frint.c b/libc/ports/sysdeps/aarch64/fpu/s_frint.c
new file mode 100644
index 000000000..69d9e2233
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_frint.c
@@ -0,0 +1,49 @@
+/* Copyright (C) 1996-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 <math.h>
+
+#ifndef FUNC
+# error FUNC not defined
+#endif
+
+#ifndef TYPE
+# define TYPE double
+# define REGS "d"
+#else
+# ifndef REGS
+# error REGS not defined
+# endif
+#endif
+
+#ifndef INSN
+# error INSN not defined
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+TYPE
+__CONCATX(__,FUNC) (TYPE x)
+{
+ TYPE result;
+ asm ( INSN "\t%" REGS "0, %" REGS "1" :
+ "=w" (result) : "w" (x) );
+ return result;
+}
+
+weak_alias (__CONCATX(__,FUNC), FUNC)
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_frintf.c b/libc/ports/sysdeps/aarch64/fpu/s_frintf.c
new file mode 100644
index 000000000..8d24dda83
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_frintf.c
@@ -0,0 +1,24 @@
+/* Copyright (C) 2011-2012 Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef FUNC
+# error FUNC not defined
+#endif
+#define TYPE float
+#define REGS "s"
+#include <s_frint.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_llrint.c b/libc/ports/sysdeps/aarch64/fpu/s_llrint.c
new file mode 100644
index 000000000..e46630381
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_llrint.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC llrint
+#define OTYPE long long int
+#include <s_lrint.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_llrintf.c b/libc/ports/sysdeps/aarch64/fpu/s_llrintf.c
new file mode 100644
index 000000000..352dc519d
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_llrintf.c
@@ -0,0 +1,23 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC llrintf
+#define ITYPE float
+#define IREGS "s"
+#define OTYPE long long int
+#include <s_lrint.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_llround.c b/libc/ports/sysdeps/aarch64/fpu/s_llround.c
new file mode 100644
index 000000000..6aa365b68
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_llround.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC llround
+#define OTYPE long long int
+#include <s_lround.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_llroundf.c b/libc/ports/sysdeps/aarch64/fpu/s_llroundf.c
new file mode 100644
index 000000000..98cf77e00
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_llroundf.c
@@ -0,0 +1,23 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC llroundf
+#define ITYPE float
+#define IREGS "s"
+#define OTYPE long long int
+#include <s_lround.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_lrint.c b/libc/ports/sysdeps/aarch64/fpu/s_lrint.c
new file mode 100644
index 000000000..ca26e09f9
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_lrint.c
@@ -0,0 +1,53 @@
+/* Copyright (C) 1996-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 <math.h>
+
+#ifndef FUNC
+# define FUNC lrint
+#endif
+
+#ifndef ITYPE
+# define ITYPE double
+# define IREGS "d"
+#else
+# ifndef IREGS
+# error IREGS not defined
+# endif
+#endif
+
+#ifndef OTYPE
+# define OTYPE long int
+#endif
+
+#define OREGS "x"
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+OTYPE
+__CONCATX(__,FUNC) (ITYPE x)
+{
+ OTYPE result;
+ ITYPE temp;
+ asm ( "frintx" "\t%" IREGS "1, %" IREGS "2\n\t"
+ "fcvtzs" "\t%" OREGS "0, %" IREGS "1"
+ : "=r" (result), "=w" (temp) : "w" (x) );
+ return result;
+}
+
+weak_alias (__CONCATX(__,FUNC), FUNC)
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_lrintf.c b/libc/ports/sysdeps/aarch64/fpu/s_lrintf.c
new file mode 100644
index 000000000..ff44650d7
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_lrintf.c
@@ -0,0 +1,22 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC lrintf
+#define ITYPE float
+#define IREGS "s"
+#include <s_lrint.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_lround.c b/libc/ports/sysdeps/aarch64/fpu/s_lround.c
new file mode 100644
index 000000000..83748ae39
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_lround.c
@@ -0,0 +1,51 @@
+/* Copyright (C) 1996-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 <math.h>
+
+#ifndef FUNC
+# define FUNC lround
+#endif
+
+#ifndef ITYPE
+# define ITYPE double
+# define IREGS "d"
+#else
+# ifndef IREGS
+# error IREGS not defined
+# endif
+#endif
+
+#ifndef OTYPE
+# define OTYPE long int
+#endif
+
+#define OREGS "x"
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+OTYPE
+__CONCATX(__,FUNC) (ITYPE x)
+{
+ OTYPE result;
+ asm ( "fcvtas" "\t%" OREGS "0, %" IREGS "1"
+ : "=r" (result) : "w" (x) );
+ return result;
+}
+
+weak_alias (__CONCATX(__,FUNC), FUNC)
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_lroundf.c b/libc/ports/sysdeps/aarch64/fpu/s_lroundf.c
new file mode 100644
index 000000000..eb553198c
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_lroundf.c
@@ -0,0 +1,22 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC lroundf
+#define ITYPE float
+#define IREGS "s"
+#include <s_lround.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_nearbyint.c b/libc/ports/sysdeps/aarch64/fpu/s_nearbyint.c
new file mode 100644
index 000000000..69eeccf30
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_nearbyint.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC nearbyint
+#define INSN "frinti"
+#include <s_frint.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_nearbyintf.c b/libc/ports/sysdeps/aarch64/fpu/s_nearbyintf.c
new file mode 100644
index 000000000..19b26601a
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_nearbyintf.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC nearbyintf
+#define INSN "frinti"
+#include <s_frintf.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_rint.c b/libc/ports/sysdeps/aarch64/fpu/s_rint.c
new file mode 100644
index 000000000..fad38d4fb
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_rint.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC rint
+#define INSN "frintx"
+#include <s_frint.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_rintf.c b/libc/ports/sysdeps/aarch64/fpu/s_rintf.c
new file mode 100644
index 000000000..54353b802
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_rintf.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC rintf
+#define INSN "frintx"
+#include <s_frintf.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_round.c b/libc/ports/sysdeps/aarch64/fpu/s_round.c
new file mode 100644
index 000000000..a566798ec
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_round.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC round
+#define INSN "frinta"
+#include <s_frint.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_roundf.c b/libc/ports/sysdeps/aarch64/fpu/s_roundf.c
new file mode 100644
index 000000000..4684206e1
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_roundf.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC roundf
+#define INSN "frinta"
+#include <s_frintf.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_trunc.c b/libc/ports/sysdeps/aarch64/fpu/s_trunc.c
new file mode 100644
index 000000000..767cb9fb2
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_trunc.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC trunc
+#define INSN "frintz"
+#include <s_frint.c>
diff --git a/libc/ports/sysdeps/aarch64/fpu/s_truncf.c b/libc/ports/sysdeps/aarch64/fpu/s_truncf.c
new file mode 100644
index 000000000..1c952f7f8
--- /dev/null
+++ b/libc/ports/sysdeps/aarch64/fpu/s_truncf.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2011-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/>. */
+
+#define FUNC truncf
+#define INSN "frintz"
+#include <s_frintf.c>
diff --git a/libc/ports/sysdeps/aarch64/libm-test-ulps b/libc/ports/sysdeps/aarch64/libm-test-ulps
index df308e87d..68e705ae1 100644
--- a/libc/ports/sysdeps/aarch64/libm-test-ulps
+++ b/libc/ports/sysdeps/aarch64/libm-test-ulps
@@ -102,6 +102,9 @@ float: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Test "atan2 (-max_value, -min_value) == -pi/2":
+float: 1
+ifloat: 1
Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
float: 1
ifloat: 1
@@ -2796,6 +2799,40 @@ double: 1
idouble: 1
ildouble: 1
ldouble: 1
+Test "y0 (0x1p-10) == -4.4865150767109739412411806297168793661098":
+ildouble: 1
+ldouble: 1
+Test "y0 (0x1p-110) == -4.861363632869203777249475899390797503250e+1":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "y0 (0x1p-20) == -8.8992283012125827603076426611387876938160":
+double: 1
+idouble: 1
+Test "y0 (0x1p-30) == -1.3311940304267782826037118027401817264906e+1":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "y0 (0x1p-40) == -1.7724652307320814696990854700366226762563e+1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "y0 (0x1p-60) == -2.6550076313426878432849115782108205929120e+1":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "y0 (0x1p-70) == -3.0962788316479910300778244424468159753887e+1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "y0 (0x1p-80) == -3.5375500319532942168707373066828113573541e+1":
+double: 1
+idouble: 1
Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
double: 2
float: 1
@@ -2837,6 +2874,14 @@ ldouble: 1
Test "y1 (0x1.27e204p+99) == -8.881610148467797208469612080785210013461e-16":
double: 1
idouble: 1
+Test "y1 (0x1p-10) == -6.5190099301063115047395187618929589514382e+02":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "y1 (0x1p-30) == -6.8356527557643159612937462812258975438856e+08":
+ildouble: 1
+ldouble: 1
Test "y1 (1.5) == -0.412308626973911295952829820633445323":
float: 1
ifloat: 1
diff --git a/libc/ports/sysdeps/aarch64/tlsdesc.c b/libc/ports/sysdeps/aarch64/tlsdesc.c
index 4190c48df..606ce797c 100644
--- a/libc/ports/sysdeps/aarch64/tlsdesc.c
+++ b/libc/ports/sysdeps/aarch64/tlsdesc.c
@@ -1,6 +1,6 @@
/* Manage TLS descriptors. AArch64 version.
- Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/libc/ports/sysdeps/alpha/fpu/libm-test-ulps b/libc/ports/sysdeps/alpha/fpu/libm-test-ulps
index a5d29412c..d546515ea 100644
--- a/libc/ports/sysdeps/alpha/fpu/libm-test-ulps
+++ b/libc/ports/sysdeps/alpha/fpu/libm-test-ulps
@@ -102,6 +102,9 @@ float: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Test "atan2 (-max_value, -min_value) == -pi/2":
+float: 1
+ifloat: 1
Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
float: 1
ifloat: 1
@@ -876,6 +879,9 @@ float: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Test "Real part of: clog (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -5.960464655174753498633255797994360530379e-8 + 7.888609052210118054117285652827862296732e-31 i":
+float: 1
+ifloat: 1
Test "Real part of: clog (0x1.000566p0 + 0x1.234p-10 i) == 8.298731898331237038231468223024422855654e-5 + 1.110938609507128729312743251313024793990e-3 i":
float: 1
ifloat: 1
@@ -903,6 +909,9 @@ ldouble: 1
Test "Real part of: clog (0x1.fp+16383 - 0x1p-16494 i) == 11356.49165759582936919077408168801636572 - 0 i":
ildouble: 1
ldouble: 1
+Test "Imaginary part of: clog (0x10673dd0f2481p-51 + 0x7ef1d17cefbd2p-51 i) == 3.2047474274603604594851472963586149973093e-29 + 1.4422922682185099608731642353544207976604 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i) == -744.0934983311012896593986823853525458290 + pi/4 i":
double: 1
idouble: 1
@@ -927,6 +936,50 @@ ldouble: 1
Test "Real part of: clog (0x1p-16494 - 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 - pi/2 i":
ildouble: 1
ldouble: 1
+Test "Imaginary part of: clog (0x2818p-15 + 0x798fp-15 i) == 1.5366822245016167178749091974664853785194e-08 + 1.2522014929038946066987318471922169174157 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x298c62cb546588a7p-63 + 0x7911b1dfcc4ecdaep-63 i) == -1.1931267660846218205882675852805793644095e-36 + 1.2402109774337032400594953899784058127412 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x2ede88p-23 + 0x771c3fp-23 i) == -4.4764192352906350039050902870893173560494e-13 + 1.1959106857549200806818600493552847793381 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x3f96469050f650869c2p-75 + 0x6f16b2c9c8b05988335p-75 i) == -1.0509738482436128031927971874674370984602e-45 + 1.0509191467640012308402149909370784281448 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x55cb6d0c83af5p-55 + 0x7fe33c0c7c4e90p-55 i) == -5.2000108498455368032511404449795741611813e-32 + 1.5288921536982513453421343495466824420259 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i) == 8.3076914081087805757422664530653247447136e-30 + 1.2072712126771536614482822173033535043206 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x659feap-24 + 0xeaf6f9p-24 i) == 3.7303493627403868207597214252239749960738e-14 + 1.1625816408046866464773042283673653469061 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x6771f22c64ed551b857c128b4cp-105 + 0x1f570e7a13cc3cf2f44fd793ea1p-105 i) == -1.4281333889622737316199756373421183559948e-62 + 1.3673546561165378090903506783353927980633 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x6b10b4f3520217b6p-64 + 0xe8893cbb449253a1p-64 i) == 2.4244570985709679851855191080208817099132e-37 + 1.1393074519572050614551047548718495655972 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x8ecbf810c4ae6p-52 + 0xd479468b09a37p-52 i) == -9.7375017988218644730510244778042114638107e-30 + 0.9790637929494922564724108399524154766631 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x9b57bp-20 + 0xcb7b4p-20 i) == -3.9563019528687610863490232935890272740908e-11 + 0.9187593477446338910857133065497364950682 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0xdb85c467ee2aadd5f425fe0f4b8dp-114 + 0x3e83162a0f95f1dcbf97dddf410eap-114 i) == 4.6017338806965821566734340588575402712716e-67 + 1.3547418904611758959096647942223384691728 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0xfd95243681c055c2632286921092p-113 + 0x1bccabcd29ca2152860ec29e34ef7p-113 i) == 6.6255694866654064502633121109394710807528e-66 + 1.0526409614996288387567810726095850312049 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0xfe961079616p-45 + 0x1bc37e09e6d1p-45 i) == 5.3718272201930019901317065495843842735179e-26 + 1.0503831592447830576186444373011142397404 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
@@ -1046,6 +1099,16 @@ ifloat: 1
Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
ildouble: 1
ldouble: 1
+Test "Real part of: clog10 (0x0.fffffffffffff8p0 + 0x0.fffffffffffff8p-1000 i) == -4.821637332766435821255375046554377090472e-17 + 4.053112396770095089737411317782466262176e-302 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -2.588596909321764128428416045209904492216e-8 + 3.425979381266895667295625489912064603415e-31 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
Test "Real part of: clog10 (0x1.00000000000000123456789abcp0 + 0x1.23456789p-1000 i) == 4.285899851347756186652871946325962330640e-19 + 4.611541215247321502041995872887317363241e-302 i":
ildouble: 1
ldouble: 1
@@ -1103,6 +1166,37 @@ ldouble: 1
Test "Real part of: clog10 (0x1.fp+16383 + 0x1p+16383 i) == 4932.112944269463028900262609694408579449 + 0.2069271710841128115912940666587802677383 i":
ildouble: 1
ldouble: 1
+Test "Real part of: clog10 (0x10673dd0f2481p-51 + 0x7ef1d17cefbd2p-51 i) == 1.3918041236396763648388478552321724382899e-29 + 0.6263795733790237053262025311642907438291 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x1415bcaf2105940d49a636e98ae59p-115 + 0x7e6a150adfcd1b0921d44b31f40f4p-115 i) == 1.1288799405048268615023706955013387413519e-67 + 0.6137587762850841972073301550420510507903 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x15cfbd1990d1ffp-53 + 0x176a3973e09a9ap-53 i) == 4.4163015461643576961232672330852798804976e-31 + 0.3564851427422832755956993418877523303529 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x164c74eea876p-45 + 0x16f393482f77p-45 i) == -1.3155760824064879362415202279780039150764e-26 + 0.3473590599762514228227328130640352044313 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1a6p-10 + 0x3a5p-10 i) == -6.2126412844802358329771948751248003038444e-07 + 0.4977135139537443711784513409096950995985 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x1df515eb171a808b9e400266p-95 + 0x7c71eb0cd4688dfe98581c77p-95 i) == -1.5221162575729652613635150540947625639689e-57 + 0.5795934880811949230121092882659698986043 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1df515eb171a808b9e400266p-95 + 0x7c71eb0cd4688dfe98581c77p-95 i) == -1.5221162575729652613635150540947625639689e-57 + 0.5795934880811949230121092882659698986043 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (0x1p-1073 + 0x1p-1073 i) == -322.8546703496198318667349645920187712089 + pi/4*log10(e) i":
double: 1
idouble: 1
@@ -1162,6 +1256,88 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+Test "Real part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x2dd46725bp-35 + 0x7783a1284p-35 i) == 1.9312741086596516918394613098872836703188e-20 + 0.5231613813514771042838490538484014771862 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x3f96469050f650869c2p-75 + 0x6f16b2c9c8b05988335p-75 i) == -4.5643214291682663316715446865040356750881e-46 + 0.4564083863660793840592614609053162690362 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x4447d7175p-35 + 0x6c445e00ap-35 i) == -6.4375803621988389731799033530075237868110e-21 + 0.4378257977686804492768642780897650927167 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x4d4ep-15 + 0x6605p-15 i) == -7.0781945783414996953799915941870192015212e-09 + 0.4005747524909781155537088181659175147564 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x4d9c37e2b5cb4533p-63 + 0x65c98be2385a042ep-63 i) == 2.7822833698845776001753149807484078521508e-37 + 0.3992725998539071066769046272515417679815 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x55cb6d0c83af5p-55 + 0x7fe33c0c7c4e90p-55 i) == -2.2583360179249556400630343805573865814771e-32 + 0.6639894257763289307423302343317622430835 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i) == 3.6079845358966994996207055940336690133424e-30 + 0.5243112258263349992771652393178033846555 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x602fd5037c4792efp-64 + 0xed3e2086dcca80b8p-64 i) == -1.0146400362652473358437501879334790111898e-37 + 0.5149047982335273098246594109614460842099 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x6241ef0da53f539f02fad67dabp-106 + 0x3fb46641182f7efd9caa769dac0p-106 i) == 1.8804859395820231849002915747252695375405e-63 + 0.6404513901551516189871978418046651877394 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x659feap-24 + 0xeaf6f9p-24 i) == 1.6200701438094619117335617123525612051457e-14 + 0.5049027913635038013499728086604870749732 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x659feap-24 + 0xeaf6f9p-24 i) == 1.6200701438094619117335617123525612051457e-14 + 0.5049027913635038013499728086604870749732 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x6b10b4f3520217b6p-64 + 0xe8893cbb449253a1p-64 i) == 1.0529283395205396881397407610630442563938e-37 + 0.4947949395762683446121140513971996916447 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x9b57bp-20 + 0xcb7b4p-20 i) == -1.7182001068739620267773842120965071561416e-11 + 0.3990121149225253562859800593935899629087 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0xdb85c467ee2aadd5f425fe0f4b8dp-114 + 0x3e83162a0f95f1dcbf97dddf410eap-114 i) == 1.9985076315737626043096596036300177494613e-67 + 0.5883569274304683249184005177865521205198 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0xfd95243681c055c2632286921092p-113 + 0x1bccabcd29ca2152860ec29e34ef7p-113 i) == 2.8774482675253468630312378575186855052697e-66 + 0.4571561610046221605554903008571429975493 i":
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: clog10 (0xfe961079616p-45 + 0x1bc37e09e6d1p-45 i) == 2.3329549194675052736016290082882121135546e-26 + 0.4561756099441139182878993697611751382976 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (1.0 + 0x1.234566p-10 i) == 2.680828048441605163181684680300513080769e-7 + 4.825491868832381486767558728169977751564e-4 i":
double: 1
idouble: 1
@@ -1564,6 +1740,7 @@ ldouble: 1
# csqrt
Test "Real part of: csqrt (-0x1.0000000000000000000000000001p-16382 - 0x1.0000000000000000000000000001p-16382 i) == 8.344545284118961663847948339519226074126e-2467 - 2.014551439675644900022606748976158925145e-2466 i":
+ildouble: 1
ldouble: 1
Test "Real part of: csqrt (-0x1.0000000000000002p-16382 - 0x1.0000000000000002p-16382 i) == 8.344545284118961664300307045791497724440e-2467 - 2.014551439675644900131815801350165472778e-2466 i":
ildouble: 1
@@ -1592,6 +1769,9 @@ ildouble: 1
ldouble: 1
Test "Imaginary part of: csqrt (0x1.0000000000000000000000000001p-16382 + 0x1.0000000000000000000000000001p-16382 i) == 2.014551439675644900022606748976158925145e-2466 + 8.344545284118961663847948339519226074126e-2":
ldouble: 1
+Test "Imaginary part of: csqrt (0x1.0000000000000000000000000001p-16382 + 0x1.0000000000000000000000000001p-16382 i) == 2.014551439675644900022606748976158925145e-2466 + 8.344545284118961663847948339519226074126e-2467 i":
+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
@@ -2347,15 +2527,38 @@ ildouble: 1
ldouble: 1
# pow
+Test "pow (0x0.fffffffffffff8p0, -0x1.23456789abcdfp62) == 9.8826311568054561811190162420900667121992e+252":
+ildouble: 1
+ldouble: 1
Test "pow (0x0.ffffffp0, -0x1p24) == 2.7182819094701610539628664526874952929416":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "pow (0x0.ffffffp0, 0x1p24) == 0.3678794302077803437135155590023422899744":
float: 1
ifloat: 1
Test "pow (0x1.000002p0, 0x1p24) == 7.3890552180866447284268641248075832310141":
float: 1
ifloat: 1
+Test "pow (10.0, -4930.0) == 1e-4930":
+ildouble: 1
+ldouble: 1
+Test "pow (10.0, 4929.0) == 1e4929":
+ildouble: 1
+ldouble: 1
+Test "pow (10.0, 4930.0) == 1e4930":
+ildouble: 1
+ldouble: 1
+Test "pow (10.0, 4931.0) == 1e4931":
+ildouble: 1
+ldouble: 1
+Test "pow (10.0, 4932.0) == 1e4932":
+ildouble: 1
+ldouble: 1
+Test "pow (1e4932, 0.75) == 1e3699":
+ildouble: 1
+ldouble: 1
# pow_downward
Test "pow_downward (1.5, 1.03125) == 1.519127098714743184071644334163037684948":
@@ -2665,6 +2868,43 @@ double: 1
idouble: 1
ildouble: 1
ldouble: 1
+Test "y0 (0x1p-10) == -4.4865150767109739412411806297168793661098":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "y0 (0x1p-110) == -4.861363632869203777249475899390797503250e+1":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "y0 (0x1p-20) == -8.8992283012125827603076426611387876938160":
+float: 1
+ifloat: 1
+Test "y0 (0x1p-30) == -1.3311940304267782826037118027401817264906e+1":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "y0 (0x1p-40) == -1.7724652307320814696990854700366226762563e+1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "y0 (0x1p-50) == -2.2137364310373846564919987139743760738155e+1":
+float: 1
+ifloat: 1
+Test "y0 (0x1p-60) == -2.6550076313426878432849115782108205929120e+1":
+ildouble: 1
+ldouble: 1
+Test "y0 (0x1p-70) == -3.0962788316479910300778244424468159753887e+1":
+double: 1
+idouble: 1
+Test "y0 (0x1p-80) == -3.5375500319532942168707373066828113573541e+1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
double: 2
float: 1
@@ -2701,6 +2941,14 @@ ldouble: 1
Test "y1 (0x1.27e204p+99) == -8.881610148467797208469612080785210013461e-16":
double: 1
idouble: 1
+Test "y1 (0x1p-10) == -6.5190099301063115047395187618929589514382e+02":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "y1 (0x1p-30) == -6.8356527557643159612937462812258975438856e+08":
+ildouble: 1
+ldouble: 1
Test "y1 (1.5) == -0.412308626973911295952829820633445323":
float: 1
ifloat: 1
@@ -3397,6 +3645,8 @@ ldouble: 1
Function: "pow":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: "pow_downward":
float: 1
diff --git a/libc/ports/sysdeps/alpha/sotruss-lib.c b/libc/ports/sysdeps/alpha/sotruss-lib.c
new file mode 100644
index 000000000..0405c0a4e
--- /dev/null
+++ b/libc/ports/sysdeps/alpha/sotruss-lib.c
@@ -0,0 +1,50 @@
+/* Override generic sotruss-lib.c to define actual functions for Alpha.
+ 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/>. */
+
+#define HAVE_ARCH_PLTENTER
+#define HAVE_ARCH_PLTEXIT
+
+#include <elf/sotruss-lib.c>
+
+ElfW(Addr)
+la_alpha_gnu_pltenter (ElfW(Sym) *sym __attribute__ ((unused)),
+ unsigned int ndx __attribute__ ((unused)),
+ uintptr_t *refcook, uintptr_t *defcook,
+ La_alpha_regs *regs, unsigned int *flags,
+ const char *symname, long int *framesizep)
+{
+ print_enter (refcook, defcook, symname,
+ regs->lr_r16, regs->lr_r17, regs->lr_r18, *flags);
+
+ /* No need to copy anything, we will not need the parameters in any case. */
+ *framesizep = 0;
+
+ return sym->st_value;
+}
+
+unsigned int
+la_alpha_gnu_pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
+ uintptr_t *defcook,
+ const struct La_alpha_regs *inregs,
+ struct La_alpha_retval *outregs, const char *symname)
+{
+ print_exit (refcook, defcook, symname, outregs->lrv_r0);
+
+ return 0;
+}
diff --git a/libc/ports/sysdeps/arm/configure b/libc/ports/sysdeps/arm/configure
index 385f29590..91239cdf3 100644
--- a/libc/ports/sysdeps/arm/configure
+++ b/libc/ports/sysdeps/arm/configure
@@ -197,4 +197,7 @@ $as_echo "$libc_cv_arm_pcs_vfp" >&6; }
if test $libc_cv_arm_pcs_vfp = yes; then
$as_echo "#define HAVE_ARM_PCS_VFP 1" >>confdefs.h
+ echo "default-abi := hard" > default-abi.make
+else
+ echo "default-abi := soft" > default-abi.make
fi
diff --git a/libc/ports/sysdeps/arm/configure.in b/libc/ports/sysdeps/arm/configure.in
index 7e9133259..6073d0ee8 100644
--- a/libc/ports/sysdeps/arm/configure.in
+++ b/libc/ports/sysdeps/arm/configure.in
@@ -40,4 +40,7 @@ AC_CACHE_CHECK([whether the compiler is using the ARM hard-float ABI],
], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)])
if test $libc_cv_arm_pcs_vfp = yes; then
AC_DEFINE(HAVE_ARM_PCS_VFP)
+ echo "default-abi := hard" > default-abi.make
+else
+ echo "default-abi := soft" > default-abi.make
fi
diff --git a/libc/ports/sysdeps/arm/fesetenv.c b/libc/ports/sysdeps/arm/fesetenv.c
index 2fad61da1..e92f9f5ac 100644
--- a/libc/ports/sysdeps/arm/fesetenv.c
+++ b/libc/ports/sysdeps/arm/fesetenv.c
@@ -40,6 +40,16 @@ __fesetenv (const fenv_t *envp)
_FPU_SETCW (temp);
+ if (envp == FE_NOMASK_ENV)
+ {
+ /* VFPv3 and VFPv4 do not support trapping exceptions, so
+ test whether the relevant bits were set and fail if
+ not. */
+ _FPU_GETCW (temp);
+ if ((temp & _FPU_IEEE) != _FPU_IEEE)
+ return 1;
+ }
+
/* Success. */
return 0;
}
diff --git a/libc/ports/sysdeps/arm/libm-test-ulps b/libc/ports/sysdeps/arm/libm-test-ulps
index 51356dddb..e0c7e0d47 100644
--- a/libc/ports/sysdeps/arm/libm-test-ulps
+++ b/libc/ports/sysdeps/arm/libm-test-ulps
@@ -72,6 +72,9 @@ ifloat: 1
Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
float: 1
ifloat: 1
+Test "atan2 (-max_value, -min_value) == -pi/2":
+float: 1
+ifloat: 1
Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
float: 1
ifloat: 1
@@ -519,7 +522,43 @@ float: 2
ifloat: 2
# clog
-Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 2.649094276923003995420209214900915462737e-10 + 3.141592653589793238462643383279502884197 i":
+double: 1
+idouble: 1
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 2.649094282537168795982991778475646793277e-10 + 3.141592652530155111500161671113150737892 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog (-0x1.234566p-40 - 1.0 i) == 5.354083939753840089583620652120903838944e-25 - 1.570796326795931422008642456283782656359 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 (-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 (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -5.960464655174753498633255797994360530379e-8 + 7.888609052210118054117285652827862296732e-31 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (0x1.000566p0 + 0x1.234p-10 i) == 8.298731898331237038231468223024422855654e-5 + 1.110938609507128729312743251313024793990e-3 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":
@@ -528,6 +567,18 @@ 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
+Test "Imaginary part of: clog (0x2818p-15 + 0x798fp-15 i) == 1.5366822245016167178749091974664853785194e-08 + 1.2522014929038946066987318471922169174157 i":
+float: 1
+ifloat: 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":
@@ -536,6 +587,49 @@ ifloat: 1
Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 2
+idouble: 2
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i":
+double: 2
+idouble: 2
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 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+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 (-1.0 + 0x1.234566p-20 i) == 2.556638434669064077889576526006849923281e-13 + 1.364375882602207106407956770293808181427 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
double: 1
idouble: 1
@@ -563,24 +657,142 @@ ifloat: 1
Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
-Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
+Test "Real part of: clog10 (0x0.fffffffffffff8p0 + 0x0.fffffffffffff8p-1000 i) == -4.821637332766435821255375046554377090472e-17 + 4.053112396770095089737411317782466262176e-302 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -2.588596909321764128428416045209904492216e-8 + 3.425979381266895667295625489912064603415e-31 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-100 i) == 3.577293486783822178310971763308187385546e-5 + 3.897399639875661463735636919790792140598e-31 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.234566p-30 + 1.0 i) == 2.438200411482400072282924063740535840474e-19 + 6.821881764607257184291586401763604544928e-1 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.234566p-50 + 1.0 i) == 2.217530356103816369479108963807448194409e-31 + 6.821881769209202348667823902864283966959e-1 i":
float: 1
ifloat: 1
+Test "Imaginary part of: clog10 (0x1.234566p-60 + 1.0 i) == 2.114801746467415208319767917450504756866e-37 + 6.821881769209206733143018621078368211515e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "Imaginary part of: clog10 (0x1.fffffep+127 + 0x1.fffffep+127 i) == 38.68235441693561449174780668781319348761 + pi/4*log10(e) i":
float: 1
ifloat: 1
Test "Real part of: clog10 (0x1.fffffep+127 + 1.0 i) == 38.53183941910362389414093724045094697423 + 1.276276851248440096917018665609900318458e-39 i":
float: 1
ifloat: 1
+Test "Real part of: clog10 (0x10673dd0f2481p-51 + 0x7ef1d17cefbd2p-51 i) == 1.3918041236396763648388478552321724382899e-29 + 0.6263795733790237053262025311642907438291 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x164c74eea876p-45 + 0x16f393482f77p-45 i) == -1.3155760824064879362415202279780039150764e-26 + 0.3473590599762514228227328130640352044313 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1a6p-10 + 0x3a5p-10 i) == -6.2126412844802358329771948751248003038444e-07 + 0.4977135139537443711784513409096950995985 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 "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 (0x1p-509 + 1.0 i) == 7.730698388614835910296270976605350994446e-308 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-510 + 1.0 i) == 1.932674597153708977574067744151337748612e-308 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-511 + 1.0 i) == 4.831686492884272443935169360378344371529e-309 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-61 + 1.0 i) == 4.084085680564517578238994467153626207224e-38 + 6.821881769209206735545466044044889962925e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-62 + 1.0 i) == 1.021021420141129394559748616788406551878e-38 + 6.821881769209206736487192085600834406988e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-63 + 1.0 i) == 2.552553550352823486399371541971016379740e-39 + 6.821881769209206736958055106378806629019e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog10 (0x2dd46725bp-35 + 0x7783a1284p-35 i) == 1.9312741086596516918394613098872836703188e-20 + 0.5231613813514771042838490538484014771862 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x4447d7175p-35 + 0x6c445e00ap-35 i) == -6.4375803621988389731799033530075237868110e-21 + 0.4378257977686804492768642780897650927167 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i) == 3.6079845358966994996207055940336690133424e-30 + 0.5243112258263349992771652393178033846555 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x9b57bp-20 + 0xcb7b4p-20 i) == -1.7182001068739620267773842120965071561416e-11 + 0.3990121149225253562859800593935899629087 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0xfe961079616p-45 + 0x1bc37e09e6d1p-45 i) == 2.3329549194675052736016290082882121135546e-26 + 0.4561756099441139182878993697611751382976 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (1.0 + 0x1.234566p-10 i) == 2.680828048441605163181684680300513080769e-7 + 4.825491868832381486767558728169977751564e-4 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
float: 1
ifloat: 1
@@ -595,6 +807,12 @@ float: 1
ifloat: 1
# cos
+Test "cos (0x1p+120) == -9.25879022854837867303861764107414946730833e-01":
+float: 1
+ifloat: 1
+Test "cos (0x1p+127) == 7.81914638714960072263910298466369236613162e-01":
+float: 1
+ifloat: 1
Test "cos (M_PI_6l * 2.0) == 0.5":
double: 1
idouble: 1
@@ -689,9 +907,6 @@ ifloat: 1
Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
float: 1
ifloat: 1
-Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
-float: 1
-ifloat: 1
Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
double: 1
float: 4
@@ -784,12 +999,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
@@ -823,6 +1044,47 @@ Test "Real part of: ctan (0x3.243f6cp-1 + 0 i) == -2.287733242885645987394874673
float: 1
ifloat: 1
+# ctan_downward
+Test "Real part of: ctan_downward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "Imaginary part of: ctan_downward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+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
+
+# ctan_towardzero
+Test "Real part of: ctan_towardzero (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ctan_towardzero (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+
+# ctan_upward
+Test "Real part of: ctan_upward (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+double: 1
+idouble: 1
+Test "Real part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "Imaginary part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
# ctanh
Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
double: 1
@@ -857,6 +1119,47 @@ Test "Real part of: ctanh (1 + 0x1p127 i) == 0.910133404767618376153287379442647
double: 1
idouble: 1
+# ctanh_downward
+Test "Real part of: ctanh_downward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ctanh_downward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 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
+
+# ctanh_towardzero
+Test "Real part of: ctanh_towardzero (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ctanh_towardzero (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+
+# ctanh_upward
+Test "Imaginary part of: ctanh_upward (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+double: 1
+idouble: 1
+Test "Real part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "Imaginary part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
# erf
Test "erf (1.25) == 0.922900128256458230136523481197281140":
double: 1
@@ -1215,6 +1518,12 @@ float: 1
ifloat: 1
# sincos
+Test "sincos (0x1p+120, &sin_res, &cos_res) puts -9.25879022854837867303861764107414946730833e-01 in cos_res":
+float: 1
+ifloat: 1
+Test "sincos (0x1p+127, &sin_res, &cos_res) puts 7.81914638714960072263910298466369236613162e-01 in cos_res":
+float: 1
+ifloat: 1
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
double: 1
idouble: 1
@@ -1322,6 +1631,34 @@ idouble: 1
Test "y0 (0x1.ff00000000002p+840) == 1.846591691699331493194965158699937660696e-127":
double: 1
idouble: 1
+Test "y0 (0x1p-10) == -4.4865150767109739412411806297168793661098":
+double: 1
+idouble: 1
+Test "y0 (0x1p-110) == -4.861363632869203777249475899390797503250e+1":
+double: 1
+idouble: 1
+Test "y0 (0x1p-20) == -8.8992283012125827603076426611387876938160":
+float: 1
+ifloat: 1
+Test "y0 (0x1p-30) == -1.3311940304267782826037118027401817264906e+1":
+float: 1
+ifloat: 1
+Test "y0 (0x1p-40) == -1.7724652307320814696990854700366226762563e+1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "y0 (0x1p-50) == -2.2137364310373846564919987139743760738155e+1":
+float: 1
+ifloat: 1
+Test "y0 (0x1p-70) == -3.0962788316479910300778244424468159753887e+1":
+double: 1
+idouble: 1
+Test "y0 (0x1p-80) == -3.5375500319532942168707373066828113573541e+1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
double: 2
float: 1
@@ -1348,6 +1685,9 @@ idouble: 1
Test "y1 (0x1.27e204p+99) == -8.881610148467797208469612080785210013461e-16":
double: 1
idouble: 1
+Test "y1 (0x1p-10) == -6.5190099301063115047395187618929589514382e+02":
+double: 1
+idouble: 1
Test "y1 (1.5) == -0.412308626973911295952829820633445323":
float: 1
ifloat: 1
@@ -1582,12 +1922,16 @@ float: 1
idouble: 1
ifloat: 1
-Function: Real part of "clog10":
-double: 1
+Function: Imaginary part of "clog":
float: 1
-idouble: 1
ifloat: 1
+Function: Real part of "clog10":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
Function: Imaginary part of "clog10":
double: 1
float: 1
@@ -1674,6 +2018,44 @@ Function: Imaginary part of "ctan":
double: 1
idouble: 1
+Function: Real part of "ctan_downward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: Imaginary part of "ctan_downward":
+float: 1
+ifloat: 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 "ctan_towardzero":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "ctan_towardzero":
+float: 1
+ifloat: 1
+
+Function: Real part of "ctan_upward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: Imaginary part of "ctan_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
Function: Real part of "ctanh":
double: 1
float: 1
@@ -1686,6 +2068,44 @@ float: 2
idouble: 1
ifloat: 2
+Function: Real part of "ctanh_downward":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "ctanh_downward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: Real part of "ctanh_tonearest":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "ctanh_tonearest":
+float: 1
+ifloat: 1
+
+Function: Real part of "ctanh_towardzero":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "ctanh_towardzero":
+float: 1
+ifloat: 1
+
+Function: Real part of "ctanh_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Imaginary part of "ctanh_upward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
Function: "erf":
double: 1
idouble: 1
diff --git a/libc/ports/sysdeps/hppa/__longjmp.S b/libc/ports/sysdeps/hppa/__longjmp.S
deleted file mode 100644
index 4ef219e41..000000000
--- a/libc/ports/sysdeps/hppa/__longjmp.S
+++ /dev/null
@@ -1,71 +0,0 @@
-/* longjmp for PA-RISC.
- Copyright (C) 1997, 1998 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>
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-
-/* __longjmp(jmpbuf, val) */
-
- .text
- .align 4
- .globl __longjmp
- .export __longjmp, code
- .proc
- .callinfo
-__longjmp:
- /* set return value */
- copy %r25, %r28
-
- ldw 0(%r26), %r3
- ldw 8(%r26), %r4
- ldw 12(%r26), %r5
- ldw 16(%r26), %r6
- ldw 20(%r26), %r7
- ldw 24(%r26), %r8
- ldw 28(%r26), %r9
- ldw 32(%r26), %r10
- ldw 36(%r26), %r11
- ldw 40(%r26), %r12
- ldw 44(%r26), %r13
- ldw 48(%r26), %r14
- ldw 52(%r26), %r15
- ldw 56(%r26), %r16
- ldw 60(%r26), %r17
- ldw 64(%r26), %r18
- ldw 68(%r26), %r19
- ldw 72(%r26), %r27
- ldw 76(%r26), %r30
-
- ldw 80(%r26), %rp
-
- ldo 88(%r26),%r20
- fldds,ma 8(%r20), %fr12
- fldds,ma 8(%r20), %fr13
- fldds,ma 8(%r20), %fr14
- fldds,ma 8(%r20), %fr15
- fldds,ma 8(%r20), %fr16
- fldds,ma 8(%r20), %fr17
- fldds,ma 8(%r20), %fr18
- fldds,ma 8(%r20), %fr19
- fldds,ma 8(%r20), %fr20
- fldds 0(%r20), %fr21
-
- bv,n %r0(%r2)
- .procend
diff --git a/libc/ports/sysdeps/hppa/__longjmp.c b/libc/ports/sysdeps/hppa/__longjmp.c
new file mode 100644
index 000000000..8ad51055f
--- /dev/null
+++ b/libc/ports/sysdeps/hppa/__longjmp.c
@@ -0,0 +1,83 @@
+/* longjmp for PA-RISC.
+ Copyright (C) 1997-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 <setjmp.h>
+#include <stdlib.h>
+
+/* Jump to the position specified by ENV, causing the
+ setjmp call there to return VAL, or 1 if VAL is 0. */
+void
+__longjmp (__jmp_buf env, int val)
+{
+ /* We must use one of the non-callee saves registers
+ for env. */
+ register unsigned long r26 asm ("r26") = (unsigned long)&env[0];
+
+#ifdef CHECK_SP
+ CHECK_SP (env[0].__jmp_buf.__sp);
+#endif
+
+ asm volatile(
+ /* Set return value. */
+ "copy %0, %%r28\n\t"
+ /* Load callee saves from r3 to r18. */
+ "ldw 0(%1), %%r3\n\t"
+ "ldw 8(%1), %%r4\n\t"
+ "ldw 12(%1), %%r5\n\t"
+ "ldw 16(%1), %%r6\n\t"
+ "ldw 20(%1), %%r7\n\t"
+ "ldw 24(%1), %%r8\n\t"
+ "ldw 28(%1), %%r9\n\t"
+ "ldw 32(%1), %%r10\n\t"
+ "ldw 36(%1), %%r11\n\t"
+ "ldw 40(%1), %%r12\n\t"
+ "ldw 44(%1), %%r13\n\t"
+ "ldw 48(%1), %%r14\n\t"
+ "ldw 52(%1), %%r15\n\t"
+ "ldw 56(%1), %%r16\n\t"
+ "ldw 60(%1), %%r17\n\t"
+ "ldw 64(%1), %%r18\n\t"
+ /* Load PIC register. */
+ "ldw 68(%1), %%r19\n\t"
+ /* Load static link register. */
+ "ldw 72(%1), %%r27\n\t"
+ /* Load stack pointer. */
+ "ldw 76(%1), %%r30\n\t"
+ /* Load return pointer. */
+ "ldw 80(%1), %%rp\n\t"
+ /* Ues a spare caller saves register. */
+ "ldo 88(%1),%%r20\n\t"
+ /* Load callee saves from fr12 to fr21. */
+ "fldds,ma 8(%%r20), %%fr12\n\t"
+ "fldds,ma 8(%%r20), %%fr13\n\t"
+ "fldds,ma 8(%%r20), %%fr14\n\t"
+ "fldds,ma 8(%%r20), %%fr15\n\t"
+ "fldds,ma 8(%%r20), %%fr16\n\t"
+ "fldds,ma 8(%%r20), %%fr17\n\t"
+ "fldds,ma 8(%%r20), %%fr18\n\t"
+ "fldds,ma 8(%%r20), %%fr19\n\t"
+ "fldds,ma 8(%%r20), %%fr20\n\t"
+ "fldds 0(%%r20), %%fr21\n\t"
+ /* Jump back to stored return address. */
+ "bv,n %%r0(%%r2)\n\t"
+ : /* No outputs. */
+ : "r" (val == 0 ? 1 : val), "r" (r26)
+ : /* No point in clobbers. */ );
+ /* Avoid `volatile function does return' warnings. */
+ for (;;);
+}
diff --git a/libc/ports/sysdeps/hppa/bits/setjmp.h b/libc/ports/sysdeps/hppa/bits/setjmp.h
index 19a0cfe62..7283cc16f 100644
--- a/libc/ports/sysdeps/hppa/bits/setjmp.h
+++ b/libc/ports/sysdeps/hppa/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2000-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
@@ -23,13 +23,38 @@
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
-/* The previous bits/setjmp.h had __jmp_buf defined as a structure.
- We use an array of 'double' instead, to make writing the assembler
- easier, and to ensure proper alignment. Naturally, user code should
- not depend on either representation. */
-
#ifndef _ASM
-typedef double __jmp_buf[21];
+/* The entire jump buffer must be 168 bytes long and laid
+ out in exactly as follows for ABI consistency.
+ * 20 x 32-bit gprs, with 8-bytes of padding, arranged so:
+ - r3 (callee saves)
+ - 4 bytes of padding.
+ - r4-r18 (callee saves)
+ - r19 (PIC register)
+ - r27 (static link register)
+ - r30 (stcack pointer)
+ - r2 (return pointer)
+ - 4 bytes of padding.
+ * 10 x 64-bit fprs in this order:
+ - fr12-fr21 (callee saves)
+ Note: We have 8 bytes of free space for future uses. */
+typedef union
+ {
+ struct __jmp_buf_internal_tag
+ {
+ int __r3;
+ int __pad0;
+ int __r4_r18[15];
+ int __r19;
+ int __r27;
+ int __sp;
+ int __rp;
+ int __pad1;
+ double __fr12_fr21[10];
+ } __jmp_buf;
+ /* Legacy definition. Ensures double alignment for fpsrs. */
+ double __align[21];
+ } __jmp_buf[1];
#endif
#endif /* bits/setjmp.h */
diff --git a/libc/ports/sysdeps/hppa/fpu/fegetround.c b/libc/ports/sysdeps/hppa/fpu/fegetround.c
index 70d2e476f..d603e66f1 100644
--- a/libc/ports/sysdeps/hppa/fpu/fegetround.c
+++ b/libc/ports/sysdeps/hppa/fpu/fegetround.c
@@ -1,5 +1,5 @@
/* Return current rounding direction.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Huggins-Daines <dhd@debian.org>, 2000
@@ -17,17 +17,10 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-#include <fenv.h>
+#include <get-rounding-mode.h>
int
fegetround (void)
{
- union { unsigned long long l; unsigned int sw[2] } s;
-
- /* Get the current status word. */
- __asm__ ("fstd %%fr0,0(%1) \n\t"
- "fldd 0(%1),%%fr0 \n\t"
- : "=m" (s.l) : "r" (&s.l));
-
- return (s.sw[0] & FE_DOWNWARD);
+ return get_rounding_mode ();
}
diff --git a/libc/ports/sysdeps/hppa/fpu/feholdexcpt.c b/libc/ports/sysdeps/hppa/fpu/feholdexcpt.c
index 6e3cabd88..ad2b0d0b4 100644
--- a/libc/ports/sysdeps/hppa/fpu/feholdexcpt.c
+++ b/libc/ports/sysdeps/hppa/fpu/feholdexcpt.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment and clear exceptions.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Huggins-Daines <dhd@debian.org>, 2000
@@ -42,7 +42,7 @@ feholdexcept (fenv_t *envp)
/* Load the new environment. Note: fr0 must load last to enable T-bit
Thus we start bufptr at the end and work backwards */
- bufptr = (unsigned int)(clear.buf) + sizeof(unsigned int)*4;
+ bufptr = (unsigned long long *)((unsigned int)(clear.buf) + sizeof(unsigned int)*4);
__asm__ (
"fldd,mb -8(%0),%%fr0\n"
: : "r" (bufptr), "m" (clear) : "%r0");
diff --git a/libc/ports/sysdeps/hppa/fpu/fesetenv.c b/libc/ports/sysdeps/hppa/fpu/fesetenv.c
index e768bb2c3..7a09e4de7 100644
--- a/libc/ports/sysdeps/hppa/fpu/fesetenv.c
+++ b/libc/ports/sysdeps/hppa/fpu/fesetenv.c
@@ -40,7 +40,7 @@ fesetenv (const fenv_t *envp)
| (FE_ALL_EXCEPT << 27)
| FE_DOWNWARD);
if (envp == FE_DFL_ENV)
- ;
+ temp.env.__status_word = 0;
else if (envp == FE_NOMASK_ENV)
temp.env.__status_word |= FE_ALL_EXCEPT;
else
diff --git a/libc/ports/sysdeps/hppa/fpu/fpu_control.h b/libc/ports/sysdeps/hppa/fpu/fpu_control.h
new file mode 100644
index 000000000..60697975e
--- /dev/null
+++ b/libc/ports/sysdeps/hppa/fpu/fpu_control.h
@@ -0,0 +1,66 @@
+/* FPU control word definitions. HP-PARISC version.
+ 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/>. */
+
+#ifndef _FPU_CONTROL_H
+#define _FPU_CONTROL_H
+
+/* Masking of interrupts */
+#define _FPU_MASK_PM 0x00000001 /* Inexact (I) */
+#define _FPU_MASK_UM 0x00000002 /* Underflow (U) */
+#define _FPU_MASK_OM 0x00000004 /* Overflow (O) */
+#define _FPU_MASK_ZM 0x00000008 /* Divide by zero (Z) */
+#define _FPU_MASK_IM 0x00000010 /* Invalid operation (V) */
+
+/* Masking of rounding modes. */
+#define _FPU_HPPA_MASK_RM 0x00000600 /* Rounding mode mask */
+/* Masking of interrupt enable bits. */
+#define _FPU_HPPA_MASK_INT 0x0000001f /* Interrupt mask */
+
+/* There are no reserved bits in the PA fpsr (though some are undefined). */
+#define _FPU_RESERVED 0x00000000
+/* Default is: No traps enabled, no flags set, round to nearest. */
+#define _FPU_DEFAULT 0x00000000
+/* Default + exceptions (FE_ALL_EXCEPT) enabled. */
+#define _FPU_IEEE (_FPU_DEFAULT | _FPU_HPPA_MASK_INT)
+
+/* Type of the control word. */
+typedef unsigned int fpu_control_t;
+
+/* Macros for accessing the hardware control word. */
+#define _FPU_GETCW(cw) \
+({ \
+ union { unsigned long long __fpreg; unsigned int __halfreg[2]; } __fullfp; \
+ /* Get the current status word. */ \
+ __asm__ ("fstd %%fr0,0(%1)\n\t" \
+ "fldd 0(%1),%%fr0\n\t" \
+ : "=m" (__fullfp.__fpreg) : "r" (&__fullfp.__fpreg) : "%r0"); \
+ __fullfp.__halfreg[0]; \
+})
+
+#define _FPU_SETCW(cw) \
+({ \
+ union { unsigned long long __fpreg; unsigned int __halfreg[2]; } __fullfp; \
+ __fullfp.__halfreg[0] = cw; \
+ __asm__ ("fldd 0(%1),%%fr0\n\t" \
+ : : "m" (__fullfp.__fpreg), "r" (__fullfp.__fpreg) : "%r0" ); \
+})
+
+/* Default control word set at startup. */
+extern fpu_control_t __fpu_control;
+
+#endif /* _FPU_CONTROL_H */
diff --git a/libc/ports/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c b/libc/ports/sysdeps/hppa/get-rounding-mode.h
index 1289d1f74..16e56719f 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c
+++ b/libc/ports/sysdeps/hppa/get-rounding-mode.h
@@ -1,5 +1,5 @@
-/* clock_getcpuclockid -- Get a clockid_t for process CPU time. Linux/IA64
- Copyright (C) 2000,2001,2003,2004 Free Software Foundation, Inc.
+/* Determine floating-point rounding mode within libc. HP-PARISC version.
+ 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
@@ -16,16 +16,20 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <errno.h>
-#include <time.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <fcntl.h>
+#ifndef _HPPA_GET_ROUNDING_MODE_H
+#define _HPPA_GET_ROUNDING_MODE_H 1
+#include <fenv.h>
+#include <fpu_control.h>
-#include "has_cpuclock.c"
+/* Return the floating-point rounding mode. */
-#define HAS_CPUCLOCK (has_cpuclock () > 0)
+static inline int
+get_rounding_mode (void)
+{
+ fpu_control_t fc;
+ _FPU_GETCW (fc);
+ return fc & _FPU_HPPA_MASK_RM;
+}
-#include <sysdeps/unix/sysv/linux/clock_getcpuclockid.c>
+#endif /* get-rounding-mode.h */
diff --git a/libc/ports/sysdeps/hppa/setjmp.S b/libc/ports/sysdeps/hppa/setjmp.S
index 146e4d194..0f05fd995 100644
--- a/libc/ports/sysdeps/hppa/setjmp.S
+++ b/libc/ports/sysdeps/hppa/setjmp.S
@@ -1,5 +1,5 @@
/* setjmp for HPPA.
- Copyright (C) 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1995-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
@@ -31,6 +31,8 @@
.callinfo
__sigsetjmp:
stw %r3, 0(%r26)
+ /* This padding exists for unknown historical reasons. */
+ /* 4 - 4 bytes of padding. */
stw %r4, 8(%r26)
stw %r5, 12(%r26)
stw %r6, 16(%r26)
@@ -51,7 +53,8 @@ __sigsetjmp:
stw %r30, 76(%r26)
stw %rp, 80(%r26)
-
+ /* This padding exists to ensure double alignment for fprs. */
+ /* 84 - 4 bytes of padding. */
ldo 88(%r26),%r1
fstds,ma %fr12, 8(%r1) /* 88 */
fstds,ma %fr13, 8(%r1) /* 96 */
@@ -63,6 +66,7 @@ __sigsetjmp:
fstds,ma %fr19, 8(%r1) /* 144 */
fstds,ma %fr20, 8(%r1) /* 152 */
fstds %fr21, 0(%r1) /* 160 */
+ /* Total of 168 bytes. */
b __sigjmp_save
nop
.procend
diff --git a/libc/ports/sysdeps/m68k/dl-machine.h b/libc/ports/sysdeps/m68k/dl-machine.h
index 4a1968c4f..b2914192d 100644
--- a/libc/ports/sysdeps/m68k/dl-machine.h
+++ b/libc/ports/sysdeps/m68k/dl-machine.h
@@ -1,6 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. m68k version.
- Copyright (C) 1996-2001, 2002, 2003, 2004, 2005, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 1996-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
@@ -107,6 +106,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
}
#define ELF_MACHINE_RUNTIME_FIXUP_ARGS long int save_a0, long int save_a1
+#define ELF_MACHINE_RUNTIME_FIXUP_PARAMS save_a0, save_a1
/* Mask identifying addresses reserved for the user program,
diff --git a/libc/ports/sysdeps/m68k/dl-trampoline.S b/libc/ports/sysdeps/m68k/dl-trampoline.S
index 14bf8ed0a..01b00a699 100644
--- a/libc/ports/sysdeps/m68k/dl-trampoline.S
+++ b/libc/ports/sysdeps/m68k/dl-trampoline.S
@@ -130,7 +130,7 @@ _dl_runtime_profile:
#ifdef __mcoldfire__
tst.l %d1
beq 2f
-1: move.l (%a0)+, (%a1)+
+1: move.l (%a1)+, (%a0)+
subq.l #4,%d1
bne 1b
2:
diff --git a/libc/ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps b/libc/ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps
index 54d690990..a9e67a989 100644
--- a/libc/ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps
+++ b/libc/ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps
@@ -675,6 +675,12 @@ ldouble: 1
Test "Imaginary part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
ildouble: 1
ldouble: 1
+Test "Real part of: clog (0x0.ffffffffffffffffp0 + 0x0.ffffffffffffffffp-15000 i) == -5.421010862427522170184200798202494495630e-20 + 3.548665303440282824232502561095699343814e-4516 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -5.960464655174753498633255797994360530379e-8 + 7.888609052210118054117285652827862296732e-31 i":
+float: 1
+ifloat: 1
Test "Imaginary part of: clog (0x1.000566p0 + 0x1.234p-10 i) == 8.298731898331237038231468223024422855654e-5 + 1.110938609507128729312743251313024793990e-3 i":
ildouble: 1
ldouble: 1
@@ -687,6 +693,30 @@ ldouble: 1
Test "Imaginary part of: clog (0x1.fp+16383 + 0x1p+16383 i) == 11356.60974243783798653123798337822335902 + 0.4764674194737066993385333770295162295856 i":
ildouble: 1
ldouble: 1
+Test "Imaginary part of: clog (0x11682p-23 + 0x7ffed1p-23 i) == 1.1723955140027907954461000991619077811832e-12 + 1.5622968405332756349813737986164832897108 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x2dd46725bp-35 + 0x7783a1284p-35 i) == 4.4469229730850767799109418892826021157328e-20 + 1.2046235979300843056806465045930070146351 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i) == 8.3076914081087805757422664530653247447136e-30 + 1.2072712126771536614482822173033535043206 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x602fd5037c4792efp-64 + 0xed3e2086dcca80b8p-64 i) == -2.3362950222592964220878638677292132852104e-37 + 1.1856121127236268105413184264288408265852 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x6b10b4f3520217b6p-64 + 0xe8893cbb449253a1p-64 i) == 2.4244570985709679851855191080208817099132e-37 + 1.1393074519572050614551047548718495655972 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x8ecbf810c4ae6p-52 + 0xd479468b09a37p-52 i) == -9.7375017988218644730510244778042114638107e-30 + 0.9790637929494922564724108399524154766631 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0xa1f2c1p-24 + 0xc643aep-24 i) == -1.0480505352462576151523512837107080269981e-13 + 0.8858771987699967480545613322309315260313 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0xa4722f19346cp-51 + 0x7f9631c5e7f07p-51 i) == -6.2122796286154679676173624516405339768606e-30 + 1.4904138780720095276446375492434049214172 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
@@ -755,6 +785,17 @@ double: 1
idouble: 1
ildouble: 2
ldouble: 2
+Test "Real part of: clog10 (0x0.fffffffffffff8p0 + 0x0.fffffffffffff8p-1000 i) == -4.821637332766435821255375046554377090472e-17 + 4.053112396770095089737411317782466262176e-302 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x0.ffffffffffffffffp0 + 0x0.ffffffffffffffffp-15000 i) == -2.354315103889861110220423157644627849164e-20 + 1.541165759405643564697852372112893034397e-4516 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -2.588596909321764128428416045209904492216e-8 + 3.425979381266895667295625489912064603415e-31 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
double: 1
idouble: 1
@@ -769,9 +810,87 @@ 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 "Real part of: clog10 (0x10673dd0f2481p-51 + 0x7ef1d17cefbd2p-51 i) == 1.3918041236396763648388478552321724382899e-29 + 0.6263795733790237053262025311642907438291 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x1a6p-10 + 0x3a5p-10 i) == -6.2126412844802358329771948751248003038444e-07 + 0.4977135139537443711784513409096950995985 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 "Real part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x2dd46725bp-35 + 0x7783a1284p-35 i) == 1.9312741086596516918394613098872836703188e-20 + 0.5231613813514771042838490538484014771862 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x4447d7175p-35 + 0x6c445e00ap-35 i) == -6.4375803621988389731799033530075237868110e-21 + 0.4378257977686804492768642780897650927167 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x4447d7175p-35 + 0x6c445e00ap-35 i) == -6.4375803621988389731799033530075237868110e-21 + 0.4378257977686804492768642780897650927167 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x4d4ep-15 + 0x6605p-15 i) == -7.0781945783414996953799915941870192015212e-09 + 0.4005747524909781155537088181659175147564 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i) == 3.6079845358966994996207055940336690133424e-30 + 0.5243112258263349992771652393178033846555 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x659b70ab7971bp-53 + 0x1f5d111e08abecp-53 i) == -1.0893543813872082317104059174982092534059e-30 + 0.5954257879188711495921161433751775633232 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x659feap-24 + 0xeaf6f9p-24 i) == 1.6200701438094619117335617123525612051457e-14 + 0.5049027913635038013499728086604870749732 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x6b10b4f3520217b6p-64 + 0xe8893cbb449253a1p-64 i) == 1.0529283395205396881397407610630442563938e-37 + 0.4947949395762683446121140513971996916447 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x81b7efa81fc35ad1p-65 + 0x1ef4b835f1c79d812p-65 i) == -4.3074341162203896332989394770760901408798e-39 + 0.5709443672155660428417571212549720987784 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x8ecbf810c4ae6p-52 + 0xd479468b09a37p-52 i) == -4.2289432987513243393180377141513840878196e-30 + 0.4252020027092323591068799049905597805296 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x8ecbf810c4ae6p-52 + 0xd479468b09a37p-52 i) == -4.2289432987513243393180377141513840878196e-30 + 0.4252020027092323591068799049905597805296 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0xa1f2c1p-24 + 0xc643aep-24 i) == -4.5516256421319921959681423447271490869664e-14 + 0.3847315790697197749315054516562206543710 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0xa4722f19346cp-51 + 0x7f9631c5e7f07p-51 i) == -2.6979587627476803379953050733225113494503e-30 + 0.6472785229986997177606324374555347813105 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0xfe961079616p-45 + 0x1bc37e09e6d1p-45 i) == 2.3329549194675052736016290082882121135546e-26 + 0.4561756099441139182878993697611751382976 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (1.0 + 0x1.234566p-10 i) == 2.680828048441605163181684680300513080769e-7 + 4.825491868832381486767558728169977751564e-4 i":
ildouble: 1
ldouble: 1
@@ -2191,6 +2310,46 @@ float: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Test "y0 (0x1p-10) == -4.4865150767109739412411806297168793661098":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "y0 (0x1p-100) == -4.420092432563900590456563035154802121284e+1":
+float: 1
+ifloat: 1
+Test "y0 (0x1p-110) == -4.861363632869203777249475899390797503250e+1":
+float: 1
+ifloat: 1
+Test "y0 (0x1p-20) == -8.8992283012125827603076426611387876938160":
+float: 1
+ifloat: 1
+Test "y0 (0x1p-30) == -1.3311940304267782826037118027401817264906e+1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "y0 (0x1p-40) == -1.7724652307320814696990854700366226762563e+1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "y0 (0x1p-60) == -2.6550076313426878432849115782108205929120e+1":
+double: 1
+idouble: 1
+Test "y0 (0x1p-70) == -3.0962788316479910300778244424468159753887e+1":
+double: 1
+idouble: 1
+Test "y0 (0x1p-80) == -3.5375500319532942168707373066828113573541e+1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "y0 (0x1p-90) == -3.9788212322585974036636501709188067393195e+1":
+float: 1
+ifloat: 1
Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
ildouble: 1
ldouble: 1
@@ -2227,6 +2386,9 @@ idouble: 1
ifloat: 2
ildouble: 1
ldouble: 1
+Test "y1 (0x1p-10) == -6.5190099301063115047395187618929589514382e+02":
+float: 1
+ifloat: 1
Test "y1 (1.0) == -0.781212821300288716547150000047964821":
double: 1
idouble: 1
diff --git a/libc/ports/sysdeps/m68k/m680x0/fpu/s_atan.c b/libc/ports/sysdeps/m68k/m680x0/fpu/s_atan.c
index a7d8a296b..c7bba83f3 100644
--- a/libc/ports/sysdeps/m68k/m680x0/fpu/s_atan.c
+++ b/libc/ports/sysdeps/m68k/m680x0/fpu/s_atan.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996-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
@@ -32,6 +32,4 @@ __CONCATX(__,FUNC) (x)
{
return __m81_u(__CONCATX(__,FUNC))(x);
}
-
-#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx (__CONCATX(__,FUNC), FUNC)
+weak_alias (__CONCATX(__,FUNC), FUNC)
diff --git a/libc/ports/sysdeps/m68k/m680x0/fpu/s_ccosh.c b/libc/ports/sysdeps/m68k/m680x0/fpu/s_ccosh.c
index b8360853f..40568208d 100644
--- a/libc/ports/sysdeps/m68k/m680x0/fpu/s_ccosh.c
+++ b/libc/ports/sysdeps/m68k/m680x0/fpu/s_ccosh.c
@@ -1,5 +1,5 @@
/* Complex cosine hyperbole function. m68k fpu version
- Copyright (C) 1997, 1999, 2010, 2012 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
@@ -73,5 +73,4 @@ s(__ccosh) (__complex__ float_type x)
return retval;
}
-#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx (s(__ccosh), s(ccosh))
+weak_alias (s(__ccosh), s(ccosh))
diff --git a/libc/ports/sysdeps/m68k/m680x0/fpu/s_cexp.c b/libc/ports/sysdeps/m68k/m680x0/fpu/s_cexp.c
index c2a9f1d22..83750b643 100644
--- a/libc/ports/sysdeps/m68k/m680x0/fpu/s_cexp.c
+++ b/libc/ports/sysdeps/m68k/m680x0/fpu/s_cexp.c
@@ -1,5 +1,5 @@
/* Complex exponential function. m68k fpu version
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -133,5 +133,4 @@ s(__cexp) (__complex__ float_type x)
return retval;
}
-#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx (s(__cexp), s(cexp))
+weak_alias (s(__cexp), s(cexp))
diff --git a/libc/ports/sysdeps/m68k/m680x0/fpu/s_csin.c b/libc/ports/sysdeps/m68k/m680x0/fpu/s_csin.c
index dc468d40e..fb660867f 100644
--- a/libc/ports/sysdeps/m68k/m680x0/fpu/s_csin.c
+++ b/libc/ports/sysdeps/m68k/m680x0/fpu/s_csin.c
@@ -1,5 +1,5 @@
/* Complex sine function. m68k fpu version
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
@@ -64,5 +64,4 @@ s(__csin) (__complex__ float_type x)
return retval;
}
-#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx (s(__csin), s(csin))
+weak_alias (s(__csin), s(csin))
diff --git a/libc/ports/sysdeps/m68k/m680x0/fpu/s_csinh.c b/libc/ports/sysdeps/m68k/m680x0/fpu/s_csinh.c
index 29156586e..ffc2b000c 100644
--- a/libc/ports/sysdeps/m68k/m680x0/fpu/s_csinh.c
+++ b/libc/ports/sysdeps/m68k/m680x0/fpu/s_csinh.c
@@ -1,5 +1,5 @@
/* Complex sine hyperbole function. m68k fpu version
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
@@ -66,5 +66,4 @@ s(__csinh) (__complex__ float_type x)
return retval;
}
-#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx (s(__csinh), s(csinh))
+weak_alias (s(__csinh), s(csinh))
diff --git a/libc/ports/sysdeps/m68k/m680x0/fpu/s_expm1.c b/libc/ports/sysdeps/m68k/m680x0/fpu/s_expm1.c
index 6dac1cc1a..37793221a 100644
--- a/libc/ports/sysdeps/m68k/m680x0/fpu/s_expm1.c
+++ b/libc/ports/sysdeps/m68k/m680x0/fpu/s_expm1.c
@@ -38,6 +38,4 @@ CONCATX(__,FUNC) (float_type x)
__set_errno (ERANGE);
return __m81_u(CONCATX(__, FUNC)) (x);
}
-
-#define weak_aliasx(a, b) weak_alias(a, b)
-weak_aliasx (CONCATX(__, FUNC), FUNC)
+weak_alias (CONCATX(__, FUNC), FUNC)
diff --git a/libc/ports/sysdeps/m68k/m680x0/fpu/s_frexp.c b/libc/ports/sysdeps/m68k/m680x0/fpu/s_frexp.c
index b4493190f..df738407a 100644
--- a/libc/ports/sysdeps/m68k/m680x0/fpu/s_frexp.c
+++ b/libc/ports/sysdeps/m68k/m680x0/fpu/s_frexp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996-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
@@ -50,6 +50,4 @@ __CONCATX(__,FUNC) (float_type value, int *expptr)
: "0" (value), "dmi" (-iexponent));
return mantissa;
}
-
-#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx (__CONCATX(__,FUNC), FUNC)
+weak_alias (__CONCATX(__,FUNC), FUNC)
diff --git a/libc/ports/sysdeps/m68k/m680x0/fpu/s_isinf.c b/libc/ports/sysdeps/m68k/m680x0/fpu/s_isinf.c
index ff4d3b2b1..20872da53 100644
--- a/libc/ports/sysdeps/m68k/m680x0/fpu/s_isinf.c
+++ b/libc/ports/sysdeps/m68k/m680x0/fpu/s_isinf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996-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
@@ -35,5 +35,4 @@ __CONCATX(__,FUNC) (x)
#define hidden_defx(a) hidden_def(a)
hidden_defx(__CONCATX(__,FUNC))
-#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx (__CONCATX(__,FUNC), FUNC)
+weak_alias (__CONCATX(__,FUNC), FUNC)
diff --git a/libc/ports/sysdeps/m68k/m680x0/fpu/s_lrint.c b/libc/ports/sysdeps/m68k/m680x0/fpu/s_lrint.c
index da2ea53bb..443b05cea 100644
--- a/libc/ports/sysdeps/m68k/m680x0/fpu/s_lrint.c
+++ b/libc/ports/sysdeps/m68k/m680x0/fpu/s_lrint.c
@@ -1,6 +1,6 @@
/* Round argument to nearest integral value according to current rounding
direction.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -34,6 +34,4 @@ CONCATX(__lrint,suffix) (float_type x)
{
return __m81_u(CONCATX(__lrint,suffix)) (x);
}
-
-#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx (CONCATX(__lrint,suffix), CONCATX(lrint,suffix))
+weak_alias (CONCATX(__lrint,suffix), CONCATX(lrint,suffix))
diff --git a/libc/ports/sysdeps/m68k/m680x0/fpu/s_modf.c b/libc/ports/sysdeps/m68k/m680x0/fpu/s_modf.c
index 95bc0ef21..2520431df 100644
--- a/libc/ports/sysdeps/m68k/m680x0/fpu/s_modf.c
+++ b/libc/ports/sysdeps/m68k/m680x0/fpu/s_modf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996-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
@@ -50,6 +50,4 @@ s(__modf) (float_type x, float_type *iptr)
result = x - x_int;
return result;
}
-
-#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx(s(__modf), s(modf))
+weak_alias (s(__modf), s(modf))
diff --git a/libc/ports/sysdeps/m68k/m680x0/fpu/s_remquo.c b/libc/ports/sysdeps/m68k/m680x0/fpu/s_remquo.c
index 1395f7e01..0f052224e 100644
--- a/libc/ports/sysdeps/m68k/m680x0/fpu/s_remquo.c
+++ b/libc/ports/sysdeps/m68k/m680x0/fpu/s_remquo.c
@@ -1,5 +1,5 @@
/* Compute remainder and a congruent to the quotient. m68k fpu version
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -43,5 +43,4 @@ s(__remquo) (float_type x, float_type y, int *quo)
*quo = cquo;
return result;
}
-#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx (s(__remquo), s(remquo))
+weak_alias (s(__remquo), s(remquo))
diff --git a/libc/ports/sysdeps/m68k/m680x0/fpu/s_scalbn.c b/libc/ports/sysdeps/m68k/m680x0/fpu/s_scalbn.c
index 796aeb2b1..ce1b92a22 100644
--- a/libc/ports/sysdeps/m68k/m680x0/fpu/s_scalbn.c
+++ b/libc/ports/sysdeps/m68k/m680x0/fpu/s_scalbn.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996-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
@@ -45,9 +45,6 @@ __CONCATX(__scalbn,suffix) (x, exp)
{
return __m81_u(__CONCATX(__scalbn,suffix))(x, exp);
}
-
-#define weak_aliasx(a,b) weak_alias(a,b)
-#define strong_aliasx(a,b) strong_alias(a,b)
-weak_aliasx (__CONCATX(__scalbn,suffix), __CONCATX(scalbn,suffix))
-strong_aliasx (__CONCATX(__scalbn,suffix), __CONCATX(__scalbln,suffix))
-weak_aliasx (__CONCATX(__scalbn,suffix), __CONCATX(scalbln,suffix))
+weak_alias (__CONCATX(__scalbn,suffix), __CONCATX(scalbn,suffix))
+strong_alias (__CONCATX(__scalbn,suffix), __CONCATX(__scalbln,suffix))
+weak_alias (__CONCATX(__scalbn,suffix), __CONCATX(scalbln,suffix))
diff --git a/libc/ports/sysdeps/m68k/m680x0/fpu/s_sin.c b/libc/ports/sysdeps/m68k/m680x0/fpu/s_sin.c
index 4f9b65946..1ea3dda69 100644
--- a/libc/ports/sysdeps/m68k/m680x0/fpu/s_sin.c
+++ b/libc/ports/sysdeps/m68k/m680x0/fpu/s_sin.c
@@ -35,6 +35,4 @@ CONCATX(__,FUNC) (float_type x)
__set_errno (EDOM);
return __m81_u(CONCATX(__, FUNC)) (x);
}
-
-#define weak_aliasx(a, b) weak_alias(a, b)
-weak_aliasx (CONCATX(__, FUNC), FUNC)
+weak_alias (CONCATX(__, FUNC), FUNC)
diff --git a/libc/ports/sysdeps/m68k/m680x0/fpu/s_sincos.c b/libc/ports/sysdeps/m68k/m680x0/fpu/s_sincos.c
index 5e10db231..f7a40a370 100644
--- a/libc/ports/sysdeps/m68k/m680x0/fpu/s_sincos.c
+++ b/libc/ports/sysdeps/m68k/m680x0/fpu/s_sincos.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997-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
@@ -32,6 +32,4 @@ CONCATX(__,FUNC) (x, sinx, cosx)
{
__m81_u(CONCATX(__,FUNC))(x, sinx, cosx);
}
-
-#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx (CONCATX(__,FUNC), FUNC)
+weak_alias (CONCATX(__,FUNC), FUNC)
diff --git a/libc/ports/sysdeps/m68k/sotruss-lib.c b/libc/ports/sysdeps/m68k/sotruss-lib.c
new file mode 100644
index 000000000..6c9e552b2
--- /dev/null
+++ b/libc/ports/sysdeps/m68k/sotruss-lib.c
@@ -0,0 +1,51 @@
+/* Override generic sotruss-lib.c to define actual functions for m68k.
+ 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/>. */
+
+#define HAVE_ARCH_PLTENTER
+#define HAVE_ARCH_PLTEXIT
+
+#include <elf/sotruss-lib.c>
+
+ElfW(Addr)
+la_m68k_gnu_pltenter (Elf32_Sym *sym __attribute__ ((unused)),
+ unsigned int ndx __attribute__ ((unused)),
+ uintptr_t *refcook, uintptr_t *defcook,
+ La_m68k_regs *regs, unsigned int *flags,
+ const char *symname, long int *framesizep)
+{
+ unsigned long int *sp = (unsigned long int *) regs->lr_sp;
+
+ print_enter (refcook, defcook, symname, sp[1], sp[2], sp[3], *flags);
+
+ /* No need to copy anything, we will not need the parameters in any case. */
+ *framesizep = 0;
+
+ return sym->st_value;
+}
+
+unsigned int
+la_m68k_gnu_pltexit (Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook,
+ uintptr_t *defcook,
+ const struct La_m68k_regs *inregs,
+ struct La_m68k_retval *outregs,
+ const char *symname)
+{
+ print_exit (refcook, defcook, symname, outregs->lrv_d0);
+
+ return 0;
+}
diff --git a/libc/ports/sysdeps/mips/bits/atomic.h b/libc/ports/sysdeps/mips/bits/atomic.h
index c5a26b927..3466df749 100644
--- a/libc/ports/sysdeps/mips/bits/atomic.h
+++ b/libc/ports/sysdeps/mips/bits/atomic.h
@@ -209,10 +209,10 @@ typedef uintmax_t uatomic_max_t;
in which values are returned. */
# define __arch_compare_and_exchange_xxx_8_int(mem, newval, oldval, rel, acq) \
- (abort (), __prev = __cmp = 0)
+ (abort (), __prev = 0, __cmp = 0, (void) __cmp)
# define __arch_compare_and_exchange_xxx_16_int(mem, newval, oldval, rel, acq) \
- (abort (), __prev = __cmp = 0)
+ (abort (), __prev = 0, __cmp = 0, (void) __cmp)
# define __arch_compare_and_exchange_xxx_32_int(mem, newval, oldval, rel, acq) \
__asm__ __volatile__ ( \
@@ -236,7 +236,7 @@ typedef uintmax_t uatomic_max_t;
# 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) \
- (abort (), __prev = __cmp = 0)
+ (abort (), __prev = 0, __cmp = 0, (void) __cmp)
# else
# define __arch_compare_and_exchange_xxx_64_int(mem, newval, oldval, rel, acq) \
__asm__ __volatile__ ("\n" \
diff --git a/libc/ports/sysdeps/mips/dl-machine.h b/libc/ports/sysdeps/mips/dl-machine.h
index cc7da7625..9b970a26e 100644
--- a/libc/ports/sysdeps/mips/dl-machine.h
+++ b/libc/ports/sysdeps/mips/dl-machine.h
@@ -637,7 +637,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
#define RESOLVE_GOTSYM(sym,vernum,sym_index,reloc) \
({ \
const ElfW(Sym) *ref = sym; \
- const struct r_found_version *version \
+ const struct r_found_version *version __attribute__ ((unused)) \
= vernum ? &map->l_versions[vernum[sym_index] & 0x7fff] : NULL; \
struct link_map *sym_map; \
sym_map = RESOLVE_MAP (&ref, version, reloc); \
diff --git a/libc/ports/sysdeps/mips/jmpbuf-unwind.h b/libc/ports/sysdeps/mips/jmpbuf-unwind.h
index 31c9c8de7..355ca56f7 100644
--- a/libc/ports/sysdeps/mips/jmpbuf-unwind.h
+++ b/libc/ports/sysdeps/mips/jmpbuf-unwind.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2003-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
@@ -25,13 +25,15 @@
#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
((void *) (address) < (void *) demangle ((jmpbuf)[0].__sp))
-#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
- _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
+ _JMPBUF_UNWINDS_ADJ (_jmpbuf, \
+ (void *) (_Unwind_Ptr) _Unwind_GetCFA (_context), \
+ _adj)
static inline uintptr_t __attribute__ ((unused))
_jmpbuf_sp (__jmp_buf regs)
{
- uintptr_t sp = regs[0].__sp;
+ uintptr_t sp = (uintptr_t) regs[0].__sp;
#ifdef PTR_DEMANGLE
PTR_DEMANGLE (sp);
#endif
diff --git a/libc/ports/sysdeps/mips/mips32/libm-test-ulps b/libc/ports/sysdeps/mips/mips32/libm-test-ulps
index 51356dddb..e0c7e0d47 100644
--- a/libc/ports/sysdeps/mips/mips32/libm-test-ulps
+++ b/libc/ports/sysdeps/mips/mips32/libm-test-ulps
@@ -72,6 +72,9 @@ ifloat: 1
Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
float: 1
ifloat: 1
+Test "atan2 (-max_value, -min_value) == -pi/2":
+float: 1
+ifloat: 1
Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
float: 1
ifloat: 1
@@ -519,7 +522,43 @@ float: 2
ifloat: 2
# clog
-Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 2.649094276923003995420209214900915462737e-10 + 3.141592653589793238462643383279502884197 i":
+double: 1
+idouble: 1
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 2.649094282537168795982991778475646793277e-10 + 3.141592652530155111500161671113150737892 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog (-0x1.234566p-40 - 1.0 i) == 5.354083939753840089583620652120903838944e-25 - 1.570796326795931422008642456283782656359 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 (-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 (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -5.960464655174753498633255797994360530379e-8 + 7.888609052210118054117285652827862296732e-31 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (0x1.000566p0 + 0x1.234p-10 i) == 8.298731898331237038231468223024422855654e-5 + 1.110938609507128729312743251313024793990e-3 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":
@@ -528,6 +567,18 @@ 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
+Test "Imaginary part of: clog (0x2818p-15 + 0x798fp-15 i) == 1.5366822245016167178749091974664853785194e-08 + 1.2522014929038946066987318471922169174157 i":
+float: 1
+ifloat: 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":
@@ -536,6 +587,49 @@ ifloat: 1
Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 2
+idouble: 2
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i":
+double: 2
+idouble: 2
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 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+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 (-1.0 + 0x1.234566p-20 i) == 2.556638434669064077889576526006849923281e-13 + 1.364375882602207106407956770293808181427 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
double: 1
idouble: 1
@@ -563,24 +657,142 @@ ifloat: 1
Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
-Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
+Test "Real part of: clog10 (0x0.fffffffffffff8p0 + 0x0.fffffffffffff8p-1000 i) == -4.821637332766435821255375046554377090472e-17 + 4.053112396770095089737411317782466262176e-302 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -2.588596909321764128428416045209904492216e-8 + 3.425979381266895667295625489912064603415e-31 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-100 i) == 3.577293486783822178310971763308187385546e-5 + 3.897399639875661463735636919790792140598e-31 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.234566p-30 + 1.0 i) == 2.438200411482400072282924063740535840474e-19 + 6.821881764607257184291586401763604544928e-1 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.234566p-50 + 1.0 i) == 2.217530356103816369479108963807448194409e-31 + 6.821881769209202348667823902864283966959e-1 i":
float: 1
ifloat: 1
+Test "Imaginary part of: clog10 (0x1.234566p-60 + 1.0 i) == 2.114801746467415208319767917450504756866e-37 + 6.821881769209206733143018621078368211515e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "Imaginary part of: clog10 (0x1.fffffep+127 + 0x1.fffffep+127 i) == 38.68235441693561449174780668781319348761 + pi/4*log10(e) i":
float: 1
ifloat: 1
Test "Real part of: clog10 (0x1.fffffep+127 + 1.0 i) == 38.53183941910362389414093724045094697423 + 1.276276851248440096917018665609900318458e-39 i":
float: 1
ifloat: 1
+Test "Real part of: clog10 (0x10673dd0f2481p-51 + 0x7ef1d17cefbd2p-51 i) == 1.3918041236396763648388478552321724382899e-29 + 0.6263795733790237053262025311642907438291 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x164c74eea876p-45 + 0x16f393482f77p-45 i) == -1.3155760824064879362415202279780039150764e-26 + 0.3473590599762514228227328130640352044313 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1a6p-10 + 0x3a5p-10 i) == -6.2126412844802358329771948751248003038444e-07 + 0.4977135139537443711784513409096950995985 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 "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 (0x1p-509 + 1.0 i) == 7.730698388614835910296270976605350994446e-308 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-510 + 1.0 i) == 1.932674597153708977574067744151337748612e-308 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-511 + 1.0 i) == 4.831686492884272443935169360378344371529e-309 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-61 + 1.0 i) == 4.084085680564517578238994467153626207224e-38 + 6.821881769209206735545466044044889962925e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-62 + 1.0 i) == 1.021021420141129394559748616788406551878e-38 + 6.821881769209206736487192085600834406988e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-63 + 1.0 i) == 2.552553550352823486399371541971016379740e-39 + 6.821881769209206736958055106378806629019e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog10 (0x2dd46725bp-35 + 0x7783a1284p-35 i) == 1.9312741086596516918394613098872836703188e-20 + 0.5231613813514771042838490538484014771862 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x4447d7175p-35 + 0x6c445e00ap-35 i) == -6.4375803621988389731799033530075237868110e-21 + 0.4378257977686804492768642780897650927167 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i) == 3.6079845358966994996207055940336690133424e-30 + 0.5243112258263349992771652393178033846555 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x9b57bp-20 + 0xcb7b4p-20 i) == -1.7182001068739620267773842120965071561416e-11 + 0.3990121149225253562859800593935899629087 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0xfe961079616p-45 + 0x1bc37e09e6d1p-45 i) == 2.3329549194675052736016290082882121135546e-26 + 0.4561756099441139182878993697611751382976 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (1.0 + 0x1.234566p-10 i) == 2.680828048441605163181684680300513080769e-7 + 4.825491868832381486767558728169977751564e-4 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
float: 1
ifloat: 1
@@ -595,6 +807,12 @@ float: 1
ifloat: 1
# cos
+Test "cos (0x1p+120) == -9.25879022854837867303861764107414946730833e-01":
+float: 1
+ifloat: 1
+Test "cos (0x1p+127) == 7.81914638714960072263910298466369236613162e-01":
+float: 1
+ifloat: 1
Test "cos (M_PI_6l * 2.0) == 0.5":
double: 1
idouble: 1
@@ -689,9 +907,6 @@ ifloat: 1
Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
float: 1
ifloat: 1
-Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
-float: 1
-ifloat: 1
Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
double: 1
float: 4
@@ -784,12 +999,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
@@ -823,6 +1044,47 @@ Test "Real part of: ctan (0x3.243f6cp-1 + 0 i) == -2.287733242885645987394874673
float: 1
ifloat: 1
+# ctan_downward
+Test "Real part of: ctan_downward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "Imaginary part of: ctan_downward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+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
+
+# ctan_towardzero
+Test "Real part of: ctan_towardzero (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ctan_towardzero (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+
+# ctan_upward
+Test "Real part of: ctan_upward (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+double: 1
+idouble: 1
+Test "Real part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "Imaginary part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
# ctanh
Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
double: 1
@@ -857,6 +1119,47 @@ Test "Real part of: ctanh (1 + 0x1p127 i) == 0.910133404767618376153287379442647
double: 1
idouble: 1
+# ctanh_downward
+Test "Real part of: ctanh_downward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ctanh_downward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 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
+
+# ctanh_towardzero
+Test "Real part of: ctanh_towardzero (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ctanh_towardzero (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+
+# ctanh_upward
+Test "Imaginary part of: ctanh_upward (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+double: 1
+idouble: 1
+Test "Real part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "Imaginary part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
# erf
Test "erf (1.25) == 0.922900128256458230136523481197281140":
double: 1
@@ -1215,6 +1518,12 @@ float: 1
ifloat: 1
# sincos
+Test "sincos (0x1p+120, &sin_res, &cos_res) puts -9.25879022854837867303861764107414946730833e-01 in cos_res":
+float: 1
+ifloat: 1
+Test "sincos (0x1p+127, &sin_res, &cos_res) puts 7.81914638714960072263910298466369236613162e-01 in cos_res":
+float: 1
+ifloat: 1
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
double: 1
idouble: 1
@@ -1322,6 +1631,34 @@ idouble: 1
Test "y0 (0x1.ff00000000002p+840) == 1.846591691699331493194965158699937660696e-127":
double: 1
idouble: 1
+Test "y0 (0x1p-10) == -4.4865150767109739412411806297168793661098":
+double: 1
+idouble: 1
+Test "y0 (0x1p-110) == -4.861363632869203777249475899390797503250e+1":
+double: 1
+idouble: 1
+Test "y0 (0x1p-20) == -8.8992283012125827603076426611387876938160":
+float: 1
+ifloat: 1
+Test "y0 (0x1p-30) == -1.3311940304267782826037118027401817264906e+1":
+float: 1
+ifloat: 1
+Test "y0 (0x1p-40) == -1.7724652307320814696990854700366226762563e+1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "y0 (0x1p-50) == -2.2137364310373846564919987139743760738155e+1":
+float: 1
+ifloat: 1
+Test "y0 (0x1p-70) == -3.0962788316479910300778244424468159753887e+1":
+double: 1
+idouble: 1
+Test "y0 (0x1p-80) == -3.5375500319532942168707373066828113573541e+1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
double: 2
float: 1
@@ -1348,6 +1685,9 @@ idouble: 1
Test "y1 (0x1.27e204p+99) == -8.881610148467797208469612080785210013461e-16":
double: 1
idouble: 1
+Test "y1 (0x1p-10) == -6.5190099301063115047395187618929589514382e+02":
+double: 1
+idouble: 1
Test "y1 (1.5) == -0.412308626973911295952829820633445323":
float: 1
ifloat: 1
@@ -1582,12 +1922,16 @@ float: 1
idouble: 1
ifloat: 1
-Function: Real part of "clog10":
-double: 1
+Function: Imaginary part of "clog":
float: 1
-idouble: 1
ifloat: 1
+Function: Real part of "clog10":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
Function: Imaginary part of "clog10":
double: 1
float: 1
@@ -1674,6 +2018,44 @@ Function: Imaginary part of "ctan":
double: 1
idouble: 1
+Function: Real part of "ctan_downward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: Imaginary part of "ctan_downward":
+float: 1
+ifloat: 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 "ctan_towardzero":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "ctan_towardzero":
+float: 1
+ifloat: 1
+
+Function: Real part of "ctan_upward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: Imaginary part of "ctan_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
Function: Real part of "ctanh":
double: 1
float: 1
@@ -1686,6 +2068,44 @@ float: 2
idouble: 1
ifloat: 2
+Function: Real part of "ctanh_downward":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "ctanh_downward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: Real part of "ctanh_tonearest":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "ctanh_tonearest":
+float: 1
+ifloat: 1
+
+Function: Real part of "ctanh_towardzero":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "ctanh_towardzero":
+float: 1
+ifloat: 1
+
+Function: Real part of "ctanh_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Imaginary part of "ctanh_upward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
Function: "erf":
double: 1
idouble: 1
diff --git a/libc/ports/sysdeps/mips/mips64/libm-test-ulps b/libc/ports/sysdeps/mips/mips64/libm-test-ulps
index bc9464eb7..c7a18d666 100644
--- a/libc/ports/sysdeps/mips/mips64/libm-test-ulps
+++ b/libc/ports/sysdeps/mips/mips64/libm-test-ulps
@@ -77,6 +77,9 @@ float: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Test "atan2 (-max_value, -min_value) == -pi/2":
+float: 1
+ifloat: 1
Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
float: 1
ifloat: 1
@@ -118,8 +121,6 @@ ldouble: 2
Test "Imaginary part of: cacos (+0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "Imaginary part of: cacos (+0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i":
double: 1
float: 1
@@ -156,8 +157,6 @@ ldouble: 2
Test "Imaginary part of: cacos (-0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "Imaginary part of: cacos (-0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i":
double: 1
float: 1
@@ -202,8 +201,6 @@ ldouble: 1
Test "Real part of: cacosh (+0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "Real part of: cacosh (+0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i":
double: 1
float: 1
@@ -219,8 +216,6 @@ ldouble: 1
Test "Real part of: cacosh (+0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "Real part of: cacosh (+0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i":
double: 1
float: 1
@@ -236,8 +231,6 @@ ldouble: 1
Test "Real part of: cacosh (-0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "Real part of: cacosh (-0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i":
double: 1
float: 1
@@ -253,8 +246,6 @@ ldouble: 1
Test "Real part of: cacosh (-0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "Real part of: cacosh (-0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i":
double: 1
float: 1
@@ -276,13 +267,9 @@ idouble: 1
Test "Real part of: cacosh (-1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + pi i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "Real part of: cacosh (-1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - pi i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
float: 1
ifloat: 1
@@ -291,13 +278,9 @@ ldouble: 1
Test "Real part of: cacosh (1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + +0 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "Real part of: cacosh (1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - 0 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
# casin
Test "Imaginary part of: casin (+0 + 0.5 i) == +0 + 0.4812118250596034474977589134243684231352 i":
@@ -324,8 +307,6 @@ ldouble: 2
Test "Imaginary part of: casin (+0 - 0.5 i) == +0 - 0.4812118250596034474977589134243684231352 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "Imaginary part of: casin (+0 - 1.0 i) == +0 - 0.8813735870195430252326093249797923090282 i":
double: 1
float: 1
@@ -362,8 +343,6 @@ ldouble: 2
Test "Imaginary part of: casin (-0 - 0.5 i) == -0 - 0.4812118250596034474977589134243684231352 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "Imaginary part of: casin (-0 - 1.0 i) == -0 - 0.8813735870195430252326093249797923090282 i":
double: 1
float: 1
@@ -473,13 +452,9 @@ ldouble: 2
Test "Real part of: casinh (0.5 + +0 i) == 0.4812118250596034474977589134243684231352 + +0 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "Real part of: casinh (0.5 - 0 i) == 0.4812118250596034474977589134243684231352 - 0 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
float: 1
ifloat: 1
@@ -795,20 +770,161 @@ ildouble: 1
ldouble: 1
# clog
-Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 2.649094276923003995420209214900915462737e-10 + 3.141592653589793238462643383279502884197 i":
+double: 1
+idouble: 1
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 2.649094282537168795982991778475646793277e-10 + 3.141592652530155111500161671113150737892 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog (-0x1.234566p-40 - 1.0 i) == 5.354083939753840089583620652120903838944e-25 - 1.570796326795931422008642456283782656359 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 (-0x1.fp+127 - 0x1p-149 i) == 88.69109041335841930424871526389807508374 - pi i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (-0x1.fp+16383 + 0x1p-16445 i) == 11356.49165759582936919077408168801636572 + pi i":
ildouble: 1
ldouble: 1
+Test "Real part of: clog (-0x1.fp+16383 + 0x1p-16494 i) == 11356.49165759582936919077408168801636572 + pi i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1.fp+16383 - 0x1p-16445 i) == 11356.49165759582936919077408168801636572 - pi i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1.fp+16383 - 0x1p-16494 i) == 11356.49165759582936919077408168801636572 - pi i":
+ildouble: 1
+ldouble: 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 (-0x1p-16445 + 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 + pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1p-16445 - 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 - pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1p-16494 + 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 + pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1p-16494 - 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 - pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -5.960464655174753498633255797994360530379e-8 + 7.888609052210118054117285652827862296732e-31 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (0x1.000566p0 + 0x1.234p-10 i) == 8.298731898331237038231468223024422855654e-5 + 1.110938609507128729312743251313024793990e-3 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog (0x1.000566p0 + 0x1.234p-10 i) == 8.298731898331237038231468223024422855654e-5 + 1.110938609507128729312743251313024793990e-3 i":
+ildouble: 1
+ldouble: 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 (0x1.fp+16383 + 0x1.fp+16383 i) == 11356.83823118610934184548269774874545400 + pi/4 i":
ildouble: 1
ldouble: 1
+Test "Real part of: clog (0x1.fp+16383 + 0x1p-16445 i) == 11356.49165759582936919077408168801636572 + +0 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1.fp+16383 + 0x1p-16494 i) == 11356.49165759582936919077408168801636572 + +0 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1.fp+16383 - 0x1p-16445 i) == 11356.49165759582936919077408168801636572 - 0 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1.fp+16383 - 0x1p-16494 i) == 11356.49165759582936919077408168801636572 - 0 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x10673dd0f2481p-51 + 0x7ef1d17cefbd2p-51 i) == 3.2047474274603604594851472963586149973093e-29 + 1.4422922682185099608731642353544207976604 i":
+ildouble: 1
+ldouble: 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
+Test "Real part of: clog (0x1p-16445 + 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 + pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1p-16445 - 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 - pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1p-16494 + 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 + pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1p-16494 - 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 - pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x2818p-15 + 0x798fp-15 i) == 1.5366822245016167178749091974664853785194e-08 + 1.2522014929038946066987318471922169174157 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x298c62cb546588a7p-63 + 0x7911b1dfcc4ecdaep-63 i) == -1.1931267660846218205882675852805793644095e-36 + 1.2402109774337032400594953899784058127412 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x2ede88p-23 + 0x771c3fp-23 i) == -4.4764192352906350039050902870893173560494e-13 + 1.1959106857549200806818600493552847793381 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x3f96469050f650869c2p-75 + 0x6f16b2c9c8b05988335p-75 i) == -1.0509738482436128031927971874674370984602e-45 + 1.0509191467640012308402149909370784281448 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x55cb6d0c83af5p-55 + 0x7fe33c0c7c4e90p-55 i) == -5.2000108498455368032511404449795741611813e-32 + 1.5288921536982513453421343495466824420259 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i) == 8.3076914081087805757422664530653247447136e-30 + 1.2072712126771536614482822173033535043206 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x659feap-24 + 0xeaf6f9p-24 i) == 3.7303493627403868207597214252239749960738e-14 + 1.1625816408046866464773042283673653469061 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x6771f22c64ed551b857c128b4cp-105 + 0x1f570e7a13cc3cf2f44fd793ea1p-105 i) == -1.4281333889622737316199756373421183559948e-62 + 1.3673546561165378090903506783353927980633 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x6b10b4f3520217b6p-64 + 0xe8893cbb449253a1p-64 i) == 2.4244570985709679851855191080208817099132e-37 + 1.1393074519572050614551047548718495655972 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x8ecbf810c4ae6p-52 + 0xd479468b09a37p-52 i) == -9.7375017988218644730510244778042114638107e-30 + 0.9790637929494922564724108399524154766631 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x9b57bp-20 + 0xcb7b4p-20 i) == -3.9563019528687610863490232935890272740908e-11 + 0.9187593477446338910857133065497364950682 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0xdb85c467ee2aadd5f425fe0f4b8dp-114 + 0x3e83162a0f95f1dcbf97dddf410eap-114 i) == 4.6017338806965821566734340588575402712716e-67 + 1.3547418904611758959096647942223384691728 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0xfd95243681c055c2632286921092p-113 + 0x1bccabcd29ca2152860ec29e34ef7p-113 i) == 6.6255694866654064502633121109394710807528e-66 + 1.0526409614996288387567810726095850312049 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0xfe961079616p-45 + 0x1bc37e09e6d1p-45 i) == 5.3718272201930019901317065495843842735179e-26 + 1.0503831592447830576186444373011142397404 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":
@@ -821,6 +937,53 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 2
+idouble: 2
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i":
+double: 2
+idouble: 2
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 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+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 (-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
@@ -872,12 +1035,59 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
+Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x0.fffffffffffff8p0 + 0x0.fffffffffffff8p-1000 i) == -4.821637332766435821255375046554377090472e-17 + 4.053112396770095089737411317782466262176e-302 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -2.588596909321764128428416045209904492216e-8 + 3.425979381266895667295625489912064603415e-31 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x1.00000000000000123456789abcp0 + 0x1.23456789p-1000 i) == 4.285899851347756186652871946325962330640e-19 + 4.611541215247321502041995872887317363241e-302 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1.00000000000000123456789abcp0 + 0x1.23456789p-1000 i) == 4.285899851347756186652871946325962330640e-19 + 4.611541215247321502041995872887317363241e-302 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1.00000000000000123456789abcp0 + 0x1.23456789p-60 i) == 4.285899851347756188767674032946882584784e-19 + 4.285899850759344225805480528847018395861e-19 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
float: 1
ifloat: 1
-Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
+Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-100 i) == 3.577293486783822178310971763308187385546e-5 + 3.897399639875661463735636919790792140598e-31 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-100 i) == 3.577293486783822178310971763308187385546e-5 + 3.897399639875661463735636919790792140598e-31 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1.234566p-30 + 1.0 i) == 2.438200411482400072282924063740535840474e-19 + 6.821881764607257184291586401763604544928e-1 i":
+float: 1
+ifloat: 1
+Test "Real 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 (0x1.234566p-50 + 1.0 i) == 2.217530356103816369479108963807448194409e-31 + 6.821881769209202348667823902864283966959e-1 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog10 (0x1.234566p-60 + 1.0 i) == 2.114801746467415208319767917450504756866e-37 + 6.821881769209206733143018621078368211515e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1.234566p-60 + 1.0 i) == 2.114801746467415208319767917450504756866e-37 + 6.821881769209206733143018621078368211515e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "Imaginary part of: clog10 (0x1.fffffep+127 + 0x1.fffffep+127 i) == 38.68235441693561449174780668781319348761 + pi/4*log10(e) i":
double: 1
float: 1
@@ -895,25 +1105,181 @@ ldouble: 1
Test "Real part of: clog10 (0x1.fp+16383 + 0x1p+16383 i) == 4932.112944269463028900262609694408579449 + 0.2069271710841128115912940666587802677383 i":
ildouble: 1
ldouble: 1
+Test "Real part of: clog10 (0x10673dd0f2481p-51 + 0x7ef1d17cefbd2p-51 i) == 1.3918041236396763648388478552321724382899e-29 + 0.6263795733790237053262025311642907438291 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x1415bcaf2105940d49a636e98ae59p-115 + 0x7e6a150adfcd1b0921d44b31f40f4p-115 i) == 1.1288799405048268615023706955013387413519e-67 + 0.6137587762850841972073301550420510507903 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x15cfbd1990d1ffp-53 + 0x176a3973e09a9ap-53 i) == 4.4163015461643576961232672330852798804976e-31 + 0.3564851427422832755956993418877523303529 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x164c74eea876p-45 + 0x16f393482f77p-45 i) == -1.3155760824064879362415202279780039150764e-26 + 0.3473590599762514228227328130640352044313 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1a6p-10 + 0x3a5p-10 i) == -6.2126412844802358329771948751248003038444e-07 + 0.4977135139537443711784513409096950995985 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x1df515eb171a808b9e400266p-95 + 0x7c71eb0cd4688dfe98581c77p-95 i) == -1.5221162575729652613635150540947625639689e-57 + 0.5795934880811949230121092882659698986043 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1df515eb171a808b9e400266p-95 + 0x7c71eb0cd4688dfe98581c77p-95 i) == -1.5221162575729652613635150540947625639689e-57 + 0.5795934880811949230121092882659698986043 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (0x1p-1073 + 0x1p-1073 i) == -322.8546703496198318667349645920187712089 + 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 "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 + 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":
double: 1
float: 1
idouble: 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":
double: 1
float: 1
idouble: 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-509 + 1.0 i) == 7.730698388614835910296270976605350994446e-308 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-510 + 1.0 i) == 1.932674597153708977574067744151337748612e-308 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-511 + 1.0 i) == 4.831686492884272443935169360378344371529e-309 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-61 + 1.0 i) == 4.084085680564517578238994467153626207224e-38 + 6.821881769209206735545466044044889962925e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-62 + 1.0 i) == 1.021021420141129394559748616788406551878e-38 + 6.821881769209206736487192085600834406988e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-63 + 1.0 i) == 2.552553550352823486399371541971016379740e-39 + 6.821881769209206736958055106378806629019e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x2dd46725bp-35 + 0x7783a1284p-35 i) == 1.9312741086596516918394613098872836703188e-20 + 0.5231613813514771042838490538484014771862 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x3f96469050f650869c2p-75 + 0x6f16b2c9c8b05988335p-75 i) == -4.5643214291682663316715446865040356750881e-46 + 0.4564083863660793840592614609053162690362 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x4447d7175p-35 + 0x6c445e00ap-35 i) == -6.4375803621988389731799033530075237868110e-21 + 0.4378257977686804492768642780897650927167 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x4d4ep-15 + 0x6605p-15 i) == -7.0781945783414996953799915941870192015212e-09 + 0.4005747524909781155537088181659175147564 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x4d9c37e2b5cb4533p-63 + 0x65c98be2385a042ep-63 i) == 2.7822833698845776001753149807484078521508e-37 + 0.3992725998539071066769046272515417679815 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x55cb6d0c83af5p-55 + 0x7fe33c0c7c4e90p-55 i) == -2.2583360179249556400630343805573865814771e-32 + 0.6639894257763289307423302343317622430835 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i) == 3.6079845358966994996207055940336690133424e-30 + 0.5243112258263349992771652393178033846555 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x602fd5037c4792efp-64 + 0xed3e2086dcca80b8p-64 i) == -1.0146400362652473358437501879334790111898e-37 + 0.5149047982335273098246594109614460842099 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x6241ef0da53f539f02fad67dabp-106 + 0x3fb46641182f7efd9caa769dac0p-106 i) == 1.8804859395820231849002915747252695375405e-63 + 0.6404513901551516189871978418046651877394 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x659feap-24 + 0xeaf6f9p-24 i) == 1.6200701438094619117335617123525612051457e-14 + 0.5049027913635038013499728086604870749732 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x659feap-24 + 0xeaf6f9p-24 i) == 1.6200701438094619117335617123525612051457e-14 + 0.5049027913635038013499728086604870749732 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x6b10b4f3520217b6p-64 + 0xe8893cbb449253a1p-64 i) == 1.0529283395205396881397407610630442563938e-37 + 0.4947949395762683446121140513971996916447 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x9b57bp-20 + 0xcb7b4p-20 i) == -1.7182001068739620267773842120965071561416e-11 + 0.3990121149225253562859800593935899629087 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0xdb85c467ee2aadd5f425fe0f4b8dp-114 + 0x3e83162a0f95f1dcbf97dddf410eap-114 i) == 1.9985076315737626043096596036300177494613e-67 + 0.5883569274304683249184005177865521205198 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0xfd95243681c055c2632286921092p-113 + 0x1bccabcd29ca2152860ec29e34ef7p-113 i) == 2.8774482675253468630312378575186855052697e-66 + 0.4571561610046221605554903008571429975493 i":
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: clog10 (0xfe961079616p-45 + 0x1bc37e09e6d1p-45 i) == 2.3329549194675052736016290082882121135546e-26 + 0.4561756099441139182878993697611751382976 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (1.0 + 0x1.234566p-10 i) == 2.680828048441605163181684680300513080769e-7 + 4.825491868832381486767558728169977751564e-4 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
double: 1
float: 1
@@ -936,6 +1302,12 @@ idouble: 1
ifloat: 1
# cos
+Test "cos (0x1p+120) == -9.25879022854837867303861764107414946730833e-01":
+float: 1
+ifloat: 1
+Test "cos (0x1p+127) == 7.81914638714960072263910298466369236613162e-01":
+float: 1
+ifloat: 1
Test "cos (M_PI_6l * 2.0) == 0.5":
double: 1
idouble: 1
@@ -1047,8 +1419,8 @@ Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276
float: 1
ifloat: 1
Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
-float: 1
-ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
double: 1
float: 4
@@ -1064,8 +1436,8 @@ double: 2
float: 3
idouble: 2
ifloat: 3
-ildouble: 11
-ldouble: 11
+ildouble: 2
+ldouble: 2
Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i":
ildouble: 2
ldouble: 2
@@ -1250,6 +1622,21 @@ ildouble: 1
ldouble: 1
# csqrt
+Test "Real part of: csqrt (-0x1.0000000000000000000000000001p-16382 - 0x1.0000000000000000000000000001p-16382 i) == 8.344545284118961663847948339519226074126e-2467 - 2.014551439675644900022606748976158925145e-2466 i":
+ildouble: 1
+ldouble: 1
+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
Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
float: 1
ifloat: 1
@@ -1263,6 +1650,21 @@ ldouble: 1
Test "Imaginary part of: csqrt (0.75 + 1.25 i) == 1.05065169626078392338656675760808326 + 0.594868882070379067881984030639932657 i":
ildouble: 1
ldouble: 1
+Test "Imaginary part of: csqrt (0x1.0000000000000000000000000001p-16382 + 0x1.0000000000000000000000000001p-16382 i) == 2.014551439675644900022606748976158925145e-2466 + 8.344545284118961663847948339519226074126e-2467 i":
+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
Test "Imaginary part of: csqrt (0x1.fffffep+127 + 1.0 i) == 1.844674352395372953599975585936590505260e+19 + 2.710505511993121390769065968615872097053e-20 i":
float: 1
ifloat: 1
@@ -1347,6 +1749,98 @@ Test "Real part of: ctan (1 + 47 i) == 2.729321264492904590777293425576722354636
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 "Real part of: ctan_downward (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 3
+ldouble: 3
+Test "Imaginary part of: ctan_downward (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 3
+ldouble: 3
+Test "Real part of: ctan_downward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan_downward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+# 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 "Real part of: ctan_tonearest (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 3
+ldouble: 3
+Test "Imaginary part of: ctan_tonearest (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 3
+ldouble: 3
+Test "Real part of: ctan_tonearest (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_tonearest (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+# ctan_towardzero
+Test "Imaginary part of: ctan_towardzero (0x1.921fb54442d1846ap+0 + 0x1p-16445 i) == -3.986797629811710706723242948653362815645e19 + 5.793882568875674066286163141055208625180e-4912 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan_towardzero (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 3
+ldouble: 3
+Test "Imaginary part of: ctan_towardzero (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 3
+ldouble: 3
+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: 2
+ldouble: 2
+
+# ctan_upward
+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":
+double: 1
+idouble: 1
+ildouble: 3
+ldouble: 3
+Test "Imaginary part of: ctan_upward (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 3
+ldouble: 3
+Test "Real part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 2
+ldouble: 2
+
# ctanh
Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
double: 1
@@ -1411,6 +1905,98 @@ Test "Imaginary part of: ctanh (47 + 1 i) == 1.0 + 2.729321264492904590777293425
ildouble: 1
ldouble: 1
+# ctanh_downward
+Test "Real part of: ctanh_downward (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 3
+ldouble: 3
+Test "Imaginary part of: ctanh_downward (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 3
+ldouble: 3
+Test "Real 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 "Imaginary part of: ctanh_downward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 1
+ldouble: 1
+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: 3
+ldouble: 3
+Test "Imaginary part of: ctanh_tonearest (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 3
+ldouble: 3
+Test "Real part of: ctanh_tonearest (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary 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 "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":
+ildouble: 3
+ldouble: 3
+Test "Imaginary part of: ctanh_towardzero (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 3
+ldouble: 3
+Test "Real part of: ctanh_towardzero (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+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 "Real 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":
+ildouble: 3
+ldouble: 3
+Test "Imaginary part of: ctanh_upward (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+double: 1
+idouble: 1
+ildouble: 3
+ldouble: 3
+Test "Real part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctanh_upward (0x1p-16445 + 0x1.921fb54442d1846ap+0 i) == 5.793882568875674066286163141055208625180e-4912 - 3.986797629811710706723242948653362815645e19 i":
+ildouble: 1
+ldouble: 1
+
# erf
Test "erf (1.25) == 0.922900128256458230136523481197281140":
double: 1
@@ -1487,6 +2073,9 @@ float: 1
ifloat: 1
# expm1
+Test "expm1 (-79.0) == -0.9999999999999999999999999999999999509391":
+ildouble: 1
+ldouble: 1
Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
double: 1
idouble: 1
@@ -1811,15 +2400,38 @@ ildouble: 1
ldouble: 1
# pow
+Test "pow (0x0.fffffffffffff8p0, -0x1.23456789abcdfp62) == 9.8826311568054561811190162420900667121992e+252":
+ildouble: 1
+ldouble: 1
Test "pow (0x0.ffffffp0, -0x1p24) == 2.7182819094701610539628664526874952929416":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "pow (0x0.ffffffp0, 0x1p24) == 0.3678794302077803437135155590023422899744":
float: 1
ifloat: 1
Test "pow (0x1.000002p0, 0x1p24) == 7.3890552180866447284268641248075832310141":
float: 1
ifloat: 1
+Test "pow (10.0, -4930.0) == 1e-4930":
+ildouble: 1
+ldouble: 1
+Test "pow (10.0, 4929.0) == 1e4929":
+ildouble: 1
+ldouble: 1
+Test "pow (10.0, 4930.0) == 1e4930":
+ildouble: 1
+ldouble: 1
+Test "pow (10.0, 4931.0) == 1e4931":
+ildouble: 1
+ldouble: 1
+Test "pow (10.0, 4932.0) == 1e4932":
+ildouble: 1
+ldouble: 1
+Test "pow (1e4932, 0.75) == 1e3699":
+ildouble: 1
+ldouble: 1
# pow_downward
Test "pow_downward (1.5, 1.03125) == 1.519127098714743184071644334163037684948":
@@ -1898,6 +2510,12 @@ float: 1
ifloat: 1
# sincos
+Test "sincos (0x1p+120, &sin_res, &cos_res) puts -9.25879022854837867303861764107414946730833e-01 in cos_res":
+float: 1
+ifloat: 1
+Test "sincos (0x1p+127, &sin_res, &cos_res) puts 7.81914638714960072263910298466369236613162e-01 in cos_res":
+float: 1
+ifloat: 1
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
double: 1
idouble: 1
@@ -2028,6 +2646,43 @@ double: 1
idouble: 1
ildouble: 1
ldouble: 1
+Test "y0 (0x1p-10) == -4.4865150767109739412411806297168793661098":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "y0 (0x1p-110) == -4.861363632869203777249475899390797503250e+1":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "y0 (0x1p-20) == -8.8992283012125827603076426611387876938160":
+float: 1
+ifloat: 1
+Test "y0 (0x1p-30) == -1.3311940304267782826037118027401817264906e+1":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "y0 (0x1p-40) == -1.7724652307320814696990854700366226762563e+1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "y0 (0x1p-50) == -2.2137364310373846564919987139743760738155e+1":
+float: 1
+ifloat: 1
+Test "y0 (0x1p-60) == -2.6550076313426878432849115782108205929120e+1":
+ildouble: 1
+ldouble: 1
+Test "y0 (0x1p-70) == -3.0962788316479910300778244424468159753887e+1":
+double: 1
+idouble: 1
+Test "y0 (0x1p-80) == -3.5375500319532942168707373066828113573541e+1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
double: 2
float: 1
@@ -2064,6 +2719,14 @@ ldouble: 1
Test "y1 (0x1.27e204p+99) == -8.881610148467797208469612080785210013461e-16":
double: 1
idouble: 1
+Test "y1 (0x1p-10) == -6.5190099301063115047395187618929589514382e+02":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "y1 (0x1p-30) == -6.8356527557643159612937462812258975438856e+08":
+ildouble: 1
+ldouble: 1
Test "y1 (1.5) == -0.412308626973911295952829820633445323":
float: 1
ifloat: 1
@@ -2371,21 +3034,27 @@ ifloat: 1
ildouble: 1
ldouble: 1
-Function: Real part of "clog10":
-double: 1
+Function: Imaginary part of "clog":
float: 1
-idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Function: Real part of "clog10":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
Function: Imaginary part of "clog10":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Function: "cos":
double: 2
@@ -2436,8 +3105,8 @@ double: 2
float: 4
idouble: 2
ifloat: 4
-ildouble: 11
-ldouble: 11
+ildouble: 4
+ldouble: 4
Function: Imaginary part of "cpow":
double: 2
@@ -2503,6 +3172,60 @@ idouble: 1
ildouble: 2
ldouble: 2
+Function: Real part of "ctan_downward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "ctan_downward":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Real part of "ctan_tonearest":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "ctan_tonearest":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Real part of "ctan_towardzero":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "ctan_towardzero":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Real part of "ctan_upward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "ctan_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 3
+ldouble: 3
+
Function: Real part of "ctanh":
double: 1
float: 1
@@ -2519,6 +3242,60 @@ ifloat: 2
ildouble: 2
ldouble: 2
+Function: Real part of "ctanh_downward":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "ctanh_downward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Real part of "ctanh_tonearest":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "ctanh_tonearest":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Real part of "ctanh_towardzero":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "ctanh_towardzero":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Real part of "ctanh_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "ctanh_upward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
Function: "erf":
double: 1
idouble: 1
@@ -2622,6 +3399,8 @@ ldouble: 1
Function: "pow":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: "pow_downward":
float: 1
diff --git a/libc/ports/sysdeps/mips/mips64/n32/_itoa.h b/libc/ports/sysdeps/mips/mips64/n32/_itoa.h
new file mode 100644
index 000000000..363cdfe9a
--- /dev/null
+++ b/libc/ports/sysdeps/mips/mips64/n32/_itoa.h
@@ -0,0 +1,4 @@
+/* MIPS n32 uses 64-bit _itoa_word and _itoa is mapped to _itoa_word. */
+#define _ITOA_NEEDED 0
+#define _ITOA_WORD_TYPE unsigned long long int
+#include_next <_itoa.h>
diff --git a/libc/ports/sysdeps/mips/sotruss-lib.c b/libc/ports/sysdeps/mips/sotruss-lib.c
new file mode 100644
index 000000000..6706be949
--- /dev/null
+++ b/libc/ports/sysdeps/mips/sotruss-lib.c
@@ -0,0 +1,117 @@
+/* Override generic sotruss-lib.c to define actual functions for MIPS.
+ 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/>. */
+
+#define HAVE_ARCH_PLTENTER
+#define HAVE_ARCH_PLTEXIT
+
+#include <elf/sotruss-lib.c>
+
+#if _MIPS_SIM == _ABIO32
+
+ElfW(Addr)
+la_mips_o32_gnu_pltenter (ElfW(Sym) *sym __attribute__ ((unused)),
+ unsigned int ndx __attribute__ ((unused)),
+ uintptr_t *refcook, uintptr_t *defcook,
+ La_mips_32_regs *regs, unsigned int *flags,
+ const char *symname, long int *framesizep)
+{
+ print_enter (refcook, defcook, symname,
+ regs->lr_reg[0], regs->lr_reg[1], regs->lr_reg[2],
+ *flags);
+
+ /* No need to copy anything, we will not need the parameters in any case. */
+ *framesizep = 0;
+
+ return sym->st_value;
+}
+
+unsigned int
+la_mips_o32_gnu_pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
+ uintptr_t *defcook,
+ const struct La_mips_32_regs *inregs,
+ struct La_mips_32_retval *outregs,
+ const char *symname)
+{
+ print_exit (refcook, defcook, symname, outregs->lrv_v0);
+
+ return 0;
+}
+
+#elif _MIPS_SIM == _ABIN32
+
+ElfW(Addr)
+la_mips_n32_gnu_pltenter (ElfW(Sym) *sym __attribute__ ((unused)),
+ unsigned int ndx __attribute__ ((unused)),
+ uintptr_t *refcook, uintptr_t *defcook,
+ La_mips_64_regs *regs, unsigned int *flags,
+ const char *symname, long int *framesizep)
+{
+ print_enter (refcook, defcook, symname,
+ regs->lr_reg[0], regs->lr_reg[1], regs->lr_reg[2],
+ *flags);
+
+ /* No need to copy anything, we will not need the parameters in any case. */
+ *framesizep = 0;
+
+ return sym->st_value;
+}
+
+unsigned int
+la_mips_n32_gnu_pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
+ uintptr_t *defcook,
+ const struct La_mips_64_regs *inregs,
+ struct La_mips_64_retval *outregs,
+ const char *symname)
+{
+ print_exit (refcook, defcook, symname, outregs->lrv_v0);
+
+ return 0;
+}
+
+#else
+
+ElfW(Addr)
+la_mips_n64_gnu_pltenter (ElfW(Sym) *sym __attribute__ ((unused)),
+ unsigned int ndx __attribute__ ((unused)),
+ uintptr_t *refcook, uintptr_t *defcook,
+ La_mips_64_regs *regs, unsigned int *flags,
+ const char *symname, long int *framesizep)
+{
+ print_enter (refcook, defcook, symname,
+ regs->lr_reg[0], regs->lr_reg[1], regs->lr_reg[2],
+ *flags);
+
+ /* No need to copy anything, we will not need the parameters in any case. */
+ *framesizep = 0;
+
+ return sym->st_value;
+}
+
+unsigned int
+la_mips_n64_gnu_pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
+ uintptr_t *defcook,
+ const struct La_mips_64_regs *inregs,
+ struct La_mips_64_retval *outregs,
+ const char *symname)
+{
+ print_exit (refcook, defcook, symname, outregs->lrv_v0);
+
+ return 0;
+}
+
+#endif
diff --git a/libc/ports/sysdeps/powerpc/nofpu/libm-test-ulps b/libc/ports/sysdeps/powerpc/nofpu/libm-test-ulps
index 651692a42..652cad322 100644
--- a/libc/ports/sysdeps/powerpc/nofpu/libm-test-ulps
+++ b/libc/ports/sysdeps/powerpc/nofpu/libm-test-ulps
@@ -136,6 +136,9 @@ ldouble: 1
Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
float: 1
ifloat: 1
+Test "atan2 (-max_value, -min_value) == -pi/2":
+float: 1
+ifloat: 1
Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
float: 1
ifloat: 1
@@ -676,15 +679,63 @@ float: 2
ifloat: 2
# clog
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 2.649094276923003995420209214900915462737e-10 + 3.141592653589793238462643383279502884197 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 2.649094282537168795982991778475646793277e-10 + 3.141592652530155111500161671113150737892 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog (-0x1.234566p-40 - 1.0 i) == 5.354083939753840089583620652120903838944e-25 - 1.570796326795931422008642456283782656359 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 (-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 "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
ildouble: 1
ldouble: 1
-Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
+Test "Imaginary part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -5.960464655174753498633255797994360530379e-8 + 7.888609052210118054117285652827862296732e-31 i":
float: 1
ifloat: 1
+Test "Real part of: clog (0x1.000566p0 + 0x1.234p-10 i) == 8.298731898331237038231468223024422855654e-5 + 1.110938609507128729312743251313024793990e-3 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 "Imaginary part of: clog (0x11682p-23 + 0x7ffed1p-23 i) == 1.1723955140027907954461000991619077811832e-12 + 1.5622968405332756349813737986164832897108 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x13836d58a13448d750b4b9p-85 + 0x195ca7bc3ab4f9161edbe6p-85 i) == 2.8398125044729578740243199963484494962411e-50 + 0.9149964976334130461795060758257083099706 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x155f8afc4c48685bf63610p-85 + 0x17d0cf2652cdbeb1294e19p-85 i) == -4.7775669192897997174762089350332738583822e-50 + 0.8393953487996880419413728440067635213372 i":
ildouble: 2
ldouble: 2
-Test "Imaginary part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
+Test "Imaginary part of: clog (0x15cfbd1990d1ffp-53 + 0x176a3973e09a9ap-53 i) == 1.0168910106364605304135563536838075568606e-30 + 0.8208373755522359859870890246475340086663 i":
ildouble: 1
ldouble: 1
Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i) == -744.0934983311012896593986823853525458290 + pi/4 i":
@@ -693,6 +744,33 @@ 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
+Test "Imaginary part of: clog (0x2818p-15 + 0x798fp-15 i) == 1.5366822245016167178749091974664853785194e-08 + 1.2522014929038946066987318471922169174157 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog (0x4d9c37e2b5cb4533p-63 + 0x65c98be2385a042ep-63 i) == 6.4064442119814669184296141278612389400075e-37 + 0.9193591364645830864185131402313014890145 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x6241ef0da53f539f02fad67dabp-106 + 0x3fb46641182f7efd9caa769dac0p-106 i) == 4.3299788920664682288477984749202524623248e-63 + 1.4746938237585656250866370987773473745867 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0xa1f2c1p-24 + 0xc643aep-24 i) == -1.0480505352462576151523512837107080269981e-13 + 0.8858771987699967480545613322309315260313 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0xa4722f19346cp-51 + 0x7f9631c5e7f07p-51 i) == -6.2122796286154679676173624516405339768606e-30 + 1.4904138780720095276446375492434049214172 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0xf2p-10 + 0x3e3p-10 i) == 6.1988446308070710970664736815277450078106e-06 + 1.3322126499153926210226335249558203898460 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":
@@ -705,6 +783,51 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 2
+idouble: 2
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i":
+double: 2
+idouble: 2
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 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+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 (-1.0 + 0x1.234566p-20 i) == 2.556638434669064077889576526006849923281e-13 + 1.364375882602207106407956770293808181427 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
double: 1
idouble: 1
@@ -753,11 +876,38 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
+Test "Real part of: clog10 (0x0.fffffffffffff8p0 + 0x0.fffffffffffff8p-1000 i) == -4.821637332766435821255375046554377090472e-17 + 4.053112396770095089737411317782466262176e-302 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -2.588596909321764128428416045209904492216e-8 + 3.425979381266895667295625489912064603415e-31 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
float: 1
ifloat: 1
-ildouble: 3
-ldouble: 3
+Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-100 i) == 3.577293486783822178310971763308187385546e-5 + 3.897399639875661463735636919790792140598e-31 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.234566p-30 + 1.0 i) == 2.438200411482400072282924063740535840474e-19 + 6.821881764607257184291586401763604544928e-1 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.234566p-50 + 1.0 i) == 2.217530356103816369479108963807448194409e-31 + 6.821881769209202348667823902864283966959e-1 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.234566p-60 + 1.0 i) == 2.114801746467415208319767917450504756866e-37 + 6.821881769209206733143018621078368211515e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (0x1.fffffep+127 + 0x1.fffffep+127 i) == 38.68235441693561449174780668781319348761 + pi/4*log10(e) i":
double: 1
float: 1
@@ -769,25 +919,154 @@ ifloat: 1
Test "Imaginary part of: clog10 (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 308.4052305577487344482591243175787477115 + pi/4*log10(e) i":
double: 1
idouble: 1
+Test "Real part of: clog10 (0x10673dd0f2481p-51 + 0x7ef1d17cefbd2p-51 i) == 1.3918041236396763648388478552321724382899e-29 + 0.6263795733790237053262025311642907438291 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x13836d58a13448d750b4b9p-85 + 0x195ca7bc3ab4f9161edbe6p-85 i) == 1.2333149003324592532859843519619084433953e-50 + 0.3973779298829931059309198145608711073016 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x155f8afc4c48685bf63610p-85 + 0x17d0cf2652cdbeb1294e19p-85 i) == -2.0748709499710785084693619097712106753591e-50 + 0.3645447681189598740620098186365764884771 i":
+ildouble: 2
+ldouble: 2
+Test "Real part of: clog10 (0x15d8ab6ed05ca514086ac3a1e84p-105 + 0x1761e480aa094c0b10b34b09ce9p-105 i) == 4.3548095442952115860848857519953610343042e-63 + 0.3558376234889641500775150477035448866763 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x164c74eea876p-45 + 0x16f393482f77p-45 i) == -1.3155760824064879362415202279780039150764e-26 + 0.3473590599762514228227328130640352044313 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1a6p-10 + 0x3a5p-10 i) == -6.2126412844802358329771948751248003038444e-07 + 0.4977135139537443711784513409096950995985 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1df515eb171a808b9e400266p-95 + 0x7c71eb0cd4688dfe98581c77p-95 i) == -1.5221162575729652613635150540947625639689e-57 + 0.5795934880811949230121092882659698986043 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (0x1p-1073 + 0x1p-1073 i) == -322.8546703496198318667349645920187712089 + 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 "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 + 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":
double: 1
float: 1
idouble: 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":
double: 1
float: 1
idouble: 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-509 + 1.0 i) == 7.730698388614835910296270976605350994446e-308 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-510 + 1.0 i) == 1.932674597153708977574067744151337748612e-308 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-511 + 1.0 i) == 4.831686492884272443935169360378344371529e-309 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-61 + 1.0 i) == 4.084085680564517578238994467153626207224e-38 + 6.821881769209206735545466044044889962925e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1p-62 + 1.0 i) == 1.021021420141129394559748616788406551878e-38 + 6.821881769209206736487192085600834406988e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-63 + 1.0 i) == 2.552553550352823486399371541971016379740e-39 + 6.821881769209206736958055106378806629019e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x298c62cb546588a7p-63 + 0x7911b1dfcc4ecdaep-63 i) == -5.1816837072162316773907242302011632570857e-37 + 0.5386167838952956925896424154370364458140 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x2dd46725bp-35 + 0x7783a1284p-35 i) == 1.9312741086596516918394613098872836703188e-20 + 0.5231613813514771042838490538484014771862 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x4447d7175p-35 + 0x6c445e00ap-35 i) == -6.4375803621988389731799033530075237868110e-21 + 0.4378257977686804492768642780897650927167 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x4d4ep-15 + 0x6605p-15 i) == -7.0781945783414996953799915941870192015212e-09 + 0.4005747524909781155537088181659175147564 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i) == 3.6079845358966994996207055940336690133424e-30 + 0.5243112258263349992771652393178033846555 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x81b7efa81fc35ad1p-65 + 0x1ef4b835f1c79d812p-65 i) == -4.3074341162203896332989394770760901408798e-39 + 0.5709443672155660428417571212549720987784 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x9b57bp-20 + 0xcb7b4p-20 i) == -1.7182001068739620267773842120965071561416e-11 + 0.3990121149225253562859800593935899629087 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0xe33f66c9542ca25cc43c867p-95 + 0x7f35a68ebd3704a43c465864p-95 i) == 1.7850272475173865337808494725293124613817e-56 + 0.6338990862456906754888183278564382516852 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0xfe961079616p-45 + 0x1bc37e09e6d1p-45 i) == 2.3329549194675052736016290082882121135546e-26 + 0.4561756099441139182878993697611751382976 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (1.0 + 0x1.234566p-10 i) == 2.680828048441605163181684680300513080769e-7 + 4.825491868832381486767558728169977751564e-4 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
double: 1
float: 1
@@ -810,6 +1089,12 @@ idouble: 1
ifloat: 1
# cos
+Test "cos (0x1p+120) == -9.25879022854837867303861764107414946730833e-01":
+float: 1
+ifloat: 1
+Test "cos (0x1p+127) == 7.81914638714960072263910298466369236613162e-01":
+float: 1
+ifloat: 1
Test "cos (M_PI_6l * 2.0) == 0.5":
double: 1
idouble: 1
@@ -965,19 +1250,13 @@ float: 1
ifloat: 1
ildouble: 1
ldouble: 1
-Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
-float: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
double: 1
float: 4
idouble: 1
ifloat: 4
-Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
ildouble: 2
ldouble: 2
@@ -986,8 +1265,8 @@ double: 2
float: 3
idouble: 2
ifloat: 3
-ildouble: 1
-ldouble: 1
+ildouble: 4
+ldouble: 4
Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i":
ildouble: 1
ldouble: 1
@@ -1099,12 +1378,18 @@ ildouble: 2
ldouble: 2
# 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
@@ -1119,6 +1404,9 @@ double: 1
idouble: 1
ildouble: 1
ldouble: 1
+Test "Imaginary part of: csqrt (0x1p-1074 + 0x1p-1074 i) == 2.442109726130830256743814843868934877597e-162 + 1.011554969366634726113090867589031782487e-162 i":
+ildouble: 1
+ldouble: 1
# ctan
Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
@@ -1129,32 +1417,111 @@ ldouble: 1
Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
double: 1
idouble: 1
-ildouble: 1
-ldouble: 1
Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
double: 1
idouble: 1
-ildouble: 1
-ldouble: 1
Test "Real part of: ctan (0x1p1023 + 1 i) == -0.2254627924997545057926782581695274244229 + 0.8786063118883068695462540226219865087189 i":
double: 1
idouble: 1
+Test "Imaginary part of: ctan (0x1p1023 + 1 i) == -0.2254627924997545057926782581695274244229 + 0.8786063118883068695462540226219865087189 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i":
double: 1
idouble: 1
+ildouble: 2
+ldouble: 2
Test "Real part of: ctan (0x3.243f6cp-1 + 0 i) == -2.287733242885645987394874673945769518150e7 + 0.0 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: ctan (1 + 47 i) == 2.729321264492904590777293425576722354636e-41 + 1.0 i":
ildouble: 2
ldouble: 2
+# ctan_downward
+Test "Real part of: ctan_downward (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 3
+ldouble: 3
+Test "Real part of: ctan_downward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 3
+ldouble: 3
+Test "Imaginary part of: ctan_downward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+ildouble: 10
+ldouble: 10
+
+# ctan_tonearest
+Test "Real part of: ctan_tonearest (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_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.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 4
+ldouble: 4
+Test "Imaginary part of: ctan_towardzero (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 13
+ldouble: 13
+Test "Real part of: ctan_towardzero (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_towardzero (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+ildouble: 10
+ldouble: 10
+
+# ctan_upward
+Test "Real part of: ctan_upward (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+double: 1
+idouble: 1
+ildouble: 6
+ldouble: 6
+Test "Imaginary part of: ctan_upward (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 10
+ldouble: 10
+Test "Real part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 3
+ldouble: 3
+Test "Imaginary part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
# ctanh
Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
double: 1
float: 1
@@ -1163,6 +1530,8 @@ ifloat: 1
Test "Imaginary part of: ctanh (0 + 0x3.243f6cp-1 i) == 0.0 - 2.287733242885645987394874673945769518150e7 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
double: 1
float: 1
@@ -1173,23 +1542,102 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Test "Imaginary part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
float: 2
ifloat: 2
ildouble: 2
ldouble: 2
+Test "Real part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i":
double: 1
idouble: 1
Test "Real part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i":
double: 1
idouble: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: ctanh (47 + 1 i) == 1.0 + 2.729321264492904590777293425576722354636e-41 i":
ildouble: 2
ldouble: 2
+# ctanh_downward
+Test "Imaginary part of: ctanh_downward (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 3
+ldouble: 3
+Test "Real part of: ctanh_downward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+ildouble: 10
+ldouble: 10
+Test "Imaginary part of: ctanh_downward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+# ctanh_tonearest
+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
+ildouble: 1
+ldouble: 1
+
+# ctanh_towardzero
+Test "Real part of: ctanh_towardzero (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 13
+ldouble: 13
+Test "Imaginary part of: ctanh_towardzero (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 4
+ldouble: 4
+Test "Real part of: ctanh_towardzero (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+ildouble: 10
+ldouble: 10
+Test "Imaginary part of: ctanh_towardzero (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+# ctanh_upward
+Test "Real part of: ctanh_upward (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 10
+ldouble: 10
+Test "Imaginary part of: ctanh_upward (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+double: 1
+idouble: 1
+ildouble: 6
+ldouble: 6
+Test "Real part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
# erf
Test "erf (1.25) == 0.922900128256458230136523481197281140":
double: 1
@@ -1666,6 +2114,12 @@ float: 1
ifloat: 1
# sincos
+Test "sincos (0x1p+120, &sin_res, &cos_res) puts -9.25879022854837867303861764107414946730833e-01 in cos_res":
+float: 1
+ifloat: 1
+Test "sincos (0x1p+127, &sin_res, &cos_res) puts 7.81914638714960072263910298466369236613162e-01 in cos_res":
+float: 1
+ifloat: 1
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
double: 1
idouble: 1
@@ -1722,6 +2176,60 @@ ildouble: 1
ldouble: 1
# tan
+Test "tan (-0xc.908p-4) == -0.9997603425502441410973077452249560802034":
+ildouble: 2
+ldouble: 2
+Test "tan (-0xc.90cp-4) == -0.9998823910588060302788513970802357770031":
+ildouble: 2
+ldouble: 2
+Test "tan (-0xc.90ep-4) == -0.9999434208994808753305784795924711152508":
+ildouble: 2
+ldouble: 2
+Test "tan (-0xc.90f8p-4) == -0.9999891957244072765118898375645469865764":
+ildouble: 2
+ldouble: 2
+Test "tan (-0xc.90fcp-4) == -0.9999968250656122402859679132395522927393":
+ildouble: 1
+ldouble: 1
+Test "tan (-0xc.90fd8p-4) == -0.9999996860835706212861509874451585282616":
+ildouble: 1
+ldouble: 1
+Test "tan (-0xc.90fdap-4) == -0.9999999245021033010474530133665235922808":
+ildouble: 1
+ldouble: 1
+Test "tan (-0xc.92p-4) == -1.0004928571392300571266638743539017593717":
+ildouble: 1
+ldouble: 1
+Test "tan (-0xc.9p-4) == -0.9995162902115457818029468900654150261381":
+ildouble: 1
+ldouble: 1
+Test "tan (0xc.908p-4) == 0.9997603425502441410973077452249560802034":
+ildouble: 2
+ldouble: 2
+Test "tan (0xc.90cp-4) == 0.9998823910588060302788513970802357770031":
+ildouble: 2
+ldouble: 2
+Test "tan (0xc.90ep-4) == 0.9999434208994808753305784795924711152508":
+ildouble: 2
+ldouble: 2
+Test "tan (0xc.90f8p-4) == 0.9999891957244072765118898375645469865764":
+ildouble: 2
+ldouble: 2
+Test "tan (0xc.90fcp-4) == 0.9999968250656122402859679132395522927393":
+ildouble: 1
+ldouble: 1
+Test "tan (0xc.90fd8p-4) == 0.9999996860835706212861509874451585282616":
+ildouble: 1
+ldouble: 1
+Test "tan (0xc.90fdap-4) == 0.9999999245021033010474530133665235922808":
+ildouble: 1
+ldouble: 1
+Test "tan (0xc.92p-4) == 1.0004928571392300571266638743539017593717":
+ildouble: 1
+ldouble: 1
+Test "tan (0xc.9p-4) == 0.9995162902115457818029468900654150261381":
+ildouble: 1
+ldouble: 1
Test "tan (pi/4) == 1":
ildouble: 1
ldouble: 1
@@ -1862,6 +2370,41 @@ double: 1
idouble: 1
ildouble: 1
ldouble: 1
+Test "y0 (0x1p-10) == -4.4865150767109739412411806297168793661098":
+double: 1
+idouble: 1
+Test "y0 (0x1p-100) == -4.420092432563900590456563035154802121284e+1":
+ildouble: 1
+ldouble: 1
+Test "y0 (0x1p-110) == -4.861363632869203777249475899390797503250e+1":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "y0 (0x1p-20) == -8.8992283012125827603076426611387876938160":
+float: 1
+ifloat: 1
+Test "y0 (0x1p-30) == -1.3311940304267782826037118027401817264906e+1":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "y0 (0x1p-40) == -1.7724652307320814696990854700366226762563e+1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "y0 (0x1p-50) == -2.2137364310373846564919987139743760738155e+1":
+float: 1
+ifloat: 1
+Test "y0 (0x1p-70) == -3.0962788316479910300778244424468159753887e+1":
+double: 1
+idouble: 1
+Test "y0 (0x1p-80) == -3.5375500319532942168707373066828113573541e+1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
double: 2
float: 1
@@ -1899,6 +2442,12 @@ double: 1
idouble: 1
ildouble: 1
ldouble: 1
+Test "y1 (0x1p-10) == -6.5190099301063115047395187618929589514382e+02":
+double: 1
+idouble: 1
+Test "y1 (0x1p-20) == -6.6754421443450423911167962313100637952285e+05":
+ildouble: 1
+ldouble: 1
Test "y1 (1.5) == -0.412308626973911295952829820633445323":
float: 1
ifloat: 1
@@ -2233,28 +2782,30 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
-
-Function: Imaginary part of "clog":
ildouble: 1
ldouble: 1
-Function: Real part of "clog10":
-double: 1
+Function: Imaginary part of "clog":
float: 1
-idouble: 1
ifloat: 1
-ildouble: 3
-ldouble: 3
+ildouble: 2
+ldouble: 2
+
+Function: Real part of "clog10":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
Function: Imaginary part of "clog10":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Function: "cos":
double: 2
@@ -2317,8 +2868,8 @@ double: 2
float: 4
idouble: 2
ifloat: 4
-ildouble: 2
-ldouble: 2
+ildouble: 4
+ldouble: 4
Function: Imaginary part of "cpow":
double: 2
@@ -2381,16 +2932,70 @@ ldouble: 2
Function: Imaginary part of "ctan":
double: 1
idouble: 1
+ildouble: 2
+ldouble: 2
+
+Function: Real part of "ctan_downward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "ctan_downward":
+float: 1
+ifloat: 1
+ildouble: 10
+ldouble: 10
+
+Function: Real part of "ctan_tonearest":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 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: 4
+ldouble: 4
+
+Function: Imaginary part of "ctan_towardzero":
+float: 1
+ifloat: 1
+ildouble: 13
+ldouble: 13
+
+Function: Real part of "ctan_upward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 6
+ldouble: 6
+
+Function: Imaginary part of "ctan_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 10
+ldouble: 10
+
Function: Real part of "ctanh":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Function: Imaginary part of "ctanh":
double: 1
@@ -2400,6 +3005,60 @@ ifloat: 2
ildouble: 2
ldouble: 2
+Function: Real part of "ctanh_downward":
+float: 1
+ifloat: 1
+ildouble: 10
+ldouble: 10
+
+Function: Imaginary part of "ctanh_downward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Real part of "ctanh_tonearest":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "ctanh_tonearest":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "ctanh_towardzero":
+float: 1
+ifloat: 1
+ildouble: 13
+ldouble: 13
+
+Function: Imaginary part of "ctanh_towardzero":
+float: 1
+ifloat: 1
+ildouble: 4
+ldouble: 4
+
+Function: Real part of "ctanh_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 10
+ldouble: 10
+
+Function: Imaginary part of "ctanh_upward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 6
+ldouble: 6
+
Function: "erf":
double: 1
idouble: 1
@@ -2603,8 +3262,8 @@ ldouble: 1
Function: "tan":
double: 1
idouble: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Function: "tan_downward":
float: 1
diff --git a/libc/ports/sysdeps/tile/bits/byteswap.h b/libc/ports/sysdeps/tile/bits/byteswap.h
index 8e610c6fc..4d1b25549 100644
--- a/libc/ports/sysdeps/tile/bits/byteswap.h
+++ b/libc/ports/sysdeps/tile/bits/byteswap.h
@@ -23,10 +23,12 @@
#ifndef _BITS_BYTESWAP_H
#define _BITS_BYTESWAP_H 1
+#include <bits/types.h>
+
/* gcc __builtin_bswap64() can constant-fold, etc, so always use it. */
#define __bswap_16(x) ((unsigned short)(__builtin_bswap32(x) >> 16))
#define __bswap_32(x) ((unsigned int)__builtin_bswap32(x))
-#define __bswap_64(x) ((unsigned long long)__builtin_bswap64(x))
+#define __bswap_64(x) ((__uint64_t)__builtin_bswap64(x))
#define __bswap_constant_16(x) __bswap_16(x)
#define __bswap_constant_32(x) __bswap_32(x)
diff --git a/libc/ports/sysdeps/tile/libm-test-ulps b/libc/ports/sysdeps/tile/libm-test-ulps
index 584e57089..eddae42c7 100644
--- a/libc/ports/sysdeps/tile/libm-test-ulps
+++ b/libc/ports/sysdeps/tile/libm-test-ulps
@@ -4,6 +4,9 @@
Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
float: 1
ifloat: 1
+Test "atan2 (-max_value, -min_value) == -pi/2":
+float: 1
+ifloat: 1
Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
float: 1
ifloat: 1
@@ -1308,6 +1311,34 @@ idouble: 1
Test "y0 (0x1.ff00000000002p+840) == 1.846591691699331493194965158699937660696e-127":
double: 1
idouble: 1
+Test "y0 (0x1p-10) == -4.4865150767109739412411806297168793661098":
+double: 1
+idouble: 1
+Test "y0 (0x1p-110) == -4.861363632869203777249475899390797503250e+1":
+double: 1
+idouble: 1
+Test "y0 (0x1p-20) == -8.8992283012125827603076426611387876938160":
+float: 1
+ifloat: 1
+Test "y0 (0x1p-30) == -1.3311940304267782826037118027401817264906e+1":
+float: 1
+ifloat: 1
+Test "y0 (0x1p-40) == -1.7724652307320814696990854700366226762563e+1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "y0 (0x1p-50) == -2.2137364310373846564919987139743760738155e+1":
+float: 1
+ifloat: 1
+Test "y0 (0x1p-70) == -3.0962788316479910300778244424468159753887e+1":
+double: 1
+idouble: 1
+Test "y0 (0x1p-80) == -3.5375500319532942168707373066828113573541e+1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
double: 2
float: 1
@@ -1334,6 +1365,9 @@ idouble: 1
Test "y1 (0x1.27e204p+99) == -8.881610148467797208469612080785210013461e-16":
double: 1
idouble: 1
+Test "y1 (0x1p-10) == -6.5190099301063115047395187618929589514382e+02":
+double: 1
+idouble: 1
Test "y1 (1.5) == -0.412308626973911295952829820633445323":
float: 1
ifloat: 1
diff --git a/libc/ports/sysdeps/tile/s_fma.c b/libc/ports/sysdeps/tile/s_fma.c
index 5be586562..c84a9bb2d 100644
--- a/libc/ports/sysdeps/tile/s_fma.c
+++ b/libc/ports/sysdeps/tile/s_fma.c
@@ -1,8 +1,4 @@
/* tile does not support the rounding modes required by the ieee754/dbl-64
implementation, but it's still better than the generic implementation. */
-#define libc_feholdexcept_setround(e, x) do { (void) (e); } while (0)
-#define libc_feupdateenv_test(e, x) ((void) (e), 0)
-#define libc_fetestexcept(x) 0
-
#include <sysdeps/ieee754/dbl-64/s_fma.c>
diff --git a/libc/ports/sysdeps/tile/s_fmaf.c b/libc/ports/sysdeps/tile/s_fmaf.c
index 92d66b257..84e9adc41 100644
--- a/libc/ports/sysdeps/tile/s_fmaf.c
+++ b/libc/ports/sysdeps/tile/s_fmaf.c
@@ -1,8 +1,4 @@
/* tile does not support the rounding modes required by the ieee754/dbl-64
implementation, but it's still better than the generic implementation. */
-#define libc_feholdexcept_setround(e, x) do { (void) (e); } while (0)
-#define libc_feupdateenv_test(e, x) ((void) (e), 0)
-#define libc_fetestexcept(x) 0
-
#include <sysdeps/ieee754/dbl-64/s_fmaf.c>
diff --git a/libc/ports/sysdeps/unix/sysv/linux/aarch64/dl-cache.h b/libc/ports/sysdeps/unix/sysv/linux/aarch64/dl-cache.h
new file mode 100644
index 000000000..1aa1a84af
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/aarch64/dl-cache.h
@@ -0,0 +1,45 @@
+/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
+ Copyright (C) 2003-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 <ldconfig.h>
+
+#define _DL_CACHE_DEFAULT_ID (FLAG_AARCH64_LIB64 | FLAG_ELF_LIBC6)
+
+#define _dl_cache_check_flags(flags) \
+ ((flags) == _DL_CACHE_DEFAULT_ID)
+
+#define add_system_dir(dir) \
+ do \
+ { \
+ size_t len = strlen (dir); \
+ char path[len + 3]; \
+ memcpy (path, dir, len + 1); \
+ if (len >= 6 && ! memcmp (path + len - 6, "/lib64", 6)) \
+ { \
+ len -= 2; \
+ path[len] = '\0'; \
+ } \
+ add_dir (path); \
+ if (len >= 4 && ! memcmp (path + len - 4, "/lib", 4)) \
+ { \
+ memcpy (path + len, "64", 3); \
+ add_dir (path); \
+ } \
+ } while (0)
+
+#include_next <dl-cache.h>
diff --git a/libc/ports/sysdeps/unix/sysv/linux/aarch64/nptl/lowlevellock.h b/libc/ports/sysdeps/unix/sysv/linux/aarch64/nptl/lowlevellock.h
index e4f0c9427..705cffd35 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/aarch64/nptl/lowlevellock.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/aarch64/nptl/lowlevellock.h
@@ -96,7 +96,7 @@
__lll_private_flag (__op, private), \
(val), (timespec), NULL /* Unused. */, \
FUTEX_BITSET_MATCH_ANY); \
- INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \
+ __ret; \
})
#define lll_futex_wake(futexp, nr, private) \
diff --git a/libc/ports/sysdeps/unix/sysv/linux/arm/Makefile b/libc/ports/sysdeps/unix/sysv/linux/arm/Makefile
index bda3ea9f7..be7946e96 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/libc/ports/sysdeps/unix/sysv/linux/arm/Makefile
@@ -70,25 +70,16 @@ LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o
LDFLAGS-tst-rfc3484-3 += $(common-objpfx)csu/libc-do-syscall.o
endif
-define default-abi-prog
-echo '#ifdef __ARM_PCS_VFP';
-echo 'hard';
-echo '#else';
-echo 'soft';
-echo '#endif'
-endef
-default-abi := $(strip $(shell \
- ($(default-abi-prog)) | $(CC) $(CFLAGS) $(CPPFLAGS) -E -P -))
-ifeq ($(default-abi),hard)
-# OK.
-else
-ifneq ($(default-abi),soft)
-Unknown ABI, must be "hard" or "soft".
-endif
+# Get value of default-abi.
+include $(common-objpfx)default-abi.make
+
+abi-variants := soft hard
+
+ifeq (,$(filter $(default-abi),$(abi-variants)))
+Unknown ABI, must be one of $(abi-variants)
endif
abi-includes :=
-abi-variants := soft hard
abi-soft-options := -U__ARM_PCS_VFP
abi-soft-condition := !defined __ARM_PCS_VFP
abi-soft-ld-soname := ld-linux.so.3
diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/____longjmp_chk.c b/libc/ports/sysdeps/unix/sysv/linux/hppa/____longjmp_chk.c
new file mode 100644
index 000000000..46357ddba
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/hppa/____longjmp_chk.c
@@ -0,0 +1,47 @@
+/* Copyright (C) 2009-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 General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include <stdio.h>
+#include <signal.h>
+#include <sysdep.h>
+#define __longjmp ____longjmp_chk
+#define CHECK_SP(sp) \
+ do { \
+ register unsigned long this_sp asm ("r30"); \
+ /* The stack grows up, therefore frames that were created and then \
+ destroyed must all have stack values higher than ours. */ \
+ if ((unsigned long) (sp) > this_sp) \
+ { \
+ struct sigaltstack oss; \
+ INTERNAL_SYSCALL_DECL (err); \
+ int result = INTERNAL_SYSCALL (sigaltstack, err, 2, NULL, &oss);\
+ /* If we aren't using an alternate stack then we have already \
+ shown that we are jumping to a frame that doesn't exist so \
+ error out. If we are using an alternate stack we must prove \
+ that we are jumping *out* of the alternate stack. Note that \
+ the check for that is the same as that for _STACK_GROWS_UP \
+ as for _STACK_GROWS_DOWN. */ \
+ if (!INTERNAL_SYSCALL_ERROR_P (result, err) \
+ && ((oss.ss_flags & SS_ONSTACK) == 0 \
+ || ((unsigned long) oss.ss_sp + oss.ss_size \
+ - (unsigned long) (sp)) < oss.ss_size)) \
+ __fortify_fail ("longjmp causes uninitialized stack frame"); \
+ } \
+ } while (0)
+
+#include <__longjmp.c>
diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/bits/socket.h b/libc/ports/sysdeps/unix/sysv/linux/hppa/bits/socket.h
deleted file mode 100644
index 7870f751e..000000000
--- a/libc/ports/sysdeps/unix/sysv/linux/hppa/bits/socket.h
+++ /dev/null
@@ -1,444 +0,0 @@
-/* System-specific socket constants and types. Linux version.
- Copyright (C) 1991-2012 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef __BITS_SOCKET_H
-#define __BITS_SOCKET_H
-
-#ifndef _SYS_SOCKET_H
-# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
-#endif
-
-#define __need_size_t
-#include <stddef.h>
-
-#include <sys/types.h>
-
-/* Type for length arguments in socket calls. */
-#ifndef __socklen_t_defined
-typedef __socklen_t socklen_t;
-# define __socklen_t_defined
-#endif
-
-/* Types of sockets. */
-enum __socket_type
-{
- SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
- byte streams. */
-#define SOCK_STREAM SOCK_STREAM
- SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
- of fixed maximum length. */
-#define SOCK_DGRAM SOCK_DGRAM
- SOCK_RAW = 3, /* Raw protocol interface. */
-#define SOCK_RAW SOCK_RAW
- SOCK_RDM = 4, /* Reliably-delivered messages. */
-#define SOCK_RDM SOCK_RDM
- SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
- datagrams of fixed maximum length. */
-#define SOCK_SEQPACKET SOCK_SEQPACKET
- SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */
-#define SOCK_DCCP SOCK_DCCP
- SOCK_PACKET = 10, /* Linux specific way of getting packets
- at the dev level. For writing rarp and
- other similar things on the user level. */
-#define SOCK_PACKET SOCK_PACKET
-
- /* Flags to be ORed into the type parameter of socket and socketpair and
- used for the flags parameter of paccept. */
-
- SOCK_CLOEXEC = 010000000, /* Atomically set close-on-exec flag for the
- new descriptor(s). */
-#define SOCK_CLOEXEC SOCK_CLOEXEC
- SOCK_NONBLOCK = 0x40000000 /* Atomically mark descriptor(s) as
- non-blocking. */
-#define SOCK_NONBLOCK SOCK_NONBLOCK
-};
-
-/* Protocol families. */
-#define PF_UNSPEC 0 /* Unspecified. */
-#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */
-#define PF_UNIX PF_LOCAL /* POSIX name for PF_LOCAL. */
-#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */
-#define PF_INET 2 /* IP protocol family. */
-#define PF_AX25 3 /* Amateur Radio AX.25. */
-#define PF_IPX 4 /* Novell Internet Protocol. */
-#define PF_APPLETALK 5 /* Appletalk DDP. */
-#define PF_NETROM 6 /* Amateur radio NetROM. */
-#define PF_BRIDGE 7 /* Multiprotocol bridge. */
-#define PF_ATMPVC 8 /* ATM PVCs. */
-#define PF_X25 9 /* Reserved for X.25 project. */
-#define PF_INET6 10 /* IP version 6. */
-#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */
-#define PF_DECnet 12 /* Reserved for DECnet project. */
-#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */
-#define PF_SECURITY 14 /* Security callback pseudo AF. */
-#define PF_KEY 15 /* PF_KEY key management API. */
-#define PF_NETLINK 16
-#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */
-#define PF_PACKET 17 /* Packet family. */
-#define PF_ASH 18 /* Ash. */
-#define PF_ECONET 19 /* Acorn Econet. */
-#define PF_ATMSVC 20 /* ATM SVCs. */
-#define PF_RDS 21 /* RDS sockets. */
-#define PF_SNA 22 /* Linux SNA Project */
-#define PF_IRDA 23 /* IRDA sockets. */
-#define PF_PPPOX 24 /* PPPoX sockets. */
-#define PF_WANPIPE 25 /* Wanpipe API sockets. */
-#define PF_LLC 26 /* Linux LLC. */
-#define PF_CAN 29 /* Controller Area Network. */
-#define PF_TIPC 30 /* TIPC sockets. */
-#define PF_BLUETOOTH 31 /* Bluetooth sockets. */
-#define PF_IUCV 32 /* IUCV sockets. */
-#define PF_RXRPC 33 /* RxRPC sockets. */
-#define PF_ISDN 34 /* mISDN sockets. */
-#define PF_PHONET 35 /* Phonet sockets. */
-#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */
-#define PF_CAIF 37 /* CAIF sockets. */
-#define PF_ALG 38 /* Algorithm sockets. */
-#define PF_NFC 39 /* NFC sockets. */
-#define PF_MAX 40 /* For now.. */
-
-/* Address families. */
-#define AF_UNSPEC PF_UNSPEC
-#define AF_LOCAL PF_LOCAL
-#define AF_UNIX PF_UNIX
-#define AF_FILE PF_FILE
-#define AF_INET PF_INET
-#define AF_AX25 PF_AX25
-#define AF_IPX PF_IPX
-#define AF_APPLETALK PF_APPLETALK
-#define AF_NETROM PF_NETROM
-#define AF_BRIDGE PF_BRIDGE
-#define AF_ATMPVC PF_ATMPVC
-#define AF_X25 PF_X25
-#define AF_INET6 PF_INET6
-#define AF_ROSE PF_ROSE
-#define AF_DECnet PF_DECnet
-#define AF_NETBEUI PF_NETBEUI
-#define AF_SECURITY PF_SECURITY
-#define AF_KEY PF_KEY
-#define AF_NETLINK PF_NETLINK
-#define AF_ROUTE PF_ROUTE
-#define AF_PACKET PF_PACKET
-#define AF_ASH PF_ASH
-#define AF_ECONET PF_ECONET
-#define AF_ATMSVC PF_ATMSVC
-#define AF_RDS PF_RDS
-#define AF_SNA PF_SNA
-#define AF_IRDA PF_IRDA
-#define AF_PPPOX PF_PPPOX
-#define AF_WANPIPE PF_WANPIPE
-#define AF_LLC PF_LLC
-#define AF_CAN PF_CAN
-#define AF_TIPC PF_TIPC
-#define AF_BLUETOOTH PF_BLUETOOTH
-#define AF_IUCV PF_IUCV
-#define AF_RXRPC PF_RXRPC
-#define AF_ISDN PF_ISDN
-#define AF_PHONET PF_PHONET
-#define AF_IEEE802154 PF_IEEE802154
-#define AF_CAIF PF_CAIF
-#define AF_ALG PF_ALG
-#define AF_NFC PF_NFC
-#define AF_MAX PF_MAX
-
-/* Socket level values. Others are defined in the appropriate headers.
-
- XXX These definitions also should go into the appropriate headers as
- far as they are available. */
-#define SOL_RAW 255
-#define SOL_DECNET 261
-#define SOL_X25 262
-#define SOL_PACKET 263
-#define SOL_ATM 264 /* ATM layer (cell level). */
-#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */
-#define SOL_IRDA 266
-
-/* Maximum queue length specifiable by listen. */
-#define SOMAXCONN 128
-
-/* Get the definition of the macro to define the common sockaddr members. */
-#include <bits/sockaddr.h>
-
-/* Structure describing a generic socket address. */
-struct sockaddr
- {
- __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */
- char sa_data[14]; /* Address data. */
- };
-
-
-/* Structure large enough to hold any socket address (with the historical
- exception of AF_UNIX). We reserve 128 bytes. */
-#define __ss_aligntype unsigned long int
-#define _SS_SIZE 128
-#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype)))
-
-struct sockaddr_storage
- {
- __SOCKADDR_COMMON (ss_); /* Address family, etc. */
- __ss_aligntype __ss_align; /* Force desired alignment. */
- char __ss_padding[_SS_PADSIZE];
- };
-
-
-/* Bits in the FLAGS argument to `send', `recv', et al. */
-enum
- {
- MSG_OOB = 0x01, /* Process out-of-band data. */
-#define MSG_OOB MSG_OOB
- MSG_PEEK = 0x02, /* Peek at incoming messages. */
-#define MSG_PEEK MSG_PEEK
- MSG_DONTROUTE = 0x04, /* Don't use local routing. */
-#define MSG_DONTROUTE MSG_DONTROUTE
-#ifdef __USE_GNU
- /* DECnet uses a different name. */
- MSG_TRYHARD = MSG_DONTROUTE,
-# define MSG_TRYHARD MSG_DONTROUTE
-#endif
- MSG_CTRUNC = 0x08, /* Control data lost before delivery. */
-#define MSG_CTRUNC MSG_CTRUNC
- MSG_PROXY = 0x10, /* Supply or ask second address. */
-#define MSG_PROXY MSG_PROXY
- MSG_TRUNC = 0x20,
-#define MSG_TRUNC MSG_TRUNC
- MSG_DONTWAIT = 0x40, /* Nonblocking IO. */
-#define MSG_DONTWAIT MSG_DONTWAIT
- MSG_EOR = 0x80, /* End of record. */
-#define MSG_EOR MSG_EOR
- MSG_WAITALL = 0x100, /* Wait for a full request. */
-#define MSG_WAITALL MSG_WAITALL
- MSG_FIN = 0x200,
-#define MSG_FIN MSG_FIN
- MSG_SYN = 0x400,
-#define MSG_SYN MSG_SYN
- MSG_CONFIRM = 0x800, /* Confirm path validity. */
-#define MSG_CONFIRM MSG_CONFIRM
- MSG_RST = 0x1000,
-#define MSG_RST MSG_RST
- MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */
-#define MSG_ERRQUEUE MSG_ERRQUEUE
- MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */
-#define MSG_NOSIGNAL MSG_NOSIGNAL
- MSG_MORE = 0x8000, /* Sender will send more. */
-#define MSG_MORE MSG_MORE
- MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/
-#define MSG_WAITFORONE MSG_WAITFORONE
-
- MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file
- descriptor received through
- SCM_RIGHTS. */
-#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC
- };
-
-
-/* Structure describing messages sent by
- `sendmsg' and received by `recvmsg'. */
-struct msghdr
- {
- void *msg_name; /* Address to send to/receive from. */
- socklen_t msg_namelen; /* Length of address data. */
-
- struct iovec *msg_iov; /* Vector of data to send/receive into. */
- size_t msg_iovlen; /* Number of elements in the vector. */
-
- void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
- size_t msg_controllen; /* Ancillary data buffer length.
- !! The type should be socklen_t but the
- definition of the kernel is incompatible
- with this. */
-
- int msg_flags; /* Flags on received message. */
- };
-
-#ifdef __USE_GNU
-/* For `recvmmsg'. */
-struct mmsghdr
- {
- struct msghdr msg_hdr; /* Actual message header. */
- unsigned int msg_len; /* Number of received bytes for the entry. */
- };
-#endif
-
-/* Structure used for storage of ancillary data object information. */
-struct cmsghdr
- {
- size_t cmsg_len; /* Length of data in cmsg_data plus length
- of cmsghdr structure.
- !! The type should be socklen_t but the
- definition of the kernel is incompatible
- with this. */
- int cmsg_level; /* Originating protocol. */
- int cmsg_type; /* Protocol specific type. */
-#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
- __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */
-#endif
- };
-
-/* Ancillary data object manipulation macros. */
-#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
-# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
-#else
-# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
-#endif
-#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
-#define CMSG_FIRSTHDR(mhdr) \
- ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
- ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
-#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
- & (size_t) ~(sizeof (size_t) - 1))
-#define CMSG_SPACE(len) (CMSG_ALIGN (len) \
- + CMSG_ALIGN (sizeof (struct cmsghdr)))
-#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
-
-extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
- struct cmsghdr *__cmsg) __THROW;
-#ifdef __USE_EXTERN_INLINES
-# ifndef _EXTERN_INLINE
-# define _EXTERN_INLINE __extern_inline
-# endif
-_EXTERN_INLINE struct cmsghdr *
-__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
-{
- if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
- /* The kernel header does this so there may be a reason. */
- return (struct cmsghdr *) 0;
-
- __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
- + CMSG_ALIGN (__cmsg->cmsg_len));
- if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
- + __mhdr->msg_controllen)
- || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
- > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
- /* No more entries. */
- return (struct cmsghdr *) 0;
- return __cmsg;
-}
-#endif /* Use `extern inline'. */
-
-/* Socket level message types. This must match the definitions in
- <linux/socket.h>. */
-enum
- {
- SCM_RIGHTS = 0x01 /* Transfer file descriptors. */
-#define SCM_RIGHTS SCM_RIGHTS
-#ifdef __USE_GNU
- , SCM_CREDENTIALS = 0x02 /* Credentials passing. */
-# define SCM_CREDENTIALS SCM_CREDENTIALS
-#endif
- };
-
-#ifdef __USE_GNU
-/* User visible structure for SCM_CREDENTIALS message */
-struct ucred
-{
- pid_t pid; /* PID of sending process. */
- uid_t uid; /* UID of sending process. */
- gid_t gid; /* GID of sending process. */
-};
-#endif
-
-/* Ugly workaround for unclean kernel headers. */
-#if !defined __USE_MISC && !defined __USE_GNU
-# ifndef FIOGETOWN
-# define __SYS_SOCKET_H_undef_FIOGETOWN
-# endif
-# ifndef FIOSETOWN
-# define __SYS_SOCKET_H_undef_FIOSETOWN
-# endif
-# ifndef SIOCATMARK
-# define __SYS_SOCKET_H_undef_SIOCATMARK
-# endif
-# ifndef SIOCGPGRP
-# define __SYS_SOCKET_H_undef_SIOCGPGRP
-# endif
-# ifndef SIOCGSTAMP
-# define __SYS_SOCKET_H_undef_SIOCGSTAMP
-# endif
-# ifndef SIOCGSTAMPNS
-# define __SYS_SOCKET_H_undef_SIOCGSTAMPNS
-# endif
-# ifndef SIOCSPGRP
-# define __SYS_SOCKET_H_undef_SIOCSPGRP
-# endif
-#endif
-
-/* Get socket manipulation related informations from kernel headers. */
-#include <asm/socket.h>
-
-#if !defined __USE_MISC && !defined __USE_GNU
-# ifdef __SYS_SOCKET_H_undef_FIOGETOWN
-# undef __SYS_SOCKET_H_undef_FIOGETOWN
-# undef FIOGETOWN
-# endif
-# ifdef __SYS_SOCKET_H_undef_FIOSETOWN
-# undef __SYS_SOCKET_H_undef_FIOSETOWN
-# undef FIOSETOWN
-# endif
-# ifdef __SYS_SOCKET_H_undef_SIOCATMARK
-# undef __SYS_SOCKET_H_undef_SIOCATMARK
-# undef SIOCATMARK
-# endif
-# ifdef __SYS_SOCKET_H_undef_SIOCGPGRP
-# undef __SYS_SOCKET_H_undef_SIOCGPGRP
-# undef SIOCGPGRP
-# endif
-# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMP
-# undef __SYS_SOCKET_H_undef_SIOCGSTAMP
-# undef SIOCGSTAMP
-# endif
-# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMPNS
-# undef __SYS_SOCKET_H_undef_SIOCGSTAMPNS
-# undef SIOCGSTAMPNS
-# endif
-# ifdef __SYS_SOCKET_H_undef_SIOCSPGRP
-# undef __SYS_SOCKET_H_undef_SIOCSPGRP
-# undef SIOCSPGRP
-# endif
-#endif
-
-/* Structure used to manipulate the SO_LINGER option. */
-struct linger
- {
- int l_onoff; /* Nonzero to linger on close. */
- int l_linger; /* Time to linger. */
- };
-
-
-__BEGIN_DECLS
-
-#ifdef __USE_GNU
-/* Receive up to VLEN messages as described by VMESSAGES from socket FD.
- Returns the number of bytes read or -1 for errors.
-
- This function is a cancellation point and therefore not marked with
- __THROW. */
-extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
- unsigned int __vlen, int __flags,
- const struct timespec *__tmo);
-
-/* Send a VLEN messages as described by VMESSAGES to socket FD.
- Return the number of datagrams successfully written or -1 for errors.
-This function is a cancellation point and therefore not marked with
- __THROW. */
-extern int sendmmsg (int __fd, struct mmsghdr *__vmessages,
- unsigned int __vlen, int __flags);
-#endif
-
-__END_DECLS
-
-#endif /* bits/socket.h */
diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/bits/socket_type.h b/libc/ports/sysdeps/unix/sysv/linux/hppa/bits/socket_type.h
new file mode 100644
index 000000000..ae2df6dd8
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/hppa/bits/socket_type.h
@@ -0,0 +1,55 @@
+/* Define enum __socket_type for Linux/HP-PARISC.
+ 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/>. */
+
+#ifndef _SYS_SOCKET_H
+# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
+#endif
+
+/* Types of sockets. */
+enum __socket_type
+{
+ SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
+ byte streams. */
+#define SOCK_STREAM SOCK_STREAM
+ SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
+ of fixed maximum length. */
+#define SOCK_DGRAM SOCK_DGRAM
+ SOCK_RAW = 3, /* Raw protocol interface. */
+#define SOCK_RAW SOCK_RAW
+ SOCK_RDM = 4, /* Reliably-delivered messages. */
+#define SOCK_RDM SOCK_RDM
+ SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
+ datagrams of fixed maximum length. */
+#define SOCK_SEQPACKET SOCK_SEQPACKET
+ SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */
+#define SOCK_DCCP SOCK_DCCP
+ SOCK_PACKET = 10, /* Linux specific way of getting packets
+ at the dev level. For writing rarp and
+ other similar things on the user level. */
+#define SOCK_PACKET SOCK_PACKET
+
+ /* Flags to be ORed into the type parameter of socket and socketpair and
+ used for the flags parameter of paccept. */
+
+ SOCK_CLOEXEC = 010000000, /* Atomically set close-on-exec flag for the
+ new descriptor(s). */
+#define SOCK_CLOEXEC SOCK_CLOEXEC
+ SOCK_NONBLOCK = 0x40000000 /* Atomically mark descriptor(s) as
+ non-blocking. */
+#define SOCK_NONBLOCK SOCK_NONBLOCK
+};
diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/mmap.c b/libc/ports/sysdeps/unix/sysv/linux/hppa/mmap.c
index 420d6567a..12e700dcb 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/hppa/mmap.c
+++ b/libc/ports/sysdeps/unix/sysv/linux/hppa/mmap.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994-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
@@ -36,7 +36,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
__ptr_t ret;
- ret = INLINE_SYSCALL(mmap, 6, addr, len, prot, flags, fd, offset);
+ ret = (__ptr_t) INLINE_SYSCALL (mmap, 6, addr, len, prot, flags, fd, offset);
/* check if it's really a negative number */
if(((unsigned long)ret & 0xfffff000) == 0xfffff000)
diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c b/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c
index 974819ead..b920ebb22 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c
+++ b/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
@@ -90,4 +90,4 @@ __pthread_once (once_control, init_routine)
return 0;
}
weak_alias (__pthread_once, pthread_once)
-strong_alias (__pthread_once, __pthread_once_internal)
+hidden_def (__pthread_once)
diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h b/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h
index 4dbed8d37..73fdaeaaa 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
@@ -88,6 +88,18 @@
__ret; \
})
+#define lll_futex_timed_wait_bitset(futexp, val, timespec, clockbit, private) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ int __op = FUTEX_WAIT_BITSET | clockbit; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 6, (long) (futexp), \
+ __lll_private_flag (__op, private), \
+ (val), (timespec), NULL /* Unused. */, \
+ FUTEX_BITSET_MATCH_ANY); \
+ __ret; \
+ })
+
#define lll_futex_wake(futexp, nr, private) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h b/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h
index 249e0e29f..e29589809 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/sysdep-cancel.h
@@ -69,8 +69,6 @@
# define _DOCARGS_2(n) DOCARGS_0 move.l n+4(%sp), %d2; _DOCARGS_1 (n)
# define UNDOCARGS_2 UNDOCARGS_0
-/* TODO: We can optimize DOCARGS_{3, 4} by saving registers to a0 and a1
- instead of pushing them on stack. */
# define DOCARGS_3 _DOCARGS_3 (12)
# define _DOCARGS_3(n) move.l %d3, -(%sp); \
cfi_adjust_cfa_offset (4); cfi_rel_offset (%d3, 0); \
@@ -86,9 +84,11 @@
cfi_adjust_cfa_offset (-4); cfi_restore (%d4);
# define DOCARGS_5 _DOCARGS_5 (20)
-# define _DOCARGS_5(n) move.l %d5, %a1; cfi_register (%d5, a1); \
- move.l n(%sp), %d5; _DOCARGS_4 (n-4)
-# define UNDOCARGS_5 UNDOCARGS_4 move.l %a1, %d5; cfi_restore (%d5);
+# define _DOCARGS_5(n) move.l %d5, -(%sp); \
+ cfi_adjust_cfa_offset (4); cfi_rel_offset (%d5, 0); \
+ move.l n+4(%sp), %d5; _DOCARGS_4 (n)
+# define UNDOCARGS_5 UNDOCARGS_4 move.l (%sp)+, %d5; \
+ cfi_adjust_cfa_offset (-4); cfi_restore (%d5);
# define DOCARGS_6 _DOCARGS_6 (24)
# define _DOCARGS_6(n) move.l n(%sp), %a0; _DOCARGS_5 (n-4)
diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c b/libc/ports/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c
index d8da27024..943b40414 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c
+++ b/libc/ports/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009-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
@@ -29,7 +29,7 @@
int ret = __sigaltstack (NULL, &ss); \
if (ret == 0 \
&& (!(ss.ss_flags & SS_ONSTACK) \
- || ((unsigned sp_type) ((sp_type) ss.ss_sp \
+ || ((unsigned sp_type) ((sp_type) (long) ss.ss_sp \
+ (sp_type) ss.ss_size \
- sp_saved) \
< ss.ss_size))) \
diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/libc/ports/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
index 8c024b024..2b683a986 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
@@ -60,13 +60,13 @@
result_var; })
#undef INTERNAL_SYSCALL_DECL
-#define INTERNAL_SYSCALL_DECL(err) long err
+#define INTERNAL_SYSCALL_DECL(err) long err __attribute__ ((unused))
#undef INTERNAL_SYSCALL_ERROR_P
-#define INTERNAL_SYSCALL_ERROR_P(val, err) ((long) (err))
+#define INTERNAL_SYSCALL_ERROR_P(val, err) ((void) (val), (long) (err))
#undef INTERNAL_SYSCALL_ERRNO
-#define INTERNAL_SYSCALL_ERRNO(val, err) (val)
+#define INTERNAL_SYSCALL_ERRNO(val, err) ((void) (err), val)
#undef INTERNAL_SYSCALL
#define INTERNAL_SYSCALL(name, err, nr, args...) \
@@ -104,7 +104,7 @@
\
{ \
register long __v0 asm("$2") ncs_init; \
- register long __a0 asm("$4") = (long) arg1; \
+ register long __a0 asm("$4") = (long) (arg1); \
register long __a3 asm("$7"); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
@@ -126,8 +126,8 @@
\
{ \
register long __v0 asm("$2") ncs_init; \
- register long __a0 asm("$4") = (long) arg1; \
- register long __a1 asm("$5") = (long) arg2; \
+ register long __a0 asm("$4") = (long) (arg1); \
+ register long __a1 asm("$5") = (long) (arg2); \
register long __a3 asm("$7"); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
@@ -149,9 +149,9 @@
\
{ \
register long __v0 asm("$2") ncs_init; \
- register long __a0 asm("$4") = (long) arg1; \
- register long __a1 asm("$5") = (long) arg2; \
- register long __a2 asm("$6") = (long) arg3; \
+ register long __a0 asm("$4") = (long) (arg1); \
+ register long __a1 asm("$5") = (long) (arg2); \
+ register long __a2 asm("$6") = (long) (arg3); \
register long __a3 asm("$7"); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
@@ -173,10 +173,10 @@
\
{ \
register long __v0 asm("$2") ncs_init; \
- register long __a0 asm("$4") = (long) arg1; \
- register long __a1 asm("$5") = (long) arg2; \
- register long __a2 asm("$6") = (long) arg3; \
- register long __a3 asm("$7") = (long) arg4; \
+ register long __a0 asm("$4") = (long) (arg1); \
+ register long __a1 asm("$5") = (long) (arg2); \
+ register long __a2 asm("$6") = (long) (arg3); \
+ register long __a3 asm("$7") = (long) (arg4); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
cs_init \
@@ -205,10 +205,10 @@
FORCE_FRAME_POINTER; \
{ \
register long __v0 asm("$2") ncs_init; \
- register long __a0 asm("$4") = (long) arg1; \
- register long __a1 asm("$5") = (long) arg2; \
- register long __a2 asm("$6") = (long) arg3; \
- register long __a3 asm("$7") = (long) arg4; \
+ register long __a0 asm("$4") = (long) (arg1); \
+ register long __a1 asm("$5") = (long) (arg2); \
+ register long __a2 asm("$6") = (long) (arg3); \
+ register long __a3 asm("$7") = (long) (arg4); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
"subu\t$29, 32\n\t" \
@@ -219,7 +219,7 @@
".set\treorder" \
: "=r" (__v0), "+r" (__a3) \
: input, "r" (__a0), "r" (__a1), "r" (__a2), \
- "r" ((long)arg5) \
+ "r" ((long) (arg5)) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
@@ -234,10 +234,10 @@
FORCE_FRAME_POINTER; \
{ \
register long __v0 asm("$2") ncs_init; \
- register long __a0 asm("$4") = (long) arg1; \
- register long __a1 asm("$5") = (long) arg2; \
- register long __a2 asm("$6") = (long) arg3; \
- register long __a3 asm("$7") = (long) arg4; \
+ register long __a0 asm("$4") = (long) (arg1); \
+ register long __a1 asm("$5") = (long) (arg2); \
+ register long __a2 asm("$6") = (long) (arg3); \
+ register long __a3 asm("$7") = (long) (arg4); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
"subu\t$29, 32\n\t" \
@@ -249,7 +249,7 @@
".set\treorder" \
: "=r" (__v0), "+r" (__a3) \
: input, "r" (__a0), "r" (__a1), "r" (__a2), \
- "r" ((long)arg5), "r" ((long)arg6) \
+ "r" ((long) (arg5)), "r" ((long) (arg6)) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
@@ -264,10 +264,10 @@
FORCE_FRAME_POINTER; \
{ \
register long __v0 asm("$2") ncs_init; \
- register long __a0 asm("$4") = (long) arg1; \
- register long __a1 asm("$5") = (long) arg2; \
- register long __a2 asm("$6") = (long) arg3; \
- register long __a3 asm("$7") = (long) arg4; \
+ register long __a0 asm("$4") = (long) (arg1); \
+ register long __a1 asm("$5") = (long) (arg2); \
+ register long __a2 asm("$6") = (long) (arg3); \
+ register long __a3 asm("$7") = (long) (arg4); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
"subu\t$29, 32\n\t" \
@@ -280,7 +280,7 @@
".set\treorder" \
: "=r" (__v0), "+r" (__a3) \
: input, "r" (__a0), "r" (__a1), "r" (__a2), \
- "r" ((long)arg5), "r" ((long)arg6), "r" ((long)arg7) \
+ "r" ((long) (arg5)), "r" ((long) (arg6)), "r" ((long) (arg7)) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
index 98088d32f..23b1c9772 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
@@ -64,13 +64,13 @@
result_var; })
#undef INTERNAL_SYSCALL_DECL
-#define INTERNAL_SYSCALL_DECL(err) long err
+#define INTERNAL_SYSCALL_DECL(err) long err __attribute__ ((unused))
#undef INTERNAL_SYSCALL_ERROR_P
-#define INTERNAL_SYSCALL_ERROR_P(val, err) ((long) (err))
+#define INTERNAL_SYSCALL_ERROR_P(val, err) ((void) (val), (long) (err))
#undef INTERNAL_SYSCALL_ERRNO
-#define INTERNAL_SYSCALL_ERRNO(val, err) (val)
+#define INTERNAL_SYSCALL_ERRNO(val, err) ((void) (err), val)
#undef INTERNAL_SYSCALL
#define INTERNAL_SYSCALL(name, err, nr, args...) \
diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/sendfile64.c b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/sendfile64.c
new file mode 100644
index 000000000..4c451bd09
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/sendfile64.c
@@ -0,0 +1 @@
+/* sendfile64 is alias of sendfile syscall. */
diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
index c94fe75a7..b23a2a1d1 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
+++ b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
@@ -8,3 +8,5 @@ fanotify_mark EXTRA fanotify_mark i:iiiis fanotify_mark
fstatfs - fstatfs i:ip __fstatfs fstatfs fstatfs64 __fstatfs64
statfs - statfs i:sp __statfs statfs statfs64 __statfs64
+
+sendfile - sendfile i:iipi sendfile sendfile64
diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
index 0baa94f1d..02f196a83 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
@@ -60,13 +60,13 @@
result_var; })
#undef INTERNAL_SYSCALL_DECL
-#define INTERNAL_SYSCALL_DECL(err) long err
+#define INTERNAL_SYSCALL_DECL(err) long err __attribute__ ((unused))
#undef INTERNAL_SYSCALL_ERROR_P
-#define INTERNAL_SYSCALL_ERROR_P(val, err) ((long) (err))
+#define INTERNAL_SYSCALL_ERROR_P(val, err) ((void) (val), (long) (err))
#undef INTERNAL_SYSCALL_ERRNO
-#define INTERNAL_SYSCALL_ERRNO(val, err) (val)
+#define INTERNAL_SYSCALL_ERRNO(val, err) ((void) (err), val)
#undef INTERNAL_SYSCALL
#define INTERNAL_SYSCALL(name, err, nr, args...) \
@@ -104,7 +104,7 @@
\
{ \
register long __v0 asm("$2") ncs_init; \
- register long __a0 asm("$4") = (long) arg1; \
+ register long __a0 asm("$4") = (long) (arg1); \
register long __a3 asm("$7"); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
@@ -126,8 +126,8 @@
\
{ \
register long __v0 asm("$2") ncs_init; \
- register long __a0 asm("$4") = (long) arg1; \
- register long __a1 asm("$5") = (long) arg2; \
+ register long __a0 asm("$4") = (long) (arg1); \
+ register long __a1 asm("$5") = (long) (arg2); \
register long __a3 asm("$7"); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
@@ -149,9 +149,9 @@
\
{ \
register long __v0 asm("$2") ncs_init; \
- register long __a0 asm("$4") = (long) arg1; \
- register long __a1 asm("$5") = (long) arg2; \
- register long __a2 asm("$6") = (long) arg3; \
+ register long __a0 asm("$4") = (long) (arg1); \
+ register long __a1 asm("$5") = (long) (arg2); \
+ register long __a2 asm("$6") = (long) (arg3); \
register long __a3 asm("$7"); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
@@ -173,10 +173,10 @@
\
{ \
register long __v0 asm("$2") ncs_init; \
- register long __a0 asm("$4") = (long) arg1; \
- register long __a1 asm("$5") = (long) arg2; \
- register long __a2 asm("$6") = (long) arg3; \
- register long __a3 asm("$7") = (long) arg4; \
+ register long __a0 asm("$4") = (long) (arg1); \
+ register long __a1 asm("$5") = (long) (arg2); \
+ register long __a2 asm("$6") = (long) (arg3); \
+ register long __a3 asm("$7") = (long) (arg4); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
cs_init \
@@ -197,11 +197,11 @@
\
{ \
register long __v0 asm("$2") ncs_init; \
- register long __a0 asm("$4") = (long) arg1; \
- register long __a1 asm("$5") = (long) arg2; \
- register long __a2 asm("$6") = (long) arg3; \
- register long __a3 asm("$7") = (long) arg4; \
- register long __a4 asm("$8") = (long) arg5; \
+ register long __a0 asm("$4") = (long) (arg1); \
+ register long __a1 asm("$5") = (long) (arg2); \
+ register long __a2 asm("$6") = (long) (arg3); \
+ register long __a3 asm("$7") = (long) (arg4); \
+ register long __a4 asm("$8") = (long) (arg5); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
cs_init \
@@ -222,12 +222,12 @@
\
{ \
register long __v0 asm("$2") ncs_init; \
- register long __a0 asm("$4") = (long) arg1; \
- register long __a1 asm("$5") = (long) arg2; \
- register long __a2 asm("$6") = (long) arg3; \
- register long __a3 asm("$7") = (long) arg4; \
- register long __a4 asm("$8") = (long) arg5; \
- register long __a5 asm("$9") = (long) arg6; \
+ register long __a0 asm("$4") = (long) (arg1); \
+ register long __a1 asm("$5") = (long) (arg2); \
+ register long __a2 asm("$6") = (long) (arg3); \
+ register long __a3 asm("$7") = (long) (arg4); \
+ register long __a4 asm("$8") = (long) (arg5); \
+ register long __a5 asm("$9") = (long) (arg6); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
cs_init \
diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/register-dump.h b/libc/ports/sysdeps/unix/sysv/linux/mips/register-dump.h
index 186228119..0156910e4 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/mips/register-dump.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/mips/register-dump.h
@@ -17,9 +17,26 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
+#include <sgidefs.h>
#include <sys/uio.h>
#include <_itoa.h>
+#if _MIPS_SIM == _ABIO32
+# define CTX_TYPE struct sigcontext *
+# define CTX_REG(ctx, i) ((ctx)->sc_regs[(i)])
+# define CTX_PC(ctx) ((ctx)->sc_pc)
+# define CTX_MDHI(ctx) ((ctx)->sc_mdhi)
+# define CTX_MDLO(ctx) ((ctx)->sc_mdlo)
+# define REG_HEX_SIZE 8
+#else
+# define CTX_TYPE ucontext_t *
+# define CTX_REG(ctx, i) ((ctx)->uc_mcontext.gregs[(i)])
+# define CTX_PC(ctx) ((ctx)->uc_mcontext.pc)
+# define CTX_MDHI(ctx) ((ctx)->uc_mcontext.mdhi)
+# define CTX_MDLO(ctx) ((ctx)->uc_mcontext.mdhi)
+# define REG_HEX_SIZE 16
+#endif
+
/* We will print the register dump in this format:
R0 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
@@ -32,7 +49,7 @@
*/
static void
-hexvalue (unsigned long int value, char *buf, size_t len)
+hexvalue (_ITOA_WORD_TYPE value, char *buf, size_t len)
{
char *cp = _itoa_word (value, buf + len, 16, 0);
while (cp > buf)
@@ -40,9 +57,9 @@ hexvalue (unsigned long int value, char *buf, size_t len)
}
static void
-register_dump (int fd, struct sigcontext *ctx)
+register_dump (int fd, CTX_TYPE ctx)
{
- char regs[38][8];
+ char regs[38][REG_HEX_SIZE];
struct iovec iov[38 * 2 + 10];
size_t nr = 0;
int i;
@@ -58,40 +75,40 @@ register_dump (int fd, struct sigcontext *ctx)
/* Generate strings of register contents. */
for (i = 0; i < 32; i++)
- hexvalue (ctx->sc_regs[i], regs[i], 8);
- hexvalue (ctx->sc_pc, regs[32], 8);
- hexvalue (ctx->sc_mdhi, regs[33], 8);
- hexvalue (ctx->sc_mdlo, regs[34], 8);
+ hexvalue (CTX_REG (ctx, i), regs[i], REG_HEX_SIZE);
+ hexvalue (CTX_PC (ctx), regs[32], REG_HEX_SIZE);
+ hexvalue (CTX_MDHI (ctx), regs[33], REG_HEX_SIZE);
+ hexvalue (CTX_MDLO (ctx), regs[34], REG_HEX_SIZE);
/* Generate the output. */
ADD_STRING ("Register dump:\n\n R0 ");
for (i = 0; i < 8; i++)
{
- ADD_MEM (regs[i], 8);
+ ADD_MEM (regs[i], REG_HEX_SIZE);
ADD_STRING (" ");
}
ADD_STRING ("\n R8 ");
for (i = 8; i < 16; i++)
{
- ADD_MEM (regs[i], 8);
+ ADD_MEM (regs[i], REG_HEX_SIZE);
ADD_STRING (" ");
}
ADD_STRING ("\n R16 ");
for (i = 16; i < 24; i++)
{
- ADD_MEM (regs[i], 8);
+ ADD_MEM (regs[i], REG_HEX_SIZE);
ADD_STRING (" ");
}
ADD_STRING ("\n R24 ");
for (i = 24; i < 32; i++)
{
- ADD_MEM (regs[i], 8);
+ ADD_MEM (regs[i], REG_HEX_SIZE);
ADD_STRING (" ");
}
ADD_STRING ("\n pc lo hi\n ");
for (i = 32; i < 35; i++)
{
- ADD_MEM (regs[i], 8);
+ ADD_MEM (regs[i], REG_HEX_SIZE);
ADD_STRING (" ");
}
ADD_STRING ("\n");
diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/libc/ports/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
index 9edde2168..7793e2147 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 2000.
@@ -23,9 +23,9 @@
#define SIGCONTEXT unsigned long _code, struct sigcontext *
#define SIGCONTEXT_EXTRA_ARGS _code,
-#define GET_PC(ctx) ((void *) ctx->sc_pc)
-#define GET_FRAME(ctx) ((void *) ctx->sc_regs[30])
-#define GET_STACK(ctx) ((void *) ctx->sc_regs[29])
+#define GET_PC(ctx) ((void *) (unsigned long) ctx->sc_pc)
+#define GET_FRAME(ctx) ((void *) (unsigned long) ctx->sc_regs[30])
+#define GET_STACK(ctx) ((void *) (unsigned long) ctx->sc_regs[29])
#define CALL_SIGHANDLER(handler, signo, ctx) \
(handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
@@ -33,9 +33,9 @@
#define SIGCONTEXT unsigned long _code, ucontext_t *
#define SIGCONTEXT_EXTRA_ARGS _code,
-#define GET_PC(ctx) ((void *) ctx->uc_mcontext.pc)
-#define GET_FRAME(ctx) ((void *) ctx->uc_mcontext.gregs[30])
-#define GET_STACK(ctx) ((void *) ctx->uc_mcontext.gregs[29])
+#define GET_PC(ctx) ((void *) (unsigned long) ctx->uc_mcontext.pc)
+#define GET_FRAME(ctx) ((void *) (unsigned long) ctx->uc_mcontext.gregs[30])
+#define GET_STACK(ctx) ((void *) (unsigned long) ctx->uc_mcontext.gregs[29])
#define CALL_SIGHANDLER(handler, signo, ctx) \
(handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))