0be92167d7
Soft float targets do no define the FE_... rounding constants thus do not try to fesetround() in case the constants are not defined.
39 lines
816 B
Diff
39 lines
816 B
Diff
Source: @pullmoll
|
|
Upstream: no
|
|
Reason: Target architectures with soft float do not define these constants.
|
|
|
|
--- tests/fp/fp-bench.c 2020-12-08 17:59:44.000000000 +0100
|
|
+++ tests/fp/fp-bench.c 2020-12-12 20:38:40.702235420 +0100
|
|
@@ -485,16 +485,32 @@
|
|
|
|
switch (rounding) {
|
|
case ROUND_EVEN:
|
|
+#if defined(FE_TONEAREST)
|
|
rhost = FE_TONEAREST;
|
|
+#else
|
|
+ return;
|
|
+#endif
|
|
break;
|
|
case ROUND_ZERO:
|
|
+#if defined(FE_TOWARDZERO)
|
|
rhost = FE_TOWARDZERO;
|
|
+#else
|
|
+ return;
|
|
+#endif
|
|
break;
|
|
case ROUND_DOWN:
|
|
+#if defined(FE_DOWNWARD)
|
|
rhost = FE_DOWNWARD;
|
|
+#else
|
|
+ return;
|
|
+#endif
|
|
break;
|
|
case ROUND_UP:
|
|
+#if defined(FE_UPWARD)
|
|
rhost = FE_UPWARD;
|
|
+#else
|
|
+ return;
|
|
+#endif
|
|
break;
|
|
case ROUND_TIEAWAY:
|
|
die_host_rounding(rounding);
|