This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.15-1162-g99ff6e5
- From: tschwinge at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 9 Jun 2012 16:46:42 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.15-1162-g99ff6e5
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 99ff6e5c49c10bb1827e102c7a8eb6b504f0886f (commit)
from 366af02c96eea0a03ccd2fa187819d866ac49ba2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=99ff6e5c49c10bb1827e102c7a8eb6b504f0886f
commit 99ff6e5c49c10bb1827e102c7a8eb6b504f0886f
Author: Thomas Schwinge <thomas@codesourcery.com>
Date: Sat Jun 9 18:46:01 2012 +0200
SH: No FE_UPWARD, FE_DOWNWARD.
diff --git a/ChangeLog b/ChangeLog
index 5a67474..b384ae8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2012-06-09 Thomas Schwinge <thomas@codesourcery.com>
+ * sysdeps/sh/sh4/fpu/bits/fenv.h (__FE_UNDEFINED): Define.
+ (FE_UPWARD, FE_DOWNWARD): Don't define.
+ * sysdeps/sh/sh4/fpu/fegetround.c (fegetround): Adapt to that.
+ * sysdeps/sh/sh4/fpu/fesetround.c (fesetround): Likewise.
+
* sysdeps/sh/sh4/fpu/fegetenv.c (fegetenv): Do not re-write fpscr after
reading it.
* sysdeps/sh/sh4/fpu/fegetexcept.c (fegetexcept): Likewise.
diff --git a/sysdeps/sh/sh4/fpu/bits/fenv.h b/sysdeps/sh/sh4/fpu/bits/fenv.h
index 38c303f..9315949 100644
--- a/sysdeps/sh/sh4/fpu/bits/fenv.h
+++ b/sysdeps/sh/sh4/fpu/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2012 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
@@ -39,19 +39,17 @@ enum
#define FE_ALL_EXCEPT \
(FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
-/* The SH FPU supports all of the four defined rounding modes. We
- use again the bit positions in the FPU control word as the values
- for the appropriate macros. */
+/* The SH FPU supports two of the four defined rounding modes: round to nearest
+ and round to zero. We use again the bit positions in the FPU control word
+ as the values for the appropriate macros. */
enum
{
+ __FE_UNDEFINED = -1,
+
FE_TONEAREST = 0x0,
#define FE_TONEAREST FE_TONEAREST
FE_TOWARDZERO = 0x1,
#define FE_TOWARDZERO FE_TOWARDZERO
- FE_UPWARD = 0x2,
-#define FE_UPWARD FE_UPWARD
- FE_DOWNWARD = 0x3
-#define FE_DOWNWARD FE_DOWNWARD
};
diff --git a/sysdeps/sh/sh4/fpu/fegetround.c b/sysdeps/sh/sh4/fpu/fegetround.c
index 7368383..adaeb8a 100644
--- a/sysdeps/sh/sh4/fpu/fegetround.c
+++ b/sysdeps/sh/sh4/fpu/fegetround.c
@@ -28,5 +28,5 @@ fegetround (void)
/* Get control word. */
_FPU_GETCW (cw);
- return cw & 0x3;
+ return cw & 0x1;
}
diff --git a/sysdeps/sh/sh4/fpu/fesetround.c b/sysdeps/sh/sh4/fpu/fesetround.c
index 82e13b6..91c159b 100644
--- a/sysdeps/sh/sh4/fpu/fesetround.c
+++ b/sysdeps/sh/sh4/fpu/fesetround.c
@@ -25,7 +25,7 @@ fesetround (int round)
{
fpu_control_t cw;
- if ((round & ~0x3) != 0)
+ if ((round & ~0x1) != 0)
/* ROUND is no valid rounding mode. */
return 1;
@@ -33,7 +33,7 @@ fesetround (int round)
_FPU_GETCW (cw);
/* Set rounding bits. */
- cw &= ~0x3;
+ cw &= ~0x1;
cw |= round;
/* Set new state. */
_FPU_SETCW (cw);
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
sysdeps/sh/sh4/fpu/bits/fenv.h | 14 ++++++--------
sysdeps/sh/sh4/fpu/fegetround.c | 2 +-
sysdeps/sh/sh4/fpu/fesetround.c | 4 ++--
4 files changed, 14 insertions(+), 11 deletions(-)
hooks/post-receive
--
GNU C Library master sources