diff options
Diffstat (limited to 'sysdeps/m68k/coldfire')
-rw-r--r-- | sysdeps/m68k/coldfire/atomic-machine.h | 5 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/e_sqrt.c | 2 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/e_sqrtf.c | 2 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/fraiseexcpt.c | 2 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/libm-test-ulps-name | 1 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/s_fabs.c | 10 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/s_fabsf.c | 6 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/s_lrint.c | 10 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/s_lrintf.c | 6 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/s_rint.c | 10 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/fpu/s_rintf.c | 6 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/ldbl-classify-compat.h (renamed from sysdeps/m68k/coldfire/fpu/math_private.h) | 6 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/math-tests.h (renamed from sysdeps/m68k/coldfire/fpu/bits/mathinline.h) | 39 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/nofpu/Implies | 1 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/nofpu/s_fma.c | 1 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/nofpu/s_fmaf.c | 1 | ||||
-rw-r--r-- | sysdeps/m68k/coldfire/sysdep.h | 2 |
17 files changed, 48 insertions, 62 deletions
diff --git a/sysdeps/m68k/coldfire/atomic-machine.h b/sysdeps/m68k/coldfire/atomic-machine.h index 140dd022f8..3ef9859f88 100644 --- a/sysdeps/m68k/coldfire/atomic-machine.h +++ b/sysdeps/m68k/coldfire/atomic-machine.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2016 Free Software Foundation, Inc. +/* Copyright (C) 2003-2018 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 @@ -53,6 +53,9 @@ typedef uintmax_t uatomic_max_t; #define __HAVE_64B_ATOMICS 1 #define USE_ATOMIC_COMPILER_BUILTINS 0 +/* XXX Is this actually correct? */ +#define ATOMIC_EXCHANGE_USES_CAS 1 + /* The only basic operation needed is compare and exchange. */ #define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ ({ __typeof (mem) __gmemp = (mem); \ diff --git a/sysdeps/m68k/coldfire/fpu/e_sqrt.c b/sysdeps/m68k/coldfire/fpu/e_sqrt.c index ba59df60c0..3d51589eae 100644 --- a/sysdeps/m68k/coldfire/fpu/e_sqrt.c +++ b/sysdeps/m68k/coldfire/fpu/e_sqrt.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2016 Free Software Foundation, Inc. +/* Copyright (C) 2006-2018 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 diff --git a/sysdeps/m68k/coldfire/fpu/e_sqrtf.c b/sysdeps/m68k/coldfire/fpu/e_sqrtf.c index 5a48aef25c..80636da591 100644 --- a/sysdeps/m68k/coldfire/fpu/e_sqrtf.c +++ b/sysdeps/m68k/coldfire/fpu/e_sqrtf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2016 Free Software Foundation, Inc. +/* Copyright (C) 2006-2018 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 diff --git a/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c b/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c index 3774890424..8474542cfe 100644 --- a/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c +++ b/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2018 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 diff --git a/sysdeps/m68k/coldfire/fpu/libm-test-ulps-name b/sysdeps/m68k/coldfire/fpu/libm-test-ulps-name new file mode 100644 index 0000000000..d0b67ea9eb --- /dev/null +++ b/sysdeps/m68k/coldfire/fpu/libm-test-ulps-name @@ -0,0 +1 @@ +ColdFire diff --git a/sysdeps/m68k/coldfire/fpu/s_fabs.c b/sysdeps/m68k/coldfire/fpu/s_fabs.c index a20d41ef14..50e1cfe40c 100644 --- a/sysdeps/m68k/coldfire/fpu/s_fabs.c +++ b/sysdeps/m68k/coldfire/fpu/s_fabs.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2016 Free Software Foundation, Inc. +/* Copyright (C) 2006-2018 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 @@ -15,14 +15,12 @@ License along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */ +#include <libm-alias-double.h> + double __fabs (double x) { asm ("fdabs.d %1,%0" : "=f" (x) : "fm" (x)); return x; } -weak_alias (__fabs, fabs) -#ifdef NO_LONG_DOUBLE -strong_alias (__fabs, __fabsl) -weak_alias (__fabs, fabsl) -#endif +libm_alias_double (__fabs, fabs) diff --git a/sysdeps/m68k/coldfire/fpu/s_fabsf.c b/sysdeps/m68k/coldfire/fpu/s_fabsf.c index 4287bebcaf..9b37d69782 100644 --- a/sysdeps/m68k/coldfire/fpu/s_fabsf.c +++ b/sysdeps/m68k/coldfire/fpu/s_fabsf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2016 Free Software Foundation, Inc. +/* Copyright (C) 2006-2018 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 @@ -15,10 +15,12 @@ License along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */ +#include <libm-alias-float.h> + float __fabsf (float x) { asm ("fsabs.s %1,%0" : "=f" (x) : "dm" (x)); return x; } -weak_alias (__fabsf, fabsf) +libm_alias_float (__fabs, fabs) diff --git a/sysdeps/m68k/coldfire/fpu/s_lrint.c b/sysdeps/m68k/coldfire/fpu/s_lrint.c index e404b42194..2a0a4b8f56 100644 --- a/sysdeps/m68k/coldfire/fpu/s_lrint.c +++ b/sysdeps/m68k/coldfire/fpu/s_lrint.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2016 Free Software Foundation, Inc. +/* Copyright (C) 2006-2018 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 @@ -15,6 +15,8 @@ License along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */ +#include <libm-alias-double.h> + long int __lrint (double x) { @@ -22,8 +24,4 @@ __lrint (double x) asm ("fmove.l %1,%0" : "=dm" (result) : "f" (x)); return result; } -weak_alias (__lrint, lrint) -#ifdef NO_LONG_DOUBLE -strong_alias (__lrint, __lrintl) -weak_alias (__lrint, lrintl) -#endif +libm_alias_double (__lrint, lrint) diff --git a/sysdeps/m68k/coldfire/fpu/s_lrintf.c b/sysdeps/m68k/coldfire/fpu/s_lrintf.c index e58a48c634..66f951c9f5 100644 --- a/sysdeps/m68k/coldfire/fpu/s_lrintf.c +++ b/sysdeps/m68k/coldfire/fpu/s_lrintf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2016 Free Software Foundation, Inc. +/* Copyright (C) 2006-2018 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 @@ -15,6 +15,8 @@ License along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */ +#include <libm-alias-float.h> + long int __lrintf (float x) { @@ -22,4 +24,4 @@ __lrintf (float x) asm ("fmove.l %1,%0" : "=dm" (result) : "f" (x)); return result; } -weak_alias (__lrintf, lrintf) +libm_alias_float (__lrint, lrint) diff --git a/sysdeps/m68k/coldfire/fpu/s_rint.c b/sysdeps/m68k/coldfire/fpu/s_rint.c index e7047bfb4a..a5bc4ad223 100644 --- a/sysdeps/m68k/coldfire/fpu/s_rint.c +++ b/sysdeps/m68k/coldfire/fpu/s_rint.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2016 Free Software Foundation, Inc. +/* Copyright (C) 2006-2018 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 @@ -15,14 +15,12 @@ License along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */ +#include <libm-alias-double.h> + double __rint (double x) { asm ("fint.d %1,%0" : "=f" (x) : "fm" (x)); return x; } -weak_alias (__rint, rint) -#ifdef NO_LONG_DOUBLE -strong_alias (__rint, __rintl) -weak_alias (__rint, rintl) -#endif +libm_alias_double (__rint, rint) diff --git a/sysdeps/m68k/coldfire/fpu/s_rintf.c b/sysdeps/m68k/coldfire/fpu/s_rintf.c index 07d989332e..d68a3fda4d 100644 --- a/sysdeps/m68k/coldfire/fpu/s_rintf.c +++ b/sysdeps/m68k/coldfire/fpu/s_rintf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2016 Free Software Foundation, Inc. +/* Copyright (C) 2006-2018 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 @@ -15,6 +15,8 @@ License along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */ +#include <libm-alias-float.h> + float __rintf (float x) { @@ -22,4 +24,4 @@ __rintf (float x) asm ("fint.s %1,%0" : "=f" (result) : "dm" (x)); return (float) result; } -weak_alias (__rintf, rintf) +libm_alias_float (__rint, rint) diff --git a/sysdeps/m68k/coldfire/fpu/math_private.h b/sysdeps/m68k/coldfire/ldbl-classify-compat.h index d306a508b4..c1ec4d4ffa 100644 --- a/sysdeps/m68k/coldfire/fpu/math_private.h +++ b/sysdeps/m68k/coldfire/ldbl-classify-compat.h @@ -1,10 +1,8 @@ -#ifndef COLDFIRE_MATH_PRIVATE_H -#define COLDFIRE_MATH_PRIVATE_H 1 +#ifndef COLDFIRE_LDBL_CLASSIFY_COMPAT_H +#define COLDFIRE_LDBL_CLASSIFY_COMPAT_H 1 /* Enable __finitel, __isinfl, and __isnanl for binary compatibility when built without long double support. */ #define LDBL_CLASSIFY_COMPAT 1 -#include_next <math_private.h> - #endif diff --git a/sysdeps/m68k/coldfire/fpu/bits/mathinline.h b/sysdeps/m68k/coldfire/math-tests.h index e143db29e8..b05609d45d 100644 --- a/sysdeps/m68k/coldfire/fpu/bits/mathinline.h +++ b/sysdeps/m68k/coldfire/math-tests.h @@ -1,5 +1,5 @@ -/* Inline math functions for Coldfire. - Copyright (C) 2012-2016 Free Software Foundation, Inc. +/* Configuration for math tests. ColdFire version. + Copyright (C) 2018 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 @@ -13,32 +13,17 @@ 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 + License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef _MATH_H -# error "Never use <bits/mathinline.h> directly; include <math.h> instead." +/* ColdFire soft float does not support exceptions and rounding modes. */ +#ifndef __mcffpu__ +# define ROUNDING_TESTS_float(MODE) ((MODE) == FE_TONEAREST) +# define ROUNDING_TESTS_double(MODE) ((MODE) == FE_TONEAREST) +# define ROUNDING_TESTS_long_double(MODE) ((MODE) == FE_TONEAREST) +# define EXCEPTION_TESTS_float 0 +# define EXCEPTION_TESTS_double 0 +# define EXCEPTION_TESTS_long_double 0 #endif -#ifndef __extern_always_inline -# define __MATH_INLINE __inline -#else -# define __MATH_INLINE __extern_always_inline -#endif - -#if defined __USE_ISOC99 && defined __GNUC__ - -/* Test for negative number. Used in the signbit macro. */ -__MATH_INLINE int -__NTH (__signbitf (float __x)) -{ - return __builtin_signbitf (__x); -} - -__MATH_INLINE int -__NTH (__signbit (double __x)) -{ - return __builtin_signbit (__x); -} - -#endif +#include_next <math-tests.h> diff --git a/sysdeps/m68k/coldfire/nofpu/Implies b/sysdeps/m68k/coldfire/nofpu/Implies new file mode 100644 index 0000000000..abcbadb25f --- /dev/null +++ b/sysdeps/m68k/coldfire/nofpu/Implies @@ -0,0 +1 @@ +ieee754/soft-fp diff --git a/sysdeps/m68k/coldfire/nofpu/s_fma.c b/sysdeps/m68k/coldfire/nofpu/s_fma.c deleted file mode 100644 index d9613fa67c..0000000000 --- a/sysdeps/m68k/coldfire/nofpu/s_fma.c +++ /dev/null @@ -1 +0,0 @@ -#include <soft-fp/fmadf4.c> diff --git a/sysdeps/m68k/coldfire/nofpu/s_fmaf.c b/sysdeps/m68k/coldfire/nofpu/s_fmaf.c deleted file mode 100644 index aa5c9b2d91..0000000000 --- a/sysdeps/m68k/coldfire/nofpu/s_fmaf.c +++ /dev/null @@ -1 +0,0 @@ -#include <soft-fp/fmasf4.c> diff --git a/sysdeps/m68k/coldfire/sysdep.h b/sysdeps/m68k/coldfire/sysdep.h index ce2dcbf784..7eab5047ab 100644 --- a/sysdeps/m68k/coldfire/sysdep.h +++ b/sysdeps/m68k/coldfire/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for Coldfire. - Copyright (C) 1998-2016 Free Software Foundation, Inc. + Copyright (C) 1998-2018 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 |