OpenCores
URL https://opencores.org/ocsvn/altor32/altor32/trunk

Subversion Repositories altor32

[/] [altor32/] [trunk/] [gcc-x64/] [or1knd-elf/] [or1knd-elf/] [include/] [machine/] [ieeefp.h] - Blame information for rev 35

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 35 ultra_embe
#ifndef __IEEE_BIG_ENDIAN
2
#ifndef __IEEE_LITTLE_ENDIAN
3
 
4
/* This file can define macros to choose variations of the IEEE float
5
   format:
6
 
7
   _FLT_LARGEST_EXPONENT_IS_NORMAL
8
 
9
        Defined if the float format uses the largest exponent for finite
10
        numbers rather than NaN and infinity representations.  Such a
11
        format cannot represent NaNs or infinities at all, but it's FLT_MAX
12
        is twice the IEEE value.
13
 
14
   _FLT_NO_DENORMALS
15
 
16
        Defined if the float format does not support IEEE denormals.  Every
17
        float with a zero exponent is taken to be a zero representation.
18
 
19
   ??? At the moment, there are no equivalent macros above for doubles and
20
   the macros are not fully supported by --enable-newlib-hw-fp.
21
 
22
   __IEEE_BIG_ENDIAN
23
 
24
        Defined if the float format is big endian.  This is mutually exclusive
25
        with __IEEE_LITTLE_ENDIAN.
26
 
27
   __IEEE_LITTLE_ENDIAN
28
 
29
        Defined if the float format is little endian.  This is mutually exclusive
30
        with __IEEE_BIG_ENDIAN.
31
 
32
   Note that one of __IEEE_BIG_ENDIAN or __IEEE_LITTLE_ENDIAN must be specified for a
33
   platform or error will occur.
34
 
35
   __IEEE_BYTES_LITTLE_ENDIAN
36
 
37
        This flag is used in conjunction with __IEEE_BIG_ENDIAN to describe a situation
38
        whereby multiple words of an IEEE floating point are in big endian order, but the
39
        words themselves are little endian with respect to the bytes.
40
 
41
   _DOUBLE_IS_32BITS
42
 
43
        This is used on platforms that support double by using the 32-bit IEEE
44
        float type.
45
 
46
   _FLOAT_ARG
47
 
48
        This represents what type a float arg is passed as.  It is used when the type is
49
        not promoted to double.
50
 
51
*/
52
 
53
#if (defined(__arm__) || defined(__thumb__)) && !defined(__MAVERICK__)
54
/* ARM traditionally used big-endian words; and within those words the
55
   byte ordering was big or little endian depending upon the target.
56
   Modern floating-point formats are naturally ordered; in this case
57
   __VFP_FP__ will be defined, even if soft-float.  */
58
#ifdef __VFP_FP__
59
# ifdef __ARMEL__
60
#  define __IEEE_LITTLE_ENDIAN
61
# else
62
#  define __IEEE_BIG_ENDIAN
63
# endif
64
#else
65
# define __IEEE_BIG_ENDIAN
66
# ifdef __ARMEL__
67
#  define __IEEE_BYTES_LITTLE_ENDIAN
68
# endif
69
#endif
70
#endif
71
 
72
#if defined (__aarch64__)
73
#if defined (__AARCH64EL__)
74
#define __IEEE_LITTLE_ENDIAN
75
#else
76
#define __IEEE_BIG_ENDIAN
77
#endif
78
#endif
79
 
80
#ifdef __epiphany__
81
#define __IEEE_LITTLE_ENDIAN
82
#define Sudden_Underflow 1
83
#endif
84
 
85
#ifdef __hppa__
86
#define __IEEE_BIG_ENDIAN
87
#endif
88
 
89
#ifdef __SPU__
90
#define __IEEE_BIG_ENDIAN
91
 
92
#define isfinite(__y) \
93
        (__extension__ ({int __cy; \
94
                (sizeof (__y) == sizeof (float))  ? (1) : \
95
                (__cy = fpclassify(__y)) != FP_INFINITE && __cy != FP_NAN;}))
96
 
97
#define isinf(__x) ((sizeof (__x) == sizeof (float))  ?  (0) : __isinfd(__x))
98
#define isnan(__x) ((sizeof (__x) == sizeof (float))  ?  (0) : __isnand(__x))
99
 
100
/*
101
 * Macros for use in ieeefp.h. We can't just define the real ones here
102
 * (like those above) as we have name space issues when this is *not*
103
 * included via generic the ieeefp.h.
104
 */
105
#define __ieeefp_isnanf(x)      0
106
#define __ieeefp_isinff(x)      0
107
#define __ieeefp_finitef(x)     1
108
#endif
109
 
110
#ifdef __sparc__
111
#ifdef __LITTLE_ENDIAN_DATA__
112
#define __IEEE_LITTLE_ENDIAN
113
#else
114
#define __IEEE_BIG_ENDIAN
115
#endif
116
#endif
117
 
