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.21-186-g068a627
- From: jsm28 at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 11 Mar 2015 01:14:53 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.21-186-g068a627
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 068a6274556f9f362443648f4fd47525c8cf2dba (commit)
from 44a6213c8eebf3f69712a5fba9a33bbb90a79023 (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=068a6274556f9f362443648f4fd47525c8cf2dba
commit 068a6274556f9f362443648f4fd47525c8cf2dba
Author: Joseph Myers <joseph@codesourcery.com>
Date: Wed Mar 11 01:14:15 2015 +0000
soft-fp: Add _FP_UNREACHABLE.
This patch makes soft-fp use a new macro _FP_UNREACHABLE in place of
calling abort in unreachable default cases of switch statements.
_FP_UNREACHABLE expands to call __builtin_unreachable for GCC 4.5 and
later; the fallback to abort is thus only for kernel use.
Tested for powerpc-nofpu that installed stripped shared libraries are
unchanged by this patch. Also tested with the math/ tests for mips64
(in the case of fma there *was* previously an abort call generated,
unlike for the other operations - one switch only deals with a subset
of classes for one operand based on what could have been generated in
the earlier part of fma, whereas the other switches deal with all
combinations of two classes - and this is apparently too complicated
for the default case to have been optimized away).
* soft-fp/soft-fp.h (_FP_UNREACHABLE): New macro.
* soft-fp/op-common.h (_FP_MUL): Use _FP_UNREACHABLE instead of
abort.
(_FP_FMA): Likewise.
(_FP_DIV): Likewise.
diff --git a/ChangeLog b/ChangeLog
index da5c0ef..cea5b0e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-03-11 Joseph Myers <joseph@codesourcery.com>
+
+ * soft-fp/soft-fp.h (_FP_UNREACHABLE): New macro.
+ * soft-fp/op-common.h (_FP_MUL): Use _FP_UNREACHABLE instead of
+ abort.
+ (_FP_FMA): Likewise.
+ (_FP_DIV): Likewise.
+
2015-03-10 Roland McGrath <roland@hack.frob.com>
* scripts/evaluate-test.sh: Grok exit code 77 as UNSUPPORTED and exit
diff --git a/soft-fp/op-common.h b/soft-fp/op-common.h
index 0a2f86a..83c2156 100644
--- a/soft-fp/op-common.h
+++ b/soft-fp/op-common.h
@@ -927,7 +927,7 @@
break; \
\
default: \
- abort (); \
+ _FP_UNREACHABLE; \
} \
} \
while (0)
@@ -1092,7 +1092,7 @@
break; \
\
default: \
- abort (); \
+ _FP_UNREACHABLE; \
} \
\
/* T = X * Y is zero, infinity or NaN. */ \
@@ -1148,7 +1148,7 @@
break; \
\
default: \
- abort (); \
+ _FP_UNREACHABLE; \
} \
done_fma: ; \
} \
@@ -1215,7 +1215,7 @@
break; \
\
default: \
- abort (); \
+ _FP_UNREACHABLE; \
} \
} \
while (0)
diff --git a/soft-fp/soft-fp.h b/soft-fp/soft-fp.h
index bb68df9..b247125 100644
--- a/soft-fp/soft-fp.h
+++ b/soft-fp/soft-fp.h
@@ -51,6 +51,15 @@
# endif
#endif
+/* For unreachable default cases in switch statements over bitwise OR
+ of FP_CLS_* values. */
+#if (defined __GNUC__ \
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)))
+# define _FP_UNREACHABLE __builtin_unreachable ()
+#else
+# define _FP_UNREACHABLE abort ()
+#endif
+
/* In the Linux kernel, some architectures have a single function that
uses different kinds of unpacking and packing depending on the
instruction being emulated, meaning it is not readily visible to
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
soft-fp/op-common.h | 8 ++++----
soft-fp/soft-fp.h | 9 +++++++++
3 files changed, 21 insertions(+), 4 deletions(-)
hooks/post-receive
--
GNU C Library master sources