fpmath.h (f154b03b25139930b6e998966bf3b3fd37249ba9) | fpmath.h (74aed9855d18f91a1a2b22bd649f278bc4634acc) |
---|---|
1/*- 2 * Copyright (c) 2003 Mike Barcroft <mike@FreeBSD.org> 3 * Copyright (c) 2002 David Schultz <das@FreeBSD.ORG> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 16 unchanged lines hidden (view full) --- 25 * SUCH DAMAGE. 26 * 27 * $FreeBSD$ 28 */ 29 30#include <sys/endian.h> 31#include "_fpmath.h" 32 | 1/*- 2 * Copyright (c) 2003 Mike Barcroft <mike@FreeBSD.org> 3 * Copyright (c) 2002 David Schultz <das@FreeBSD.ORG> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 16 unchanged lines hidden (view full) --- 25 * SUCH DAMAGE. 26 * 27 * $FreeBSD$ 28 */ 29 30#include <sys/endian.h> 31#include "_fpmath.h" 32 |
33#ifndef _IEEE_WORD_ORDER 34#define _IEEE_WORD_ORDER _BYTE_ORDER 35#endif 36 |
|
33union IEEEf2bits { 34 float f; 35 struct { 36#if _BYTE_ORDER == _LITTLE_ENDIAN 37 unsigned int man :23; 38 unsigned int exp :8; 39 unsigned int sign :1; 40#else /* _BIG_ENDIAN */ --- 6 unchanged lines hidden (view full) --- 47 48#define DBL_MANH_SIZE 20 49#define DBL_MANL_SIZE 32 50 51union IEEEd2bits { 52 double d; 53 struct { 54#if _BYTE_ORDER == _LITTLE_ENDIAN | 37union IEEEf2bits { 38 float f; 39 struct { 40#if _BYTE_ORDER == _LITTLE_ENDIAN 41 unsigned int man :23; 42 unsigned int exp :8; 43 unsigned int sign :1; 44#else /* _BIG_ENDIAN */ --- 6 unchanged lines hidden (view full) --- 51 52#define DBL_MANH_SIZE 20 53#define DBL_MANL_SIZE 32 54 55union IEEEd2bits { 56 double d; 57 struct { 58#if _BYTE_ORDER == _LITTLE_ENDIAN |
59#if _IEEE_WORD_ORDER == _LITTLE_ENDIAN |
|
55 unsigned int manl :32; | 60 unsigned int manl :32; |
61#endif |
|
56 unsigned int manh :20; 57 unsigned int exp :11; 58 unsigned int sign :1; | 62 unsigned int manh :20; 63 unsigned int exp :11; 64 unsigned int sign :1; |
65#if _IEEE_WORD_ORDER == _BIG_ENDIAN 66 unsigned int manl :32; 67#endif |
|
59#else /* _BIG_ENDIAN */ 60 unsigned int sign :1; 61 unsigned int exp :11; 62 unsigned int manh :20; 63 unsigned int manl :32; 64#endif 65 } bits; 66}; | 68#else /* _BIG_ENDIAN */ 69 unsigned int sign :1; 70 unsigned int exp :11; 71 unsigned int manh :20; 72 unsigned int manl :32; 73#endif 74 } bits; 75}; |