118
#if defined(__m68k__) || defined(__mc68000__)
119
#define __IEEE_BIG_ENDIAN
120
#endif
121
 
122
#if defined(__mc68hc11__) || defined(__mc68hc12__) || defined(__mc68hc1x__)
123
#define __IEEE_BIG_ENDIAN
124
#ifdef __HAVE_SHORT_DOUBLE__
125
# define _DOUBLE_IS_32BITS
126
#endif
127
#endif
128
 
129
#if defined (__H8300__) || defined (__H8300H__) || defined (__H8300S__) || defined (__H8500__) || defined (__H8300SX__)
130
#define __IEEE_BIG_ENDIAN
131
#define _FLOAT_ARG float
132
#define _DOUBLE_IS_32BITS
133
#endif
134
 
135
#if defined (__xc16x__) || defined (__xc16xL__) || defined (__xc16xS__)
136
#define __IEEE_LITTLE_ENDIAN
137
#define _FLOAT_ARG float
138
#define _DOUBLE_IS_32BITS
139
#endif
140
 
141
 
142
#ifdef __sh__
143
#ifdef __LITTLE_ENDIAN__
144
#define __IEEE_LITTLE_ENDIAN
145
#else
146
#define __IEEE_BIG_ENDIAN
147
#endif
148
#if defined(__SH2E__) || defined(__SH3E__) || defined(__SH4_SINGLE_ONLY__) || defined(__SH2A_SINGLE_ONLY__)
149
#define _DOUBLE_IS_32BITS
150
#endif
151
#endif
152
 
153
#ifdef _AM29K
154
#define __IEEE_BIG_ENDIAN
155
#endif
156
 
157
#ifdef _WIN32
158
#define __IEEE_LITTLE_ENDIAN
159
#endif
160
 
161
#ifdef __i386__
162
#define __IEEE_LITTLE_ENDIAN
163
#endif
164
 
165
#ifdef __i960__
166
#define __IEEE_LITTLE_ENDIAN
167
#endif
168
 
169
#ifdef __lm32__
170
#define __IEEE_BIG_ENDIAN
171
#endif
172
 
173
#ifdef __M32R__
174
#define __IEEE_BIG_ENDIAN
175
#endif
176
 
177
#if defined(_C4x) || defined(_C3x)
178
#define __IEEE_BIG_ENDIAN
179
#define _DOUBLE_IS_32BITS
180
#endif
181
 
182
#ifdef __TMS320C6X__
183
#ifdef _BIG_ENDIAN
184
#define __IEEE_BIG_ENDIAN
185
#else
186
#define __IEEE_LITTLE_ENDIAN
187
#endif
188
#endif
189
 
190
#ifdef __TIC80__
191
#define __IEEE_LITTLE_ENDIAN
192
#endif
193
 
194
#ifdef __MIPSEL__
195
#define __IEEE_LITTLE_ENDIAN
196
#endif
197
#ifdef __MIPSEB__
198
#define __IEEE_BIG_ENDIAN
199
#endif
200
 
201
#ifdef __MMIX__
202
#define __IEEE_BIG_ENDIAN
203
#endif
204
 
205
#ifdef __D30V__
206
#define __IEEE_BIG_ENDIAN
207
#endif
208
 
209
/* necv70 was __IEEE_LITTLE_ENDIAN. */
210
 
211
#ifdef __W65__
212
#define __IEEE_LITTLE_ENDIAN
213
#define _DOUBLE_IS_32BITS
214
#endif
215
 
216
#if defined(__Z8001__) || defined(__Z8002__)
217
#define __IEEE_BIG_ENDIAN
218
#endif
219
 
220
#ifdef __m88k__
221
#define __IEEE_BIG_ENDIAN
222
#endif
223
 
224
#ifdef __mn10300__
225
#define __IEEE_LITTLE_ENDIAN
226
#endif
227
 
228
#ifdef __mn10200__
229
#define __IEEE_LITTLE_ENDIAN
230
#define _DOUBLE_IS_32BITS
231
#endif
232
 
233
#ifdef __v800
234
#define __IEEE_LITTLE_ENDIAN
235
#endif
236
 
237
#ifdef __v850
238
#define __IEEE_LITTLE_ENDIAN
239
#endif
240
 
241
#ifdef __D10V__
242
#define __IEEE_BIG_ENDIAN
243
#if __DOUBLE__ == 32
244
#define _DOUBLE_IS_32BITS
245
#endif
246
#endif
247
 
248
#ifdef __PPC__
249
#if (defined(_BIG_ENDIAN) && _BIG_ENDIAN) || (defined(_AIX) && _AIX)
250
#define __IEEE_BIG_ENDIAN
251
#else
252
#if (defined(_LITTLE_ENDIAN) && _LITTLE_ENDIAN) || (defined(__sun__) && __sun__) || (defined(_WIN32) && _WIN32)
253
#define __IEEE_LITTLE_ENDIAN
254
#endif
255
#endif
256
#endif
257
 
258
#ifdef __xstormy16__
259
#define __IEEE_LITTLE_ENDIAN
260
#endif
261
 
262
#ifdef __arc__
263
#ifdef __big_endian__
264
#define __IEEE_BIG_ENDIAN
265
#else
266
#define __IEEE_LITTLE_ENDIAN
267
#endif
268
#endif
269
 
270
#ifdef __CRX__
271
#define __IEEE_LITTLE_ENDIAN
272
#endif
273
 
274
#ifdef __fr30__
275
#define __IEEE_BIG_ENDIAN
276
#endif
277
 
278
#ifdef __mcore__
279
#define __IEEE_BIG_ENDIAN
280
#endif
281
 
282
#ifdef __mt__
283
#define __IEEE_BIG_ENDIAN
284
#endif
285
 
286
#ifdef __frv__
287
#define __IEEE_BIG_ENDIAN
288
#endif
289
 
290
#ifdef __moxie__
291
#ifdef __MOXIE_BIG_ENDIAN__
292
#define __IEEE_BIG_ENDIAN
293
#else
294
#define __IEEE_LITTLE_ENDIAN
295
#endif
296
#endif
297
 
298
#ifdef __ia64__
299
#ifdef __BIG_ENDIAN__
300
#define __IEEE_BIG_ENDIAN
301
#else
302
#define __IEEE_LITTLE_ENDIAN
303
#endif
304
#endif
305
 
306
#ifdef __AVR__
307
#define __IEEE_LITTLE_ENDIAN
308
#define _DOUBLE_IS_32BITS
309
#endif
310
 
311
#if defined(__or32__) || defined(__or1k__) || defined(__or1knd__) || defined(__or16__) || defined(__OR32__) || defined(__OR1K__) || defined(__OR1KND__)
312
#define __IEEE_BIG_ENDIAN
313
#endif
314
 
315
#ifdef __IP2K__
316
#define __IEEE_BIG_ENDIAN
317
#define __SMALL_BITFIELDS
318
#define _DOUBLE_IS_32BITS
319
#endif
320
 
321
#ifdef __iq2000__
322
#define __IEEE_BIG_ENDIAN
323
#endif
324
 
325
#ifdef __MAVERICK__
326
#ifdef __ARMEL__
327
#  define __IEEE_LITTLE_ENDIAN
328
#else  /* must be __ARMEB__ */
329
#  define __IEEE_BIG_ENDIAN
330
#endif /* __ARMEL__ */
331
#endif /* __MAVERICK__ */
332
 
333
#ifdef __m32c__
334
#define __IEEE_LITTLE_ENDIAN
335
#define __SMALL_BITFIELDS
336
#endif
337
 
338
#ifdef __CRIS__
339
#define __IEEE_LITTLE_ENDIAN
340
#endif
341
 
342
#ifdef __BFIN__
343
#define __IEEE_LITTLE_ENDIAN
344
#endif
345
 
346
#ifdef __x86_64__
347
#define __IEEE_LITTLE_ENDIAN
348
#endif
349
 
350
#ifdef __mep__
351
#ifdef __LITTLE_ENDIAN__
352
#define __IEEE_LITTLE_ENDIAN
353
#else
354
#define __IEEE_BIG_ENDIAN
355
#endif
356
#endif
357
 
358
#ifdef __MICROBLAZE__
359
#define __IEEE_BIG_ENDIAN
360
#endif
361
 
362
#ifdef __RL78__
363
#define __IEEE_LITTLE_ENDIAN
364
#define __SMALL_BITFIELDS       /* 16 Bit INT */
365
#define _DOUBLE_IS_32BITS
366
#endif
367
 
368
#ifdef __RX__
369
 
370
#ifdef __RX_BIG_ENDIAN__
371
#define __IEEE_BIG_ENDIAN
372
#else
373
#define __IEEE_LITTLE_ENDIAN
374
#endif
375
 
376
#ifndef __RX_64BIT_DOUBLES__
377
#define _DOUBLE_IS_32BITS
378
#endif
379
 
380
#ifdef __RX_16BIT_INTS__
381
#define __SMALL_BITFIELDS
382
#endif
383
 
384
#endif
385
 
386
#if (defined(__CR16__) || defined(__CR16C__) ||defined(__CR16CP__))
387
#define __IEEE_LITTLE_ENDIAN
388
#define __SMALL_BITFIELDS       /* 16 Bit INT */
389
#endif
390
 
391
#ifndef __IEEE_BIG_ENDIAN
392
#ifndef __IEEE_LITTLE_ENDIAN
393
#error Endianess not declared!!
394
#endif /* not __IEEE_LITTLE_ENDIAN */
395
#endif /* not __IEEE_BIG_ENDIAN */
396
 
397
#endif /* not __IEEE_LITTLE_ENDIAN */
398
#endif /* not __IEEE_BIG_ENDIAN */
399
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.