From 038f24265e13491088a63c812ada06057a034993 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 7 Jan 2011 01:42:06 +0000 Subject: [PATCH] Fix ARM fenv.h fallbacks when excepts == 0. --- ChangeLog.arm | 7 +++++++ sysdeps/arm/eabi/fclrexcpt.c | 6 +++--- sysdeps/arm/eabi/fraiseexcpt.c | 6 +++--- sysdeps/arm/eabi/fsetexcptflg.c | 6 +++--- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ChangeLog.arm b/ChangeLog.arm index d02f269593f..8951801aaba 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,10 @@ +2011-01-07 Joseph Myers + + * sysdeps/arm/eabi/fclrexcpt.c (__feclearexcept): Return zero if + unsupported but nothing needs to be done. + * sysdeps/arm/eabi/fraiseexcpt.c (feraiseexcept): Likewise. + * sysdeps/arm/eabi/fsetexcptflg.c (__fesetexceptflag): Likewise. + 2010-12-21 Joseph Myers * sysdeps/arm/stackinfo.h: Define DEFAULT_STACK_PERMS with PF_X. diff --git a/sysdeps/arm/eabi/fclrexcpt.c b/sysdeps/arm/eabi/fclrexcpt.c index 8287dc61bd9..0bdd6a14d3b 100644 --- a/sysdeps/arm/eabi/fclrexcpt.c +++ b/sysdeps/arm/eabi/fclrexcpt.c @@ -1,5 +1,5 @@ /* Clear given exceptions in current floating-point environment. - Copyright (C) 1997,98,99,2000,01,05 Free Software Foundation, Inc. + Copyright (C) 1997,98,99,2000,01,05,11 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 @@ -48,8 +48,8 @@ __feclearexcept (int excepts) return 0; } - /* Unsupported, so fail. */ - return 1; + /* Unsupported, so fail unless nothing needs to be done. */ + return (excepts != 0); } #include diff --git a/sysdeps/arm/eabi/fraiseexcpt.c b/sysdeps/arm/eabi/fraiseexcpt.c index 53ccd9d01f2..78441ec013a 100644 --- a/sysdeps/arm/eabi/fraiseexcpt.c +++ b/sysdeps/arm/eabi/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - Copyright (C) 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2011 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 @@ -103,8 +103,8 @@ feraiseexcept (int excepts) return 0; } - /* Unsupported, so fail. */ - return 1; + /* Unsupported, so fail unless nothing needs to be done. */ + return (excepts != 0); } libm_hidden_def (feraiseexcept) diff --git a/sysdeps/arm/eabi/fsetexcptflg.c b/sysdeps/arm/eabi/fsetexcptflg.c index 3dfeb2c2955..28966bb8f64 100644 --- a/sysdeps/arm/eabi/fsetexcptflg.c +++ b/sysdeps/arm/eabi/fsetexcptflg.c @@ -1,5 +1,5 @@ /* Set floating-point environment exception handling. - Copyright (C) 1997,98,99,2000,01,05,08 Free Software Foundation, Inc. + Copyright (C) 1997,98,99,2000,01,05,08,11 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 @@ -47,8 +47,8 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts) return 0; } - /* Unsupported, so fail. */ - return 1; + /* Unsupported, so fail unless nothing needs to be done. */ + return (excepts != 0); } #include -- 2.47.2