diff options
Diffstat (limited to 'REORG.TODO/sysdeps/m68k/coldfire')
18 files changed, 677 insertions, 0 deletions
diff --git a/REORG.TODO/sysdeps/m68k/coldfire/atomic-machine.h b/REORG.TODO/sysdeps/m68k/coldfire/atomic-machine.h new file mode 100644 index 0000000000..d2e4a1f15d --- /dev/null +++ b/REORG.TODO/sysdeps/m68k/coldfire/atomic-machine.h @@ -0,0 +1,75 @@ +/* Copyright (C) 2003-2017 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 _ATOMIC_MACHINE_H +#define _ATOMIC_MACHINE_H 1 + +#include <stdint.h> + +/* Coldfire has no atomic compare-and-exchange operation, and the + kernel provides no userspace atomicity operations. Here we just + use generic non-atomic implementations instead. */ + +typedef int8_t atomic8_t; +typedef uint8_t uatomic8_t; +typedef int_fast8_t atomic_fast8_t; +typedef uint_fast8_t uatomic_fast8_t; + +typedef int16_t atomic16_t; +typedef uint16_t uatomic16_t; +typedef int_fast16_t atomic_fast16_t; +typedef uint_fast16_t uatomic_fast16_t; + +typedef int32_t atomic32_t; +typedef uint32_t uatomic32_t; +typedef int_fast32_t atomic_fast32_t; +typedef uint_fast32_t uatomic_fast32_t; + +typedef int64_t atomic64_t; +typedef uint64_t uatomic64_t; +typedef int_fast64_t atomic_fast64_t; +typedef uint_fast64_t uatomic_fast64_t; + +typedef intptr_t atomicptr_t; +typedef uintptr_t uatomicptr_t; +typedef intmax_t atomic_max_t; +typedef uintmax_t uatomic_max_t; + +/* If we have just non-atomic operations, we can as well make them wide. */ +#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); \ + __typeof (*mem) __gret = *__gmemp; \ + __typeof (*mem) __gnewval = (newval); \ + \ + if (__gret == (oldval)) \ + *__gmemp = __gnewval; \ + __gret; }) + +#define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ + ({ __typeof (mem) __gmemp = (mem); \ + __typeof (*mem) __gnewval = (newval); \ + \ + *__gmemp == (oldval) ? (*__gmemp = __gnewval, 0) : 1; }) + +#endif diff --git a/REORG.TODO/sysdeps/m68k/coldfire/fpu/bits/mathinline.h b/REORG.TODO/sysdeps/m68k/coldfire/fpu/bits/mathinline.h new file mode 100644 index 0000000000..7dbfe37ee1 --- /dev/null +++ b/REORG.TODO/sysdeps/m68k/coldfire/fpu/bits/mathinline.h @@ -0,0 +1,44 @@ +/* Inline math functions for Coldfire. + Copyright (C) 2012-2017 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 _MATH_H +# error "Never use <bits/mathinline.h> directly; include <math.h> instead." +#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 diff --git a/REORG.TODO/sysdeps/m68k/coldfire/fpu/e_sqrt.c b/REORG.TODO/sysdeps/m68k/coldfire/fpu/e_sqrt.c new file mode 100644 index 0000000000..6e54475f88 --- /dev/null +++ b/REORG.TODO/sysdeps/m68k/coldfire/fpu/e_sqrt.c @@ -0,0 +1,24 @@ +/* Copyright (C) 2006-2017 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/>. */ + +double +__ieee754_sqrt (double x) +{ + asm ("fdsqrt.d %1,%0" : "=f" (x) : "fm" (x)); + return x; +} +strong_alias (__ieee754_sqrt, __sqrt_finite) diff --git a/REORG.TODO/sysdeps/m68k/coldfire/fpu/e_sqrtf.c b/REORG.TODO/sysdeps/m68k/coldfire/fpu/e_sqrtf.c new file mode 100644 index 0000000000..64d26f87a7 --- /dev/null +++ b/REORG.TODO/sysdeps/m68k/coldfire/fpu/e_sqrtf.c @@ -0,0 +1,25 @@ +/* Copyright (C) 2006-2017 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/>. */ + +float +__ieee754_sqrtf (float x) +{ + double result; + asm ("fssqrt.s %1,%0" : "=f" (result) : "dm" (x)); + return result; +} +strong_alias (__ieee754_sqrtf, __sqrtf_finite) diff --git a/REORG.TODO/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c b/REORG.TODO/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c new file mode 100644 index 0000000000..4220a6b877 --- /dev/null +++ b/REORG.TODO/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c @@ -0,0 +1,68 @@ +/* Raise given exceptions. + Copyright (C) 2006-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + <http://www.gnu.org/licenses/>. */ + +#include <fenv.h> +#include <float.h> +#include <math.h> + +int +__feraiseexcept (int excepts) +{ + /* Raise exceptions represented by EXCEPTS. But we must raise only one + signal at a time. It is important that if the overflow/underflow + exception and the divide by zero exception are given at the same + time, the overflow/underflow exception follows the divide by zero + exception. + + The Coldfire FPU allows an exception to be raised by asserting + the associated EXC bit and then executing an arbitrary arithmetic + instruction. fmove.l is classified as an arithmetic instruction + and suffices for this purpose. + + We therefore raise an exception by setting both the EXC and AEXC + bit associated with the exception (the former being 6 bits to the + left of the latter) and then loading the longword at (%sp) into an + FP register. */ + + inline void + raise_one_exception (int mask) + { + if (excepts & mask) + { + int fpsr; + double unused; + + asm volatile ("fmove%.l %/fpsr,%0" : "=d" (fpsr)); + fpsr |= (mask << 6) | mask; + asm volatile ("fmove%.l %0,%/fpsr" :: "d" (fpsr)); + asm volatile ("fmove%.l (%%sp),%0" : "=f" (unused)); + } + } + + raise_one_exception (FE_INVALID); + raise_one_exception (FE_DIVBYZERO); + raise_one_exception (FE_OVERFLOW); + raise_one_exception (FE_UNDERFLOW); + raise_one_exception (FE_INEXACT); + + /* Success. */ + return 0; +} +libm_hidden_def (__feraiseexcept) +weak_alias (__feraiseexcept, feraiseexcept) +libm_hidden_weak (feraiseexcept) diff --git a/REORG.TODO/sysdeps/m68k/coldfire/fpu/libm-test-ulps b/REORG.TODO/sysdeps/m68k/coldfire/fpu/libm-test-ulps new file mode 100644 index 0000000000..fad7f8f068 --- /dev/null +++ b/REORG.TODO/sysdeps/m68k/coldfire/fpu/libm-test-ulps @@ -0,0 +1,228 @@ +# Begin of automatic generation + +# Maximal error of functions: +Function: "atan2": +float: 1 +ifloat: 1 + +Function: "atanh": +float: 1 +ifloat: 1 + +Function: Imaginary part of "cacosh": +float: 1 +ifloat: 1 + +Function: Real part of "casin": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "casinh": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 + +Function: Imaginary part of "casinh": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 + +Function: Imaginary part of "catan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "catanh": +double: 4 +idouble: 4 + +Function: "cbrt": +double: 1 +idouble: 1 + +Function: Real part of "ccos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ccos": +float: 1 +ifloat: 1 + +Function: Real part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "ccosh": +float: 1 +ifloat: 1 + +Function: Real part of "cexp": +float: 1 +ifloat: 1 + +Function: Imaginary part of "cexp": +float: 1 +ifloat: 1 + +Function: Real part of "clog": +float: 1 +ifloat: 1 + +Function: Real part of "clog10": +float: 1 +ifloat: 1 + +Function: Imaginary part of "clog10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "cos": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: Real part of "cpow": +double: 2 +float: 4 +idouble: 2 +ifloat: 4 + +Function: Imaginary part of "cpow": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: Real part of "csinh": +float: 1 +ifloat: 1 + +Function: Imaginary part of "csinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "csqrt": +float: 1 +ifloat: 1 + +Function: Imaginary part of "ctan": +double: 1 +idouble: 1 + +Function: Real part of "ctanh": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: Imaginary part of "ctanh": +float: 1 +ifloat: 1 + +Function: "erf": +double: 1 +idouble: 1 + +Function: "erfc": +double: 1 +idouble: 1 + +Function: "exp10": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 + +Function: "expm1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "hypot": +float: 1 +ifloat: 1 + +Function: "j0": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "j1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "jn": +double: 4 +float: 4 +idouble: 4 +ifloat: 4 + +Function: "lgamma": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "log10": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "log1p": +float: 1 +ifloat: 1 + +Function: "sincos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "tan": +double: 1 +idouble: 1 + +Function: "tgamma": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "y0": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: "y1": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +Function: "yn": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +# end of automatic generation diff --git a/REORG.TODO/sysdeps/m68k/coldfire/fpu/libm-test-ulps-name b/REORG.TODO/sysdeps/m68k/coldfire/fpu/libm-test-ulps-name new file mode 100644 index 0000000000..d0b67ea9eb --- /dev/null +++ b/REORG.TODO/sysdeps/m68k/coldfire/fpu/libm-test-ulps-name @@ -0,0 +1 @@ +ColdFire diff --git a/REORG.TODO/sysdeps/m68k/coldfire/fpu/math_private.h b/REORG.TODO/sysdeps/m68k/coldfire/fpu/math_private.h new file mode 100644 index 0000000000..d306a508b4 --- /dev/null +++ b/REORG.TODO/sysdeps/m68k/coldfire/fpu/math_private.h @@ -0,0 +1,10 @@ +#ifndef COLDFIRE_MATH_PRIVATE_H +#define COLDFIRE_MATH_PRIVATE_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/REORG.TODO/sysdeps/m68k/coldfire/fpu/s_fabs.c b/REORG.TODO/sysdeps/m68k/coldfire/fpu/s_fabs.c new file mode 100644 index 0000000000..6c1a8dc344 --- /dev/null +++ b/REORG.TODO/sysdeps/m68k/coldfire/fpu/s_fabs.c @@ -0,0 +1,28 @@ +/* Copyright (C) 2006-2017 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/>. */ + +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 diff --git a/REORG.TODO/sysdeps/m68k/coldfire/fpu/s_fabsf.c b/REORG.TODO/sysdeps/m68k/coldfire/fpu/s_fabsf.c new file mode 100644 index 0000000000..e134c102e9 --- /dev/null +++ b/REORG.TODO/sysdeps/m68k/coldfire/fpu/s_fabsf.c @@ -0,0 +1,24 @@ +/* Copyright (C) 2006-2017 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/>. */ + +float +__fabsf (float x) +{ + asm ("fsabs.s %1,%0" : "=f" (x) : "dm" (x)); + return x; +} +weak_alias (__fabsf, fabsf) diff --git a/REORG.TODO/sysdeps/m68k/coldfire/fpu/s_lrint.c b/REORG.TODO/sysdeps/m68k/coldfire/fpu/s_lrint.c new file mode 100644 index 0000000000..0cdad325d1 --- /dev/null +++ b/REORG.TODO/sysdeps/m68k/coldfire/fpu/s_lrint.c @@ -0,0 +1,29 @@ +/* Copyright (C) 2006-2017 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/>. */ + +long int +__lrint (double x) +{ + long int result; + 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 diff --git a/REORG.TODO/sysdeps/m68k/coldfire/fpu/s_lrintf.c b/REORG.TODO/sysdeps/m68k/coldfire/fpu/s_lrintf.c new file mode 100644 index 0000000000..7f5c9d04f2 --- /dev/null +++ b/REORG.TODO/sysdeps/m68k/coldfire/fpu/s_lrintf.c @@ -0,0 +1,25 @@ +/* Copyright (C) 2006-2017 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/>. */ + +long int +__lrintf (float x) +{ + long int result; + asm ("fmove.l %1,%0" : "=dm" (result) : "f" (x)); + return result; +} +weak_alias (__lrintf, lrintf) diff --git a/REORG.TODO/sysdeps/m68k/coldfire/fpu/s_rint.c b/REORG.TODO/sysdeps/m68k/coldfire/fpu/s_rint.c new file mode 100644 index 0000000000..e950630688 --- /dev/null +++ b/REORG.TODO/sysdeps/m68k/coldfire/fpu/s_rint.c @@ -0,0 +1,28 @@ +/* Copyright (C) 2006-2017 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/>. */ + +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 diff --git a/REORG.TODO/sysdeps/m68k/coldfire/fpu/s_rintf.c b/REORG.TODO/sysdeps/m68k/coldfire/fpu/s_rintf.c new file mode 100644 index 0000000000..ea244e8b88 --- /dev/null +++ b/REORG.TODO/sysdeps/m68k/coldfire/fpu/s_rintf.c @@ -0,0 +1,25 @@ +/* Copyright (C) 2006-2017 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/>. */ + +float +__rintf (float x) +{ + double result; + asm ("fint.s %1,%0" : "=f" (result) : "dm" (x)); + return (float) result; +} +weak_alias (__rintf, rintf) diff --git a/REORG.TODO/sysdeps/m68k/coldfire/nofpu/s_fma.c b/REORG.TODO/sysdeps/m68k/coldfire/nofpu/s_fma.c new file mode 100644 index 0000000000..d9613fa67c --- /dev/null +++ b/REORG.TODO/sysdeps/m68k/coldfire/nofpu/s_fma.c @@ -0,0 +1 @@ +#include <soft-fp/fmadf4.c> diff --git a/REORG.TODO/sysdeps/m68k/coldfire/nofpu/s_fmaf.c b/REORG.TODO/sysdeps/m68k/coldfire/nofpu/s_fmaf.c new file mode 100644 index 0000000000..aa5c9b2d91 --- /dev/null +++ b/REORG.TODO/sysdeps/m68k/coldfire/nofpu/s_fmaf.c @@ -0,0 +1 @@ +#include <soft-fp/fmasf4.c> diff --git a/REORG.TODO/sysdeps/m68k/coldfire/nofpu/sfp-machine.h b/REORG.TODO/sysdeps/m68k/coldfire/nofpu/sfp-machine.h new file mode 100644 index 0000000000..e4ad79e6bd --- /dev/null +++ b/REORG.TODO/sysdeps/m68k/coldfire/nofpu/sfp-machine.h @@ -0,0 +1 @@ +#include <sysdeps/nios2/sfp-machine.h> diff --git a/REORG.TODO/sysdeps/m68k/coldfire/sysdep.h b/REORG.TODO/sysdeps/m68k/coldfire/sysdep.h new file mode 100644 index 0000000000..c221c7d237 --- /dev/null +++ b/REORG.TODO/sysdeps/m68k/coldfire/sysdep.h @@ -0,0 +1,40 @@ +/* Assembler macros for Coldfire. + Copyright (C) 1998-2017 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 <sysdeps/m68k/sysdep.h> + +#ifdef __ASSEMBLER__ + +/* Perform operation OP with PC-relative SRC as the first operand and + DST as the second. TMP is available as a temporary if needed. */ +# define PCREL_OP(OP, SRC, DST, TMP) \ + move.l &SRC - ., TMP; OP (-8, %pc, TMP), DST + +/* Load the address of the GOT into register R. */ +# define LOAD_GOT(R) \ + move.l &_GLOBAL_OFFSET_TABLE_@GOTPC, R; \ + lea (-6, %pc, R), R + +#else + +/* As above, but PC is the spelling of the PC register. We need this + so that the macro can be used in both normal and extended asms. */ +# define PCREL_OP(OP, SRC, DST, TMP, PC) \ + "move.l #" SRC " - ., " TMP "\n\t" OP " (-8, " PC ", " TMP "), " DST + +#endif /* __ASSEMBLER__ */ |