diff --git a/lib/libc/arm/Makefile.inc b/lib/libc/arm/Makefile.inc index c1cf60b06388..90dde632d053 100644 --- a/lib/libc/arm/Makefile.inc +++ b/lib/libc/arm/Makefile.inc @@ -7,6 +7,5 @@ SOFTFLOAT_BITS=32 CFLAGS+=-DSOFTFLOAT -# Long double is 80 bits -GDTOASRCS+=strtopx.c -MDSRCS+=machdep_ldisx.c +# Long double is just double precision. +MDSRCS+=machdep_ldisd.c diff --git a/lib/libc/arm/_fpmath.h b/lib/libc/arm/_fpmath.h index 80e764f8eacf..98d78327dec6 100644 --- a/lib/libc/arm/_fpmath.h +++ b/lib/libc/arm/_fpmath.h @@ -29,16 +29,22 @@ union IEEEl2bits { long double e; struct { +#ifndef __ARMEB__ unsigned int manl :32; - unsigned int manh :32; - unsigned int exp :15; + unsigned int manh :20; + unsigned int exp :11; unsigned int sign :1; - unsigned int junk :16; +#else + unsigned int sign :1; + unsigned int exp :11; + unsigned int manh :20; + unsigned int manl :32; +#endif } bits; }; -#define LDBL_NBIT 0x80000000 -#define mask_nbit_l(u) ((u).bits.manh &= ~LDBL_NBIT) +#define LDBL_NBIT 0 +#define mask_nbit_l(u) ((void)0) #define LDBL_MANH_SIZE 32 #define LDBL_MANL_SIZE 32