]> git.saurik.com Git - apple/libc.git/blobdiff - fbsdcompat/_fpmath.h
Libc-498.1.5.tar.gz
[apple/libc.git] / fbsdcompat / _fpmath.h
index 3871ec260aed6535422c62427a3b57e75bf02c23..1df393eedcab960b01fd9fc26d975e7e09366e0a 100644 (file)
@@ -97,6 +97,35 @@ union IEEEl2bits {
        (a)[0] = (uint32_t)(u).bits.manl;               \
        (a)[1] = (uint32_t)(u).bits.manh;               \
 } while(0)
+#elif defined(__arm__)
+
+union IEEEl2bits {
+    long double     e;
+    struct {
+#ifndef __ARMEB__
+       unsigned int    manl    :32;
+       unsigned int    manh    :20;
+       unsigned int    exp     :11;
+       unsigned int    sign    :1;
+#else
+       unsigned int            sign    :1;
+       unsigned int            exp     :11;
+       unsigned int            manh    :20;
+       unsigned int            manl    :32;
+#endif
+    } bits;
+};
+
+#define LDBL_NBIT       0
+#define mask_nbit_l(u)  ((void)0)
+
+#define LDBL_MANH_SIZE  20
+#define LDBL_MANL_SIZE  32
+
+#define LDBL_TO_ARRAY32(u, a) do {                      \
+        (a)[0] = (uint32_t)(u).bits.manl;               \
+        (a)[1] = (uint32_t)(u).bits.manh;               \
+} while(0)
 
 #else
 #error unsupported architecture