aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sh/sh4
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2017-06-08 15:39:03 -0400
committerZack Weinberg <zackw@panix.com>2017-06-08 15:39:03 -0400
commit5046dbb4a7eba5eccfd258f92f4735c9ffc8d069 (patch)
tree4470480d904b65cf14ca524f96f79eca818c3eaf /sysdeps/sh/sh4
parent199fc19d3aaaf57944ef036e15904febe877fc93 (diff)
downloadglibc-zack/build-layout-experiment.tar
glibc-zack/build-layout-experiment.tar.gz
glibc-zack/build-layout-experiment.tar.bz2
glibc-zack/build-layout-experiment.zip
Prepare for radical source tree reorganization.zack/build-layout-experiment
All top-level files and directories are moved into a temporary storage directory, REORG.TODO, except for files that will certainly still exist in their current form at top level when we're done (COPYING, COPYING.LIB, LICENSES, NEWS, README), all old ChangeLog files (which are moved to the new directory OldChangeLogs, instead), and the generated file INSTALL (which is just deleted; in the new order, there will be no generated files checked into version control).
Diffstat (limited to 'sysdeps/sh/sh4')
-rw-r--r--sysdeps/sh/sh4/Makefile3
-rw-r--r--sysdeps/sh/sh4/Versions5
-rw-r--r--sysdeps/sh/sh4/__longjmp.S73
-rw-r--r--sysdeps/sh/sh4/dl-trampoline.S4
-rw-r--r--sysdeps/sh/sh4/fpu/fclrexcpt.c42
-rw-r--r--sysdeps/sh/sh4/fpu/fedisblxcpt.c39
-rw-r--r--sysdeps/sh/sh4/fpu/feenablxcpt.c38
-rw-r--r--sysdeps/sh/sh4/fpu/fegetenv.c34
-rw-r--r--sysdeps/sh/sh4/fpu/fegetexcept.c32
-rw-r--r--sysdeps/sh/sh4/fpu/fegetmode.c27
-rw-r--r--sysdeps/sh/sh4/fpu/fegetround.c35
-rw-r--r--sysdeps/sh/sh4/fpu/feholdexcpt.c44
-rw-r--r--sysdeps/sh/sh4/fpu/fesetenv.c36
-rw-r--r--sysdeps/sh/sh4/fpu/fesetexcept.c32
-rw-r--r--sysdeps/sh/sh4/fpu/fesetmode.c38
-rw-r--r--sysdeps/sh/sh4/fpu/fesetround.c45
-rw-r--r--sysdeps/sh/sh4/fpu/feupdateenv.c41
-rw-r--r--sysdeps/sh/sh4/fpu/fgetexcptflg.c38
-rw-r--r--sysdeps/sh/sh4/fpu/fraiseexcpt.c75
-rw-r--r--sysdeps/sh/sh4/fpu/fsetexcptflg.c39
-rw-r--r--sysdeps/sh/sh4/fpu/ftestexcept.c32
-rw-r--r--sysdeps/sh/sh4/setjmp.S90
22 files changed, 0 insertions, 842 deletions
diff --git a/sysdeps/sh/sh4/Makefile b/sysdeps/sh/sh4/Makefile
deleted file mode 100644
index ccac91432a..0000000000
--- a/sysdeps/sh/sh4/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-# Build everything with full IEEE math support. -mieee isn't
-# default for the older SH compilers.
-sysdep-CFLAGS += -mieee
diff --git a/sysdeps/sh/sh4/Versions b/sysdeps/sh/sh4/Versions
deleted file mode 100644
index 8cc1c7b7d4..0000000000
--- a/sysdeps/sh/sh4/Versions
+++ /dev/null
@@ -1,5 +0,0 @@
-ld {
- GLIBC_PRIVATE {
- __fpscr_values;
- }
-}
diff --git a/sysdeps/sh/sh4/__longjmp.S b/sysdeps/sh/sh4/__longjmp.S
deleted file mode 100644
index 2a5c25da32..0000000000
--- a/sysdeps/sh/sh4/__longjmp.S
+++ /dev/null
@@ -1,73 +0,0 @@
-/* longjmp for SH.
- Copyright (C) 1999-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 <sysdep.h>
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-
-/* __longjmp(jmpbuf, val) */
-
-ENTRY (__longjmp)
- mov.l @r4+, r8
- mov.l @r4+, r9
- mov.l @r4+, r10
- mov.l @r4+, r11
- mov.l @r4+, r12
- mov r5, r0 /* get the return value in place */
- tst r0, r0
- bf.s 1f
- mov.l @r4+, r13
- mov #1,r0 /* can't let setjmp() return zero! */
-1:
-#ifdef PTR_DEMANGLE
- mov.l @r4+, r2
- PTR_DEMANGLE (r2, r1)
- mov r2, r14
- mov.l @r4+, r2
- PTR_DEMANGLE2 (r2, r1)
-# ifdef CHECK_SP
- CHECK_SP (r2)
-# endif
- mov r2, r15
- mov.l @r4+, r2
- PTR_DEMANGLE2 (r2, r1)
- lds r2, pr
- mov #0, r1
-#else
- mov.l @r4+, r14
-# ifdef CHECK_SP
- mov.l @r4, r2
- CHECK_SP (r2)
-# endif
- mov.l @r4+, r15
- lds.l @r4+, pr
-#endif
-#ifdef __SH_FPU_ANY__
- ldc.l @r4+, gbr
- lds.l @r4+, fpscr
- fmov.s @r4+, fr12
- fmov.s @r4+, fr13
- fmov.s @r4+, fr14
- rts
- fmov.s @r4+, fr15
-#else
- rts
- ldc.l @r4+, gbr
-#endif /* !__SH_FPU_ANY__ */
-END (__longjmp)
diff --git a/sysdeps/sh/sh4/dl-trampoline.S b/sysdeps/sh/sh4/dl-trampoline.S
deleted file mode 100644
index bd9bb7e5bd..0000000000
--- a/sysdeps/sh/sh4/dl-trampoline.S
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifdef __SH_FPU_ANY__
-# define HAVE_FPU
-#endif
-#include <sysdeps/sh/dl-trampoline.S>
diff --git a/sysdeps/sh/sh4/fpu/fclrexcpt.c b/sysdeps/sh/sh4/fpu/fclrexcpt.c
deleted file mode 100644
index 5a430f6655..0000000000
--- a/sysdeps/sh/sh4/fpu/fclrexcpt.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Clear given exceptions in current floating-point environment.
- Copyright (C) 1998-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
-
- 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 <fpu_control.h>
-
-int
-feclearexcept (int excepts)
-{
- fpu_control_t cw;
-
- /* Mask out unsupported bits/exceptions. */
- excepts &= FE_ALL_EXCEPT;
-
- /* Read the complete control word. */
- _FPU_GETCW (cw);
-
- /* Clear exception bits. */
- cw &= ~excepts;
-
- /* Put the new data in effect. */
- _FPU_SETCW (cw);
-
- return 0;
-}
-libm_hidden_def (feclearexcept)
diff --git a/sysdeps/sh/sh4/fpu/fedisblxcpt.c b/sysdeps/sh/sh4/fpu/fedisblxcpt.c
deleted file mode 100644
index 718ae70899..0000000000
--- a/sysdeps/sh/sh4/fpu/fedisblxcpt.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Disable floating-point exceptions.
- Copyright (C) 2012-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Nobuhiro Iwamatsu <iwamatsu@nigauri.org>, 2012.
-
- 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 <fpu_control.h>
-
-int
-fedisableexcept (int excepts)
-{
- fpu_control_t temp, old_exc;
-
- /* Get the current control register contents. */
- _FPU_GETCW (temp);
-
- old_exc = (temp >> 5) & FE_ALL_EXCEPT;
-
- excepts &= FE_ALL_EXCEPT;
-
- temp &= ~(excepts << 5);
- _FPU_SETCW (temp);
-
- return old_exc;
-}
diff --git a/sysdeps/sh/sh4/fpu/feenablxcpt.c b/sysdeps/sh/sh4/fpu/feenablxcpt.c
deleted file mode 100644
index d638714149..0000000000
--- a/sysdeps/sh/sh4/fpu/feenablxcpt.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Enable floating-point exceptions.
- Copyright (C) 2012-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Nobuhiro Iwamatsu <iwamatsu@nigauri.org>, 2012.
-
- 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 <fpu_control.h>
-
-int
-feenableexcept (int excepts)
-{
- fpu_control_t temp, old_flag;
-
- /* Get current exceptions. */
- _FPU_GETCW (temp);
-
- old_flag = (temp >> 5) & FE_ALL_EXCEPT;
- excepts &= FE_ALL_EXCEPT;
-
- temp |= excepts << 5;
- _FPU_SETCW (temp);
-
- return old_flag;
-}
diff --git a/sysdeps/sh/sh4/fpu/fegetenv.c b/sysdeps/sh/sh4/fpu/fegetenv.c
deleted file mode 100644
index 00945f1072..0000000000
--- a/sysdeps/sh/sh4/fpu/fegetenv.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Store current floating-point environment.
- Copyright (C) 1997-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 <fpu_control.h>
-
-int
-__fegetenv (fenv_t *envp)
-{
- fpu_control_t temp;
- _FPU_GETCW (temp);
-
- envp->__fpscr = temp;
-
- return 0;
-}
-libm_hidden_def (__fegetenv)
-weak_alias (__fegetenv, fegetenv)
-libm_hidden_weak (fegetenv)
diff --git a/sysdeps/sh/sh4/fpu/fegetexcept.c b/sysdeps/sh/sh4/fpu/fegetexcept.c
deleted file mode 100644
index 4d1299e310..0000000000
--- a/sysdeps/sh/sh4/fpu/fegetexcept.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Get enabled floating-point exceptions.
- Copyright (C) 2012-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Nobuhiro Iwamatsu <iwamatsu@nigauri.org>, 2012.
-
- 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 <fpu_control.h>
-
-int
-fegetexcept (void)
-{
- fpu_control_t temp;
-
- /* Get current exceptions. */
- _FPU_GETCW (temp);
-
- return (temp >> 5) & FE_ALL_EXCEPT;
-}
diff --git a/sysdeps/sh/sh4/fpu/fegetmode.c b/sysdeps/sh/sh4/fpu/fegetmode.c
deleted file mode 100644
index e839a9b25f..0000000000
--- a/sysdeps/sh/sh4/fpu/fegetmode.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Store current floating-point control modes. SH4 version.
- Copyright (C) 2016-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 <fpu_control.h>
-
-int
-fegetmode (femode_t *modep)
-{
- _FPU_GETCW (*modep);
- return 0;
-}
diff --git a/sysdeps/sh/sh4/fpu/fegetround.c b/sysdeps/sh/sh4/fpu/fegetround.c
deleted file mode 100644
index 4c97d23e12..0000000000
--- a/sysdeps/sh/sh4/fpu/fegetround.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Return current rounding direction.
- Copyright (C) 1998-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
-
- 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 <fpu_control.h>
-
-int
-__fegetround (void)
-{
- fpu_control_t cw;
-
- /* Get control word. */
- _FPU_GETCW (cw);
-
- return cw & 0x1;
-}
-libm_hidden_def (__fegetround)
-weak_alias (__fegetround, fegetround)
-libm_hidden_weak (fegetround)
diff --git a/sysdeps/sh/sh4/fpu/feholdexcpt.c b/sysdeps/sh/sh4/fpu/feholdexcpt.c
deleted file mode 100644
index b905e594cd..0000000000
--- a/sysdeps/sh/sh4/fpu/feholdexcpt.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Store current floating-point environment and clear exceptions.
- Copyright (C) 1997-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 <fpu_control.h>
-
-int
-__feholdexcept (fenv_t *envp)
-{
- fpu_control_t temp;
-
- /* Store the environment. */
- _FPU_GETCW (temp);
- envp->__fpscr = temp;
-
- /* Clear the status flags. */
- temp &= ~FE_ALL_EXCEPT;
-
- /* Now set all exceptions to non-stop. */
- temp &= ~(FE_ALL_EXCEPT << 5);
-
- _FPU_SETCW (temp);
-
- /* Success. */
- return 0;
-}
-libm_hidden_def (__feholdexcept)
-weak_alias (__feholdexcept, feholdexcept)
-libm_hidden_weak (feholdexcept)
diff --git a/sysdeps/sh/sh4/fpu/fesetenv.c b/sysdeps/sh/sh4/fpu/fesetenv.c
deleted file mode 100644
index 8628c508e5..0000000000
--- a/sysdeps/sh/sh4/fpu/fesetenv.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Install given floating-point environment.
- Copyright (C) 1997-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 <fpu_control.h>
-
-int
-__fesetenv (const fenv_t *envp)
-{
- if (envp == FE_DFL_ENV)
- _FPU_SETCW (_FPU_DEFAULT);
- else
- {
- fpu_control_t temp = envp->__fpscr;
- _FPU_SETCW (temp);
- }
- return 0;
-}
-libm_hidden_def (__fesetenv)
-weak_alias (__fesetenv, fesetenv)
-libm_hidden_weak (fesetenv)
diff --git a/sysdeps/sh/sh4/fpu/fesetexcept.c b/sysdeps/sh/sh4/fpu/fesetexcept.c
deleted file mode 100644
index ecfad75fff..0000000000
--- a/sysdeps/sh/sh4/fpu/fesetexcept.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Set given exception flags. SH4 version.
- Copyright (C) 2016-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 <fpu_control.h>
-
-int
-fesetexcept (int excepts)
-{
- fpu_control_t temp;
-
- _FPU_GETCW (temp);
- temp |= (excepts & FE_ALL_EXCEPT);
- _FPU_SETCW (temp);
-
- return 0;
-}
diff --git a/sysdeps/sh/sh4/fpu/fesetmode.c b/sysdeps/sh/sh4/fpu/fesetmode.c
deleted file mode 100644
index d2b9e05128..0000000000
--- a/sysdeps/sh/sh4/fpu/fesetmode.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Install given floating-point control modes. SH4 version.
- Copyright (C) 2016-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 <fpu_control.h>
-
-#define FPU_STATUS 0x3f07c
-
-int
-fesetmode (const femode_t *modep)
-{
- fpu_control_t fpscr;
-
- _FPU_GETCW (fpscr);
- fpscr &= FPU_STATUS;
- if (modep == FE_DFL_MODE)
- fpscr |= _FPU_DEFAULT;
- else
- fpscr |= *modep & ~FPU_STATUS;
- _FPU_SETCW (fpscr);
-
- return 0;
-}
diff --git a/sysdeps/sh/sh4/fpu/fesetround.c b/sysdeps/sh/sh4/fpu/fesetround.c
deleted file mode 100644
index 20acb7c5e9..0000000000
--- a/sysdeps/sh/sh4/fpu/fesetround.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Set current rounding direction.
- Copyright (C) 1998-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
-
- 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 <fpu_control.h>
-
-int
-__fesetround (int round)
-{
- fpu_control_t cw;
-
- if ((round & ~0x1) != 0)
- /* ROUND is no valid rounding mode. */
- return 1;
-
- /* Get current state. */
- _FPU_GETCW (cw);
-
- /* Set rounding bits. */
- cw &= ~0x1;
- cw |= round;
- /* Set new state. */
- _FPU_SETCW (cw);
-
- return 0;
-}
-libm_hidden_def (__fesetround)
-weak_alias (__fesetround, fesetround)
-libm_hidden_weak (fesetround)
diff --git a/sysdeps/sh/sh4/fpu/feupdateenv.c b/sysdeps/sh/sh4/fpu/feupdateenv.c
deleted file mode 100644
index 3b886a2235..0000000000
--- a/sysdeps/sh/sh4/fpu/feupdateenv.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Install given floating-point environment and raise exceptions.
- Copyright (C) 2012-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Nobuhiro Iwamatsu <iwamatsu@nigauri.org>, 2012.
-
- 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 <fpu_control.h>
-
-int
-__feupdateenv (const fenv_t *envp)
-{
- fpu_control_t temp;
-
- _FPU_GETCW (temp);
- temp = (temp & FE_ALL_EXCEPT);
-
- /* Raise the saved exception. Incidently for us the implementation
- defined format of the values in objects of type fexcept_t is the
- same as the ones specified using the FE_* constants. */
- __fesetenv (envp);
- __feraiseexcept ((int) temp);
-
- return 0;
-}
-libm_hidden_def (__feupdateenv)
-weak_alias (__feupdateenv, feupdateenv)
-libm_hidden_weak (feupdateenv)
diff --git a/sysdeps/sh/sh4/fpu/fgetexcptflg.c b/sysdeps/sh/sh4/fpu/fgetexcptflg.c
deleted file mode 100644
index 02fc3948bc..0000000000
--- a/sysdeps/sh/sh4/fpu/fgetexcptflg.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Store current representation for exceptions.
- Copyright (C) 2013-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 <fpu_control.h>
-
-int
-fegetexceptflag (fexcept_t *flagp, int excepts)
-{
- fpu_control_t temp;
-
- /* Get the current exceptions. */
- _FPU_GETCW (temp);
-
- /* We only save the relevant bits here. In particular, care has to be
- taken with the CAUSE bits, as an inadvertent restore later on could
- generate unexpected exceptions. */
-
- *flagp = temp & excepts & FE_ALL_EXCEPT;
-
- /* Success. */
- return 0;
-}
diff --git a/sysdeps/sh/sh4/fpu/fraiseexcpt.c b/sysdeps/sh/sh4/fpu/fraiseexcpt.c
deleted file mode 100644
index 4bd0eb9ef5..0000000000
--- a/sysdeps/sh/sh4/fpu/fraiseexcpt.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Raise given exceptions.
- Copyright (C) 1997-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Nobuhiro Iwamatsu <iwamatsu@nigauri.org>, 2012.
-
- 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 <fpu_control.h>
-#include <math.h>
-
-int
-__feraiseexcept (int excepts)
-{
- if (excepts == 0)
- return 0;
-
- /* Raise exceptions represented by EXPECTS. */
-
- if (excepts & FE_INEXACT)
- {
- double d = 1.0, x = 3.0;
- __asm__ __volatile__ ("fdiv %1, %0" : "+d" (d) : "d" (x));
- }
-
- if (excepts & FE_UNDERFLOW)
- {
- long double d = LDBL_MIN, x = 10;
- __asm__ __volatile__ ("fdiv %1, %0" : "+d" (d) : "d" (x));
- }
-
- if (excepts & FE_OVERFLOW)
- {
- long double d = LDBL_MAX;
- __asm__ __volatile__ ("fmul %0, %0" : "+d" (d) : "d" (d));
- }
-
- if (excepts & FE_DIVBYZERO)
- {
- double d = 1.0, x = 0.0;
- __asm__ __volatile__ ("fdiv %1, %0" : "+d" (d) : "d" (x));
- }
-
- if (excepts & FE_INVALID)
- {
- double d = HUGE_VAL, x = 0.0;
- __asm__ __volatile__ ("fmul %1, %0" : "+d" (d) : "d" (x));
- }
-
- {
- /* Restore flag fields. */
- fpu_control_t cw;
- _FPU_GETCW (cw);
- cw |= (excepts & FE_ALL_EXCEPT);
- _FPU_SETCW (cw);
- }
-
- return 0;
-}
-libm_hidden_def (__feraiseexcept)
-weak_alias (__feraiseexcept, feraiseexcept)
-libm_hidden_weak (feraiseexcept)
diff --git a/sysdeps/sh/sh4/fpu/fsetexcptflg.c b/sysdeps/sh/sh4/fpu/fsetexcptflg.c
deleted file mode 100644
index 3a6ea33c26..0000000000
--- a/sysdeps/sh/sh4/fpu/fsetexcptflg.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Set floating-point environment exception handling.
- Copyright (C) 1997-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 <math.h>
-#include <fpu_control.h>
-
-int
-fesetexceptflag (const fexcept_t *flagp, int excepts)
-{
- fpu_control_t temp;
-
- /* Get the current environment. */
- _FPU_GETCW (temp);
-
- /* Set the desired exception mask. */
- temp &= ~(excepts & FE_ALL_EXCEPT);
- temp |= (*flagp & excepts & FE_ALL_EXCEPT);
-
- /* Save state back to the FPU. */
- _FPU_SETCW (temp);
-
- return 0;
-}
diff --git a/sysdeps/sh/sh4/fpu/ftestexcept.c b/sysdeps/sh/sh4/fpu/ftestexcept.c
deleted file mode 100644
index fa2c011825..0000000000
--- a/sysdeps/sh/sh4/fpu/ftestexcept.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Test exception in current environment.
- Copyright (C) 1997-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 <fpu_control.h>
-
-int
-fetestexcept (int excepts)
-{
- fpu_control_t temp;
-
- /* Get current exceptions. */
- _FPU_GETCW (temp);
-
- return temp & excepts & FE_ALL_EXCEPT;
-}
-libm_hidden_def (fetestexcept)
diff --git a/sysdeps/sh/sh4/setjmp.S b/sysdeps/sh/sh4/setjmp.S
deleted file mode 100644
index a09ffab627..0000000000
--- a/sysdeps/sh/sh4/setjmp.S
+++ /dev/null
@@ -1,90 +0,0 @@
-/* setjmp for SH4.
- Copyright (C) 1999-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 <sysdep.h>
-#include <jmpbuf-offsets.h>
-
-ENTRY (__sigsetjmp)
- /* Save registers */
-#ifdef __SH_FPU_ANY__
- add #JB_SIZE, r4
- fmov.s fr15, @-r4
- fmov.s fr14, @-r4
- fmov.s fr13, @-r4
- fmov.s fr12, @-r4
- sts.l fpscr, @-r4
-#else
- add #(JB_SIZE - 4 * 5), r4
-#endif /* __SH_FPU_ANY__ */
- stc.l gbr, @-r4
-#ifdef PTR_MANGLE
- sts pr, r2
- PTR_MANGLE (r2, r1)
- mov.l r2, @-r4
- mov r15, r2
- PTR_MANGLE2 (r2, r1)
- mov.l r2, @-r4
- mov r14, r2
- PTR_MANGLE2 (r2, r1)
- mov.l r2, @-r4
- mov #0, r1
-#else
- sts.l pr, @-r4
- mov.l r15, @-r4
- mov.l r14, @-r4
-#endif
- mov.l r13, @-r4
- mov.l r12, @-r4
- mov.l r11, @-r4
- mov.l r10, @-r4
- mov.l r9, @-r4
- mov.l r8, @-r4
-
-#if IS_IN (rtld)
- /* In ld.so we never save the signal mask. */
- rts
- mov #0, r0
-#else
- /* Make a tail call to __sigjmp_save; it takes the same args. */
-# ifdef SHARED
- mov.l 1f, r1
- mova 1f, r0
- bra 2f
- add r1, r0
- .align 2
-1:
- .long _GLOBAL_OFFSET_TABLE_
-2:
- mov.l .L1, r1
- mov.l @(r0,r1), r1
- jmp @r1
- nop
- .align 2
-.L1:
- .long C_SYMBOL_NAME(__sigjmp_save@GOT)
-# else
- mov.l .L1, r1
- jmp @r1
- nop
- .align 2
-.L1:
- .long C_SYMBOL_NAME(__sigjmp_save)
-# endif
-#endif
-END (__sigsetjmp)
-hidden_def (__sigsetjmp)