mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-15 04:23:39 +08:00
SH: Use fpu_control_t for the temporary FPU control word.
This commit is contained in:
parent
3f99608f82
commit
04fb54b507
16
ChangeLog
16
ChangeLog
@ -1,3 +1,19 @@
|
|||||||
|
2012-05-27 Thomas Schwinge <thomas@codesourcery.com>
|
||||||
|
|
||||||
|
* sysdeps/sh/sh4/fpu/fclrexcpt.c (feclearexcept): Use fpu_control_t for
|
||||||
|
the temporary FPU control word.
|
||||||
|
* sysdeps/sh/sh4/fpu/fedisblxcpt.c (fedisableexcept): Likewise.
|
||||||
|
* sysdeps/sh/sh4/fpu/feenablxcpt.c (feenableexcept): Likewise.
|
||||||
|
* sysdeps/sh/sh4/fpu/fegetenv.c (fegetenv): Likewise.
|
||||||
|
* sysdeps/sh/sh4/fpu/fegetexcept.c (fegetexcept): Likewise.
|
||||||
|
* sysdeps/sh/sh4/fpu/fegetround.c (fegetround): Likewise.
|
||||||
|
* sysdeps/sh/sh4/fpu/feholdexcpt.c (feholdexcept): Likewise.
|
||||||
|
* sysdeps/sh/sh4/fpu/fesetenv.c (fesetenv): Likewise.
|
||||||
|
* sysdeps/sh/sh4/fpu/fesetround.c (fesetround): Likewise.
|
||||||
|
* sysdeps/sh/sh4/fpu/feupdateenv.c (feupdateenv): Likewise.
|
||||||
|
* sysdeps/sh/sh4/fpu/fsetexcptflg.c (fesetexceptflag): Likewise.
|
||||||
|
* sysdeps/sh/sh4/fpu/ftestexcept.c (fetestexcept): Likewise.
|
||||||
|
|
||||||
2012-05-27 Kaz Kojima <kkojima@rr.iij4u.or.jp>
|
2012-05-27 Kaz Kojima <kkojima@rr.iij4u.or.jp>
|
||||||
|
|
||||||
* sysdeps/sh/sh4/fpu/fraiseexcpt.c (feraiseexcept): Restore fpscr flag
|
* sysdeps/sh/sh4/fpu/fraiseexcpt.c (feraiseexcept): Restore fpscr flag
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Clear given exceptions in current floating-point environment.
|
/* Clear given exceptions in current floating-point environment.
|
||||||
Copyright (C) 1998, 2000 Free Software Foundation, Inc.
|
Copyright (C) 1998-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
|
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
|
||||||
|
|
||||||
@ -23,7 +23,7 @@
|
|||||||
int
|
int
|
||||||
feclearexcept (int excepts)
|
feclearexcept (int excepts)
|
||||||
{
|
{
|
||||||
int cw;
|
fpu_control_t cw;
|
||||||
|
|
||||||
/* Mask out unsupported bits/exceptions. */
|
/* Mask out unsupported bits/exceptions. */
|
||||||
excepts &= FE_ALL_EXCEPT;
|
excepts &= FE_ALL_EXCEPT;
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
int
|
int
|
||||||
fedisableexcept (int excepts)
|
fedisableexcept (int excepts)
|
||||||
{
|
{
|
||||||
unsigned int temp, old_exc;
|
fpu_control_t temp, old_exc;
|
||||||
|
|
||||||
/* Get the current control register contents. */
|
/* Get the current control register contents. */
|
||||||
_FPU_GETCW (temp);
|
_FPU_GETCW (temp);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
int
|
int
|
||||||
feenableexcept (int excepts)
|
feenableexcept (int excepts)
|
||||||
{
|
{
|
||||||
unsigned int temp, old_flag;
|
fpu_control_t temp, old_flag;
|
||||||
|
|
||||||
/* Get current exceptions. */
|
/* Get current exceptions. */
|
||||||
_FPU_GETCW (temp);
|
_FPU_GETCW (temp);
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
int
|
int
|
||||||
fegetenv (fenv_t *envp)
|
fegetenv (fenv_t *envp)
|
||||||
{
|
{
|
||||||
unsigned long int temp;
|
fpu_control_t temp;
|
||||||
_FPU_GETCW (temp);
|
_FPU_GETCW (temp);
|
||||||
/* When read fpscr, this was initialized.
|
/* When read fpscr, this was initialized.
|
||||||
We need to rewrite value of temp. */
|
We need to rewrite value of temp. */
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
int
|
int
|
||||||
fegetexcept (void)
|
fegetexcept (void)
|
||||||
{
|
{
|
||||||
unsigned int temp;
|
fpu_control_t temp;
|
||||||
|
|
||||||
/* Get current exceptions. */
|
/* Get current exceptions. */
|
||||||
_FPU_GETCW (temp);
|
_FPU_GETCW (temp);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Return current rounding direction.
|
/* Return current rounding direction.
|
||||||
Copyright (C) 1998, 2000 Free Software Foundation, Inc.
|
Copyright (C) 1998-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
|
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
|
||||||
|
|
||||||
@ -23,7 +23,7 @@
|
|||||||
int
|
int
|
||||||
fegetround (void)
|
fegetround (void)
|
||||||
{
|
{
|
||||||
int cw;
|
fpu_control_t cw;
|
||||||
|
|
||||||
/* Get control word. */
|
/* Get control word. */
|
||||||
_FPU_GETCW (cw);
|
_FPU_GETCW (cw);
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* Store current floating-point environment and clear exceptions.
|
/* Store current floating-point environment and clear exceptions.
|
||||||
Copyright (C) 1997, 1998, 1999, 2000, 2005, 2010
|
Copyright (C) 1997-2012 Free Software Foundation, Inc.
|
||||||
Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -23,7 +22,7 @@
|
|||||||
int
|
int
|
||||||
feholdexcept (fenv_t *envp)
|
feholdexcept (fenv_t *envp)
|
||||||
{
|
{
|
||||||
unsigned long int temp;
|
fpu_control_t temp;
|
||||||
|
|
||||||
/* Store the environment. */
|
/* Store the environment. */
|
||||||
_FPU_GETCW (temp);
|
_FPU_GETCW (temp);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Install given floating-point environment.
|
/* Install given floating-point environment.
|
||||||
Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
|
Copyright (C) 1997-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -26,7 +26,7 @@ fesetenv (const fenv_t *envp)
|
|||||||
_FPU_SETCW (_FPU_DEFAULT);
|
_FPU_SETCW (_FPU_DEFAULT);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
unsigned long int temp = envp->__fpscr;
|
fpu_control_t temp = envp->__fpscr;
|
||||||
_FPU_SETCW (temp);
|
_FPU_SETCW (temp);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
int
|
int
|
||||||
fesetround (int round)
|
fesetround (int round)
|
||||||
{
|
{
|
||||||
unsigned int cw;
|
fpu_control_t cw;
|
||||||
|
|
||||||
if ((round & ~0x3) != 0)
|
if ((round & ~0x3) != 0)
|
||||||
/* ROUND is no valid rounding mode. */
|
/* ROUND is no valid rounding mode. */
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
int
|
int
|
||||||
feupdateenv (const fenv_t *envp)
|
feupdateenv (const fenv_t *envp)
|
||||||
{
|
{
|
||||||
unsigned int temp;
|
fpu_control_t temp;
|
||||||
|
|
||||||
_FPU_GETCW (temp);
|
_FPU_GETCW (temp);
|
||||||
temp = (temp & FE_ALL_EXCEPT);
|
temp = (temp & FE_ALL_EXCEPT);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Set floating-point environment exception handling.
|
/* Set floating-point environment exception handling.
|
||||||
Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
|
Copyright (C) 1997-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -23,7 +23,7 @@
|
|||||||
int
|
int
|
||||||
fesetexceptflag (const fexcept_t *flagp, int excepts)
|
fesetexceptflag (const fexcept_t *flagp, int excepts)
|
||||||
{
|
{
|
||||||
fexcept_t temp;
|
fpu_control_t temp;
|
||||||
|
|
||||||
/* Get the current environment. */
|
/* Get the current environment. */
|
||||||
_FPU_GETCW (temp);
|
_FPU_GETCW (temp);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Test exception in current environment.
|
/* Test exception in current environment.
|
||||||
Copyright (C) 1997, 1998, 2000, 2010 Free Software Foundation, Inc.
|
Copyright (C) 1997-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -22,7 +22,7 @@
|
|||||||
int
|
int
|
||||||
fetestexcept (int excepts)
|
fetestexcept (int excepts)
|
||||||
{
|
{
|
||||||
fexcept_t temp;
|
fpu_control_t temp;
|
||||||
|
|
||||||
/* Get current exceptions. */
|
/* Get current exceptions. */
|
||||||
_FPU_GETCW (temp);
|
_FPU_GETCW (temp);
|
||||||
|
Loading…
Reference in New Issue
Block a user