aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/ChangeLog.aarch6431
-rw-r--r--ports/sysdeps/aarch64/fpu/s_ceil.c21
-rw-r--r--ports/sysdeps/aarch64/fpu/s_ceilf.c21
-rw-r--r--ports/sysdeps/aarch64/fpu/s_floor.c21
-rw-r--r--ports/sysdeps/aarch64/fpu/s_floorf.c21
-rw-r--r--ports/sysdeps/aarch64/fpu/s_fma.c56
-rw-r--r--ports/sysdeps/aarch64/fpu/s_fmaf.c22
-rw-r--r--ports/sysdeps/aarch64/fpu/s_fmax.c21
-rw-r--r--ports/sysdeps/aarch64/fpu/s_fmaxf.c23
-rw-r--r--ports/sysdeps/aarch64/fpu/s_fmin.c57
-rw-r--r--ports/sysdeps/aarch64/fpu/s_fminf.c22
-rw-r--r--ports/sysdeps/aarch64/fpu/s_frint.x56
-rw-r--r--ports/sysdeps/aarch64/fpu/s_frintf.x24
-rw-r--r--ports/sysdeps/aarch64/fpu/s_llrint.c21
-rw-r--r--ports/sysdeps/aarch64/fpu/s_llrintf.c23
-rw-r--r--ports/sysdeps/aarch64/fpu/s_llround.c21
-rw-r--r--ports/sysdeps/aarch64/fpu/s_llroundf.c23
-rw-r--r--ports/sysdeps/aarch64/fpu/s_lrint.c60
-rw-r--r--ports/sysdeps/aarch64/fpu/s_lrintf.c22
-rw-r--r--ports/sysdeps/aarch64/fpu/s_lround.c58
-rw-r--r--ports/sysdeps/aarch64/fpu/s_lroundf.c22
-rw-r--r--ports/sysdeps/aarch64/fpu/s_nearbyint.c21
-rw-r--r--ports/sysdeps/aarch64/fpu/s_nearbyintf.c21
-rw-r--r--ports/sysdeps/aarch64/fpu/s_rint.c21
-rw-r--r--ports/sysdeps/aarch64/fpu/s_rintf.c21
-rw-r--r--ports/sysdeps/aarch64/fpu/s_round.c21
-rw-r--r--ports/sysdeps/aarch64/fpu/s_roundf.c21
-rw-r--r--ports/sysdeps/aarch64/fpu/s_trunc.c21
-rw-r--r--ports/sysdeps/aarch64/fpu/s_truncf.c21
29 files changed, 812 insertions, 2 deletions
diff --git a/ports/ChangeLog.aarch64 b/ports/ChangeLog.aarch64
index 58f6fd014e..941a5f9012 100644
--- a/ports/ChangeLog.aarch64
+++ b/ports/ChangeLog.aarch64
@@ -1,3 +1,34 @@
+2012-11-19 Marcus Shawcroft <marcus.shawcroft@linaro.org>
+
+ * sysdeps/aarch64/fpu/s_ceil.c: New file.
+ * sysdeps/aarch64/fpu/s_ceilf.c: New file.
+ * sysdeps/aarch64/fpu/s_floor.c: New file.
+ * sysdeps/aarch64/fpu/s_floorf.c: New file.
+ * sysdeps/aarch64/fpu/s_fma.c: Replace file.
+ * sysdeps/aarch64/fpu/s_fmaf.c: New file.
+ * sysdeps/aarch64/fpu/s_fmax.c: New file.
+ * sysdeps/aarch64/fpu/s_fmaxf.c: New file.
+ * sysdeps/aarch64/fpu/s_fmin.c: New file.
+ * sysdeps/aarch64/fpu/s_fminf.c: New file.
+ * sysdeps/aarch64/fpu/s_frint.x: New file.
+ * sysdeps/aarch64/fpu/s_frintf.x: New file.
+ * sysdeps/aarch64/fpu/s_llrint.c: New file.
+ * sysdeps/aarch64/fpu/s_llrintf.c: New file.
+ * sysdeps/aarch64/fpu/s_llround.c: New file.
+ * sysdeps/aarch64/fpu/s_llroundf.c: New file.
+ * sysdeps/aarch64/fpu/s_lrint.c: New file.
+ * sysdeps/aarch64/fpu/s_lrintf.c: New file.
+ * sysdeps/aarch64/fpu/s_lround.c: New file.
+ * sysdeps/aarch64/fpu/s_lroundf.c: New file.
+ * sysdeps/aarch64/fpu/s_nearbyint.c: New file.
+ * sysdeps/aarch64/fpu/s_nearbyintf.c: New file.
+ * sysdeps/aarch64/fpu/s_rint.c: New file.
+ * sysdeps/aarch64/fpu/s_rintf.c: New file.
+ * sysdeps/aarch64/fpu/s_round.c: New file.
+ * sysdeps/aarch64/fpu/s_roundf.c: New file.
+ * sysdeps/aarch64/fpu/s_trunc.c: New file.
+ * sysdeps/aarch64/fpu/s_truncf.c: New file.
+
2012-11-09 Marcus Shawcroft <marcus.shawcroft@linaro.org>
* sysdeps/aarch64/Implies: New file.
diff --git a/ports/sysdeps/aarch64/fpu/s_ceil.c b/ports/sysdeps/aarch64/fpu/s_ceil.c
new file mode 100644
index 0000000000..087b9b49e7
--- /dev/null
+++ b/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.x>
diff --git a/ports/sysdeps/aarch64/fpu/s_ceilf.c b/ports/sysdeps/aarch64/fpu/s_ceilf.c
new file mode 100644
index 0000000000..e503f991b3
--- /dev/null
+++ b/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.x>
diff --git a/ports/sysdeps/aarch64/fpu/s_floor.c b/ports/sysdeps/aarch64/fpu/s_floor.c
new file mode 100644
index 0000000000..3f914b6454
--- /dev/null
+++ b/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.x>
diff --git a/ports/sysdeps/aarch64/fpu/s_floorf.c b/ports/sysdeps/aarch64/fpu/s_floorf.c
new file mode 100644
index 0000000000..f5452c5bc2
--- /dev/null
+++ b/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.x>
diff --git a/ports/sysdeps/aarch64/fpu/s_fma.c b/ports/sysdeps/aarch64/fpu/s_fma.c
index 8f62605870..7d8bd77aae 100644
--- a/ports/sysdeps/aarch64/fpu/s_fma.c
+++ b/ports/sysdeps/aarch64/fpu/s_fma.c
@@ -1,2 +1,54 @@
-/* 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) (x, y, z)
+ 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;
+}
+
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (__CONCATX(__,FUNC), FUNC)
+#define strong_aliasx(a,b) strong_alias(a,b)
+#ifdef NO_LONG_DOUBLE
+strong_aliasx (__CONCATX(__,FUNC), __CONCATX(__,__CONCATX(FUNC,l)))
+weak_aliasx (__CONCATX(__,FUNC), __CONCATX(FUNC,l))
+#endif
diff --git a/ports/sysdeps/aarch64/fpu/s_fmaf.c b/ports/sysdeps/aarch64/fpu/s_fmaf.c
new file mode 100644
index 0000000000..bcda67bef8
--- /dev/null
+++ b/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/ports/sysdeps/aarch64/fpu/s_fmax.c b/ports/sysdeps/aarch64/fpu/s_fmax.c
new file mode 100644
index 0000000000..6fe1ecc249
--- /dev/null
+++ b/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/ports/sysdeps/aarch64/fpu/s_fmaxf.c b/ports/sysdeps/aarch64/fpu/s_fmaxf.c
new file mode 100644
index 0000000000..fa2a4bd0dc
--- /dev/null
+++ b/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/ports/sysdeps/aarch64/fpu/s_fmin.c b/ports/sysdeps/aarch64/fpu/s_fmin.c
new file mode 100644
index 0000000000..3214aa80b4
--- /dev/null
+++ b/ports/sysdeps/aarch64/fpu/s_fmin.c
@@ -0,0 +1,57 @@
+/* Copyright (C) 1996, 1997, 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/>. */
+
+#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) (x, y)
+ TYPE x;
+ TYPE y;
+{
+ TYPE result;
+ asm ( INSN "\t%" REGS "0, %" REGS "1, %" REGS "2"
+ : "=w" (result) : "w" (x), "w" (y) );
+ return result;
+}
+
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (__CONCATX(__,FUNC), FUNC)
+#define strong_aliasx(a,b) strong_alias(a,b)
+#ifdef NO_LONG_DOUBLE
+strong_aliasx (__CONCATX(__,FUNC), __CONCATX(__,__CONCATX(FUNC,l)))
+weak_aliasx (__CONCATX(__,FUNC), __CONCATX(FUNC,l))
+#endif
diff --git a/ports/sysdeps/aarch64/fpu/s_fminf.c b/ports/sysdeps/aarch64/fpu/s_fminf.c
new file mode 100644
index 0000000000..5e8b60e878
--- /dev/null
+++ b/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/ports/sysdeps/aarch64/fpu/s_frint.x b/ports/sysdeps/aarch64/fpu/s_frint.x
new file mode 100644
index 0000000000..b3e21e13c1
--- /dev/null
+++ b/ports/sysdeps/aarch64/fpu/s_frint.x
@@ -0,0 +1,56 @@
+/* Copyright (C) 1996, 1997, 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/>. */
+
+#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) (x)
+ TYPE x;
+{
+ TYPE result;
+ asm ( INSN "\t%" REGS "0, %" REGS "1" :
+ "=w" (result) : "w" (x) );
+ return result;
+}
+
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (__CONCATX(__,FUNC), FUNC)
+#define strong_aliasx(a,b) strong_alias(a,b)
+#ifdef NO_LONG_DOUBLE
+strong_aliasx (__CONCATX(__,FUNC), __CONCATX(__,__CONCATX(FUNC,l)))
+weak_aliasx (__CONCATX(__,FUNC), __CONCATX(FUNC,l))
+#endif
diff --git a/ports/sysdeps/aarch64/fpu/s_frintf.x b/ports/sysdeps/aarch64/fpu/s_frintf.x
new file mode 100644
index 0000000000..8ce97df880
--- /dev/null
+++ b/ports/sysdeps/aarch64/fpu/s_frintf.x
@@ -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.x>
diff --git a/ports/sysdeps/aarch64/fpu/s_llrint.c b/ports/sysdeps/aarch64/fpu/s_llrint.c
new file mode 100644
index 0000000000..6eceb6821f
--- /dev/null
+++ b/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