_fpmath.h (2b2714935bc7d030de3fdc88eae331a40f2d188d) _fpmath.h (74aed9855d18f91a1a2b22bd649f278bc4634acc)
1/*-
2 * Copyright (c) 2002, 2003 David Schultz <das@FreeBSD.ORG>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD$
27 */
28
1/*-
2 * Copyright (c) 2002, 2003 David Schultz <das@FreeBSD.ORG>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD$
27 */
28
29#if defined(__VFP_FP__)
30#define _IEEE_WORD_ORDER _BYTE_ORDER
31#else
32#define _IEEE_WORD_ORDER _BIG_ENDIAN
33#endif
34
29union IEEEl2bits {
30 long double e;
31 struct {
35union IEEEl2bits {
36 long double e;
37 struct {
32#ifndef __ARMEB__
38#if _BYTE_ORDER == _LITTLE_ENDIAN
39#if _IEEE_WORD_ORDER == _LITTLE_ENDIAN
33 unsigned int manl :32;
40 unsigned int manl :32;
41#endif
34 unsigned int manh :20;
35 unsigned int exp :11;
36 unsigned int sign :1;
42 unsigned int manh :20;
43 unsigned int exp :11;
44 unsigned int sign :1;
37#else
45#if _IEEE_WORD_ORDER == _BIG_ENDIAN
46 unsigned int manl :32;
47#endif
48#else /* _BYTE_ORDER == _LITTLE_ENDIAN */
38 unsigned int sign :1;
39 unsigned int exp :11;
40 unsigned int manh :20;
41 unsigned int manl :32;
42#endif
43 } bits;
44};
45
46#define LDBL_NBIT 0
47#define mask_nbit_l(u) ((void)0)
48
49#define LDBL_MANH_SIZE 32
50#define LDBL_MANL_SIZE 32
51
52#define LDBL_TO_ARRAY32(u, a) do { \
53 (a)[0] = (uint32_t)(u).bits.manl; \
54 (a)[1] = (uint32_t)(u).bits.manh; \
55} while(0)
49 unsigned int sign :1;
50 unsigned int exp :11;
51 unsigned int manh :20;
52 unsigned int manl :32;
53#endif
54 } bits;
55};
56
57#define LDBL_NBIT 0
58#define mask_nbit_l(u) ((void)0)
59
60#define LDBL_MANH_SIZE 32
61#define LDBL_MANL_SIZE 32
62
63#define LDBL_TO_ARRAY32(u, a) do { \
64 (a)[0] = (uint32_t)(u).bits.manl; \
65 (a)[1] = (uint32_t)(u).bits.manh; \
66} while(0)