diff options
Diffstat (limited to 'sysdeps/sh/sh4/fpu')
-rw-r--r-- | sysdeps/sh/sh4/fpu/fclrexcpt.c | 2 | ||||
-rw-r--r-- | sysdeps/sh/sh4/fpu/fedisblxcpt.c | 2 | ||||
-rw-r--r-- | sysdeps/sh/sh4/fpu/feenablxcpt.c | 2 | ||||
-rw-r--r-- | sysdeps/sh/sh4/fpu/fegetenv.c | 2 | ||||
-rw-r--r-- | sysdeps/sh/sh4/fpu/fegetexcept.c | 2 | ||||
-rw-r--r-- | sysdeps/sh/sh4/fpu/fegetmode.c | 27 | ||||
-rw-r--r-- | sysdeps/sh/sh4/fpu/fegetround.c | 2 | ||||
-rw-r--r-- | sysdeps/sh/sh4/fpu/feholdexcpt.c | 2 | ||||
-rw-r--r-- | sysdeps/sh/sh4/fpu/fesetenv.c | 2 | ||||
-rw-r--r-- | sysdeps/sh/sh4/fpu/fesetexcept.c | 32 | ||||
-rw-r--r-- | sysdeps/sh/sh4/fpu/fesetmode.c | 38 | ||||
-rw-r--r-- | sysdeps/sh/sh4/fpu/fesetround.c | 2 | ||||
-rw-r--r-- | sysdeps/sh/sh4/fpu/feupdateenv.c | 2 | ||||
-rw-r--r-- | sysdeps/sh/sh4/fpu/fgetexcptflg.c | 2 | ||||
-rw-r--r-- | sysdeps/sh/sh4/fpu/fraiseexcpt.c | 2 | ||||
-rw-r--r-- | sysdeps/sh/sh4/fpu/fsetexcptflg.c | 2 | ||||
-rw-r--r-- | sysdeps/sh/sh4/fpu/ftestexcept.c | 2 |
17 files changed, 111 insertions, 14 deletions
diff --git a/sysdeps/sh/sh4/fpu/fclrexcpt.c b/sysdeps/sh/sh4/fpu/fclrexcpt.c index 60a62840d6..c83650a7e4 100644 --- a/sysdeps/sh/sh4/fpu/fclrexcpt.c +++ b/sysdeps/sh/sh4/fpu/fclrexcpt.c @@ -1,5 +1,5 @@ /* Clear given exceptions in current floating-point environment. - 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. Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998. diff --git a/sysdeps/sh/sh4/fpu/fedisblxcpt.c b/sysdeps/sh/sh4/fpu/fedisblxcpt.c index dc090ac23b..c7948f5f88 100644 --- a/sysdeps/sh/sh4/fpu/fedisblxcpt.c +++ b/sysdeps/sh/sh4/fpu/fedisblxcpt.c @@ -1,5 +1,5 @@ /* Disable floating-point exceptions. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Nobuhiro Iwamatsu <iwamatsu@nigauri.org>, 2012. diff --git a/sysdeps/sh/sh4/fpu/feenablxcpt.c b/sysdeps/sh/sh4/fpu/feenablxcpt.c index 7b1bb5f1f2..f9e24d7780 100644 --- a/sysdeps/sh/sh4/fpu/feenablxcpt.c +++ b/sysdeps/sh/sh4/fpu/feenablxcpt.c @@ -1,5 +1,5 @@ /* Enable floating-point exceptions. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Nobuhiro Iwamatsu <iwamatsu@nigauri.org>, 2012. diff --git a/sysdeps/sh/sh4/fpu/fegetenv.c b/sysdeps/sh/sh4/fpu/fegetenv.c index ae2fd927bf..138b09b54b 100644 --- a/sysdeps/sh/sh4/fpu/fegetenv.c +++ b/sysdeps/sh/sh4/fpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-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/sh/sh4/fpu/fegetexcept.c b/sysdeps/sh/sh4/fpu/fegetexcept.c index e5d3cbeae6..2181546b62 100644 --- a/sysdeps/sh/sh4/fpu/fegetexcept.c +++ b/sysdeps/sh/sh4/fpu/fegetexcept.c @@ -1,5 +1,5 @@ /* Get enabled floating-point exceptions. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Nobuhiro Iwamatsu <iwamatsu@nigauri.org>, 2012. diff --git a/sysdeps/sh/sh4/fpu/fegetmode.c b/sysdeps/sh/sh4/fpu/fegetmode.c new file mode 100644 index 0000000000..516a881409 --- /dev/null +++ b/sysdeps/sh/sh4/fpu/fegetmode.c @@ -0,0 +1,27 @@ +/* Store current floating-point control modes. SH4 version. + Copyright (C) 2016-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 + 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 index 64cf868fb6..fafba2dc36 100644 --- a/sysdeps/sh/sh4/fpu/fegetround.c +++ b/sysdeps/sh/sh4/fpu/fegetround.c @@ -1,5 +1,5 @@ /* Return current rounding direction. - 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. Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998. diff --git a/sysdeps/sh/sh4/fpu/feholdexcpt.c b/sysdeps/sh/sh4/fpu/feholdexcpt.c index 09c10917fc..6f2d024efc 100644 --- a/sysdeps/sh/sh4/fpu/feholdexcpt.c +++ b/sysdeps/sh/sh4/fpu/feholdexcpt.c @@ -1,5 +1,5 @@ /* Store current floating-point environment and clear exceptions. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-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/sh/sh4/fpu/fesetenv.c b/sysdeps/sh/sh4/fpu/fesetenv.c index de0440ec97..241c2559fc 100644 --- a/sysdeps/sh/sh4/fpu/fesetenv.c +++ b/sysdeps/sh/sh4/fpu/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-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/sh/sh4/fpu/fesetexcept.c b/sysdeps/sh/sh4/fpu/fesetexcept.c new file mode 100644 index 0000000000..9ce7ef6bbc --- /dev/null +++ b/sysdeps/sh/sh4/fpu/fesetexcept.c @@ -0,0 +1,32 @@ +/* Set given exception flags. SH4 version. + Copyright (C) 2016-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 + 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 new file mode 100644 index 0000000000..a54f5dd8b1 --- /dev/null +++ b/sysdeps/sh/sh4/fpu/fesetmode.c @@ -0,0 +1,38 @@ +/* Install given floating-point control modes. SH4 version. + Copyright (C) 2016-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 + 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 index 6300b5a870..3248c9609e 100644 --- a/sysdeps/sh/sh4/fpu/fesetround.c +++ b/sysdeps/sh/sh4/fpu/fesetround.c @@ -1,5 +1,5 @@ /* Set current rounding direction. - 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. Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998. diff --git a/sysdeps/sh/sh4/fpu/feupdateenv.c b/sysdeps/sh/sh4/fpu/feupdateenv.c index 4283162089..4a95951802 100644 --- a/sysdeps/sh/sh4/fpu/feupdateenv.c +++ b/sysdeps/sh/sh4/fpu/feupdateenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment and raise exceptions. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Nobuhiro Iwamatsu <iwamatsu@nigauri.org>, 2012. diff --git a/sysdeps/sh/sh4/fpu/fgetexcptflg.c b/sysdeps/sh/sh4/fpu/fgetexcptflg.c index 076360bc36..a73e501ea8 100644 --- a/sysdeps/sh/sh4/fpu/fgetexcptflg.c +++ b/sysdeps/sh/sh4/fpu/fgetexcptflg.c @@ -1,5 +1,5 @@ /* Store current representation for exceptions. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-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/sh/sh4/fpu/fraiseexcpt.c b/sysdeps/sh/sh4/fpu/fraiseexcpt.c index fb58ed5af0..12b9adc0ce 100644 --- a/sysdeps/sh/sh4/fpu/fraiseexcpt.c +++ b/sysdeps/sh/sh4/fpu/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Nobuhiro Iwamatsu <iwamatsu@nigauri.org>, 2012. diff --git a/sysdeps/sh/sh4/fpu/fsetexcptflg.c b/sysdeps/sh/sh4/fpu/fsetexcptflg.c index a162af3161..0948037393 100644 --- a/sysdeps/sh/sh4/fpu/fsetexcptflg.c +++ b/sysdeps/sh/sh4/fpu/fsetexcptflg.c @@ -1,5 +1,5 @@ /* Set floating-point environment exception handling. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-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/sh/sh4/fpu/ftestexcept.c b/sysdeps/sh/sh4/fpu/ftestexcept.c index c35c483ede..5de9910481 100644 --- a/sysdeps/sh/sh4/fpu/ftestexcept.c +++ b/sysdeps/sh/sh4/fpu/ftestexcept.c @@ -1,5 +1,5 @@ /* Test exception in current environment. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-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 |