X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/0a7506c9bdc0d0d560d4b9c8a3d1089f5db425b9..b5d655f7532a546b54809da387f7467d128a756b:/fbsdcompat/_fpmath.h diff --git a/fbsdcompat/_fpmath.h b/fbsdcompat/_fpmath.h index 3871ec2..1df393e 100644 --- a/fbsdcompat/_fpmath.h +++ b/fbsdcompat/_fpmath.h @@ -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