summaryrefslogtreecommitdiff
path: root/arch/powerpc/bits
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-01-25 13:20:52 +0100
committerRich Felker <dalias@aerifal.cx>2016-03-06 17:03:01 -0500
commit5a92dd95c77cee81755f1a441ae0b71e3ae2bcdb (patch)
treea7a12a71e2a505ed4a5c20c1356fc2d7cf2cb2f1 /arch/powerpc/bits
parent9543656cc32fda48fc463f332ee20e91eed2b768 (diff)
downloadmusl-5a92dd95c77cee81755f1a441ae0b71e3ae2bcdb.tar.gz
add powerpc soft-float support
Some PowerPC CPUs (e.g. Freescale MPC85xx) have a completely different instruction set for floating point operations (SPE). Executing regular PowerPC floating point instructions results in "Illegal instruction" errors. Make it possible to run these devices in soft-float mode.
Diffstat (limited to 'arch/powerpc/bits')
-rw-r--r--arch/powerpc/bits/fenv.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/bits/fenv.h b/arch/powerpc/bits/fenv.h
index 2f722e6b..c5a3e5c5 100644
--- a/arch/powerpc/bits/fenv.h
+++ b/arch/powerpc/bits/fenv.h
@@ -1,3 +1,7 @@
+#ifdef _SOFT_FLOAT
+#define FE_ALL_EXCEPT 0
+#define FE_TONEAREST 0
+#else
#define FE_TONEAREST 0
#define FE_TOWARDZERO 1
#define FE_UPWARD 2
@@ -24,6 +28,7 @@
#define FE_ALL_INVALID 0x01f80700
#endif
+#endif
typedef unsigned fexcept_t;
typedef double fenv_t;