summaryrefslogtreecommitdiff
path: root/soft-fp
diff options
context:
space:
mode:
Diffstat (limited to 'soft-fp')
-rw-r--r--soft-fp/op-common.h8
-rw-r--r--soft-fp/soft-fp.h9
2 files changed, 13 insertions, 4 deletions
diff --git a/soft-fp/op-common.h b/soft-fp/op-common.h
index 0a2f86aad9..83c2156954 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 bb68df9160..b247125a39 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