1 /* target.h -- Public #include File (module.h template V1.0)
2 Copyright (C) 1995, 1996, 2002 Free Software Foundation, Inc.
3 Contributed by James Craig Burley.
5 This file is part of GNU Fortran.
7 GNU Fortran is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 GNU Fortran is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU Fortran; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
28 /* Allow multiple inclusion to work. */
30 #ifndef GCC_F_TARGET_H
31 #define GCC_F_TARGET_H
37 /* Simple definitions and enumerations. */
39 #define FFETARGET_charactersizeNONE (-1)
40 #ifndef FFETARGET_charactersizeMAXIMUM
41 #define FFETARGET_charactersizeMAXIMUM 2147483647
44 #ifndef FFETARGET_defaultIS_90
45 #define FFETARGET_defaultIS_90 0
47 #ifndef FFETARGET_defaultIS_AUTOMATIC
48 #define FFETARGET_defaultIS_AUTOMATIC 1
50 #ifndef FFETARGET_defaultIS_BACKSLASH
51 #define FFETARGET_defaultIS_BACKSLASH 1
53 #ifndef FFETARGET_defaultIS_INIT_LOCAL_ZERO
54 #define FFETARGET_defaultIS_INIT_LOCAL_ZERO 0
56 #ifndef FFETARGET_defaultIS_DOLLAR_OK
57 #define FFETARGET_defaultIS_DOLLAR_OK 0
59 #ifndef FFETARGET_defaultIS_F2C
60 #define FFETARGET_defaultIS_F2C 1
62 #ifndef FFETARGET_defaultIS_F2C_LIBRARY
63 #define FFETARGET_defaultIS_F2C_LIBRARY 1
65 #ifndef FFETARGET_defaultIS_FREE_FORM
66 #define FFETARGET_defaultIS_FREE_FORM 0
68 #ifndef FFETARGET_defaultIS_PEDANTIC
69 #define FFETARGET_defaultIS_PEDANTIC 0
71 #ifndef FFETARGET_defaultCASE_INTRIN
72 #define FFETARGET_defaultCASE_INTRIN FFE_caseLOWER
74 #ifndef FFETARGET_defaultCASE_MATCH
75 #define FFETARGET_defaultCASE_MATCH FFE_caseLOWER
77 #ifndef FFETARGET_defaultCASE_SOURCE
78 #define FFETARGET_defaultCASE_SOURCE FFE_caseLOWER
80 #ifndef FFETARGET_defaultCASE_SYMBOL
81 #define FFETARGET_defaultCASE_SYMBOL FFE_caseNONE
84 #ifndef FFETARGET_defaultFIXED_LINE_LENGTH
85 #define FFETARGET_defaultFIXED_LINE_LENGTH 72
88 /* 1 if external Fortran names ("FOO" in SUBROUTINE FOO, COMMON /FOO/,
89 and even enforced/default-for-unnamed PROGRAM, blank-COMMON, and
90 BLOCK DATA names, but not names of library functions implementing
91 intrinsics or names of local/internal variables) should have an
92 underscore appended (for compatibility with existing systems). */
94 #ifndef FFETARGET_defaultEXTERNAL_UNDERSCORED
95 #define FFETARGET_defaultEXTERNAL_UNDERSCORED 1
98 /* 1 if external Fortran names with underscores already in them should
99 have an extra underscore appended (in addition to the one they
100 might already have appened if FFETARGET_defaultEXTERNAL_UNDERSCORED). */
102 #ifndef FFETARGET_defaultUNDERSCORED_EXTERNAL_UNDERSCORED
103 #define FFETARGET_defaultUNDERSCORED_EXTERNAL_UNDERSCORED 1
106 /* If FFETARGET_defaultEXTERNAL_UNDERSCORED is 0, the following definitions
107 might also need to be overridden to make g77 objects compatible with
108 f2c+gcc objects. Although I don't think the unnamed BLOCK DATA one
109 is an issue at all. Of course, on some systems it isn't f2c
110 compatibility that is the issue -- maybe compatibility with some
111 other compiler(s). I don't know what to recommend for systems where
112 there is no existing Fortran compiler -- I suppose porting f2c and
113 pretending it's the existing one is best for now. */
115 /* 1 if the "FOO" in "PROGRAM FOO" should be overridden and a particular
116 name imposed in place of it in the actual code (normally the case,
117 because the library's main entry point on most systems calls the main
118 function by a particular name). Someday g77 might do the f2c trick
119 of also outputting a "FOO" procedure that just calls the main procedure,
120 but that'll wait until somebody shows why it is needed. */
122 #ifndef FFETARGET_isENFORCED_MAIN
123 #define FFETARGET_isENFORCED_MAIN 1
126 /* The enforced name of the main program if ENFORCED_MAIN is 1. */
128 #ifndef FFETARGET_nameENFORCED_MAIN_NAME
129 #define FFETARGET_nameENFORCED_MAIN_NAME "MAIN__"
132 /* The name used for an unnamed main program if ENFORCED_MAIN is 0. */
134 #ifndef FFETARGET_nameUNNAMED_MAIN
135 #define FFETARGET_nameUNNAMED_MAIN "MAIN__"
138 /* The name used for an unnamed block data program. */
140 #ifndef FFETARGET_nameUNNAMED_BLOCK_DATA
141 #define FFETARGET_nameUNNAMED_BLOCK_DATA "_BLOCK_DATA__"
144 /* The name used for blank common. */
146 #ifndef FFETARGET_nameBLANK_COMMON
147 #define FFETARGET_nameBLANK_COMMON "_BLNK__"
150 #ifndef FFETARGET_integerSMALLEST_POSITIVE
151 #define FFETARGET_integerSMALLEST_POSITIVE 0
153 #ifndef FFETARGET_integerLARGEST_POSITIVE
154 #define FFETARGET_integerLARGEST_POSITIVE 2147483647
156 #ifndef FFETARGET_integerBIG_MAGICAL
157 #define FFETARGET_integerBIG_MAGICAL 020000000000 /* 2147483648 */
159 #ifndef FFETARGET_integerALMOST_BIG_MAGICAL
160 #define FFETARGET_integerALMOST_BIG_MAGICAL 214748364
162 #ifndef FFETARGET_integerALMOST_BIG_OVERFLOW_BINARY
163 #define FFETARGET_integerALMOST_BIG_OVERFLOW_BINARY 0x80000000
165 #ifndef FFETARGET_integerALMOST_BIG_OVERFLOW_HEX
166 #define FFETARGET_integerALMOST_BIG_OVERFLOW_HEX 0x10000000
168 #ifndef FFETARGET_integerALMOST_BIG_OVERFLOW_OCTAL
169 #define FFETARGET_integerALMOST_BIG_OVERFLOW_OCTAL 0x20000000
171 #ifndef FFETARGET_integerFINISH_BIG_MAGICAL
172 #define FFETARGET_integerFINISH_BIG_MAGICAL 8
174 #ifndef FFETARGET_integerFINISH_BIG_OVERFLOW_BINARY
175 #define FFETARGET_integerFINISH_BIG_OVERFLOW_BINARY 0
177 #ifndef FFETARGET_integerFINISH_BIG_OVERFLOW_HEX
178 #define FFETARGET_integerFINISH_BIG_OVERFLOW_HEX 0
180 #ifndef FFETARGET_integerFINISH_BIG_OVERFLOW_OCTAL
181 #define FFETARGET_integerFINISH_BIG_OVERFLOW_OCTAL 0
184 #ifndef FFETARGET_offsetNONE
185 #define FFETARGET_offsetNONE 0 /* Not used by FFE, for backend if needed. */
188 #define FFETARGET_okINTEGER1 1
189 #define FFETARGET_okINTEGER2 1
190 #define FFETARGET_okINTEGER3 1
191 #define FFETARGET_okINTEGER4 1
192 #define FFETARGET_okLOGICAL1 1
193 #define FFETARGET_okLOGICAL2 1
194 #define FFETARGET_okLOGICAL3 1
195 #define FFETARGET_okLOGICAL4 1
196 #define FFETARGET_okREAL1 1
197 #define FFETARGET_okREAL2 1
198 #define FFETARGET_okREAL3 0
199 #define FFETARGET_okREALQUAD FFETARGET_okREAL3
200 #define FFETARGET_okCOMPLEX1 1
201 #define FFETARGET_okCOMPLEX2 1
202 #define FFETARGET_okCOMPLEX3 0
203 #define FFETARGET_okCOMPLEXDOUBLE FFETARGET_okCOMPLEX2
204 #define FFETARGET_okCOMPLEXQUAD FFETARGET_okCOMPLEX3
205 #define FFETARGET_okCHARACTER1 1
207 #define FFETARGET_f2cTYUNKNOWN 0
208 #define FFETARGET_f2cTYADDR 1
209 #define FFETARGET_f2cTYSHORT 2
210 #define FFETARGET_f2cTYLONG 3
211 #define FFETARGET_f2cTYREAL 4
212 #define FFETARGET_f2cTYDREAL 5
213 #define FFETARGET_f2cTYCOMPLEX 6
214 #define FFETARGET_f2cTYDCOMPLEX 7
215 #define FFETARGET_f2cTYLOGICAL 8
216 #define FFETARGET_f2cTYCHAR 9
217 #define FFETARGET_f2cTYSUBR 10
218 #define FFETARGET_f2cTYINT1 11
219 #define FFETARGET_f2cTYLOGICAL1 12
220 #define FFETARGET_f2cTYLOGICAL2 13
221 #define FFETARGET_f2cTYQUAD 14
223 #if (!defined(__alpha__) \
224 && (!defined(__hppa__) || !defined(__LP64__)) \
225 && (!defined(__ia64__) || !defined(__LP64__)) \
226 && !defined(__MMIX__) \
227 && (!defined (_ARCH_PPC) || !defined (__64BIT__)) \
228 && !defined(__powerpc64__) \
229 && !defined(__s390x__) \
230 && (!defined(__sparc__) || (!defined(__sparcv9) && !defined(__arch64__)))\
231 && !defined(__x86_64__))
232 #define FFETARGET_32bit_longs
237 typedef unsigned char ffetargetAlign
; /* ffetargetOffset for alignment. */
238 #define ffetargetAlign_f ""
239 typedef long ffetargetCharacterSize
;
240 #define ffetargetCharacterSize_f "l"
241 typedef void (*ffetargetCopyfunc
) (void *, void *, size_t);
242 typedef ffetargetCharacterSize ffetargetHollerithSize
;
243 #define ffetargetHollerithSize_f "l"
244 typedef long long ffetargetOffset
;
245 #define ffetargetOffset_f "ll"
247 #if FFETARGET_okINTEGER1
248 #ifdef FFETARGET_32bit_longs
249 typedef long int ffetargetInteger1
;
250 #define ffetargetInteger1_f "l"
252 typedef int ffetargetInteger1
;
253 #define ffetargetInteger1_f ""
256 #if FFETARGET_okINTEGER2
257 typedef signed char ffetargetInteger2
;
258 #define ffetargetInteger2_f ""
260 #if FFETARGET_okINTEGER3
261 typedef short int ffetargetInteger3
;
262 #define ffetargetInteger3_f ""
264 #if FFETARGET_okINTEGER4
265 typedef long long int ffetargetInteger4
;
266 #define ffetargetInteger4_f "ll"
268 #if FFETARGET_okINTEGER5
269 typedef ? ffetargetInteger5
;
270 #define ffetargetInteger5_f
273 #if FFETARGET_okINTEGER6
274 typedef ? ffetargetInteger6
;
275 #define ffetargetInteger6_f
278 #if FFETARGET_okINTEGER7
279 typedef ? ffetargetInteger7
;
280 #define ffetargetInteger7_f
283 #if FFETARGET_okINTEGER8
284 typedef ? ffetargetInteger8
;
285 #define ffetargetInteger8_f
288 #if FFETARGET_okLOGICAL1
289 #ifdef FFETARGET_32bit_longs
290 typedef long int ffetargetLogical1
;
291 #define ffetargetLogical1_f "l"
293 typedef int ffetargetLogical1
;
294 #define ffetargetLogical1_f ""
297 #if FFETARGET_okLOGICAL2
298 typedef signed char ffetargetLogical2
;
299 #define ffetargetLogical2_f ""
301 #if FFETARGET_okLOGICAL3
302 typedef short int ffetargetLogical3
;
303 #define ffetargetLogical3_f ""
305 #if FFETARGET_okLOGICAL4
306 typedef long long int ffetargetLogical4
;
307 #define ffetargetLogical4_f "ll"
309 #if FFETARGET_okLOGICAL5
310 typedef ? ffetargetLogical5
;
311 #define ffetargetLogical5_f
314 #if FFETARGET_okLOGICAL6
315 typedef ? ffetargetLogical6
;
316 #define ffetargetLogical6_f
319 #if FFETARGET_okLOGICAL7
320 typedef ? ffetargetLogical7
;
321 #define ffetargetLogical7_f
324 #if FFETARGET_okLOGICAL8
325 typedef ? ffetargetLogical8
;
326 #define ffetargetLogical8_f
329 #if FFETARGET_okREAL1
330 typedef int ffetargetReal1
;
331 #define ffetargetReal1_f ""
332 #define ffetarget_cvt_r1_to_rv_(in) \
333 ({ REAL_VALUE_TYPE _rv; \
335 real_from_target (&_rv, &_in, mode_for_size (32, MODE_FLOAT, 0)); \
337 #define ffetarget_cvt_rv_to_r1_(in, out) \
339 REAL_VALUE_TO_TARGET_SINGLE ((in), _tmp); \
340 (out) = (ffetargetReal1) _tmp; })
342 #if FFETARGET_okREAL2
343 typedef struct { int v
[2]; } ffetargetReal2
;
344 #define ffetargetReal2_f ""
345 #define ffetarget_cvt_r2_to_rv_(in) \
346 ({ REAL_VALUE_TYPE _rv; long _tmp[2]; \
347 _tmp[0] = (in)[0]; _tmp[1] = (in)[1]; \
348 real_from_target (&_rv, _tmp, mode_for_size (64, MODE_FLOAT, 0)); \
350 #define ffetarget_cvt_rv_to_r2_(in, out) \
352 REAL_VALUE_TO_TARGET_DOUBLE ((in), _tmp); \
353 (out)[0] = (int)_tmp[0]; (out)[1] = (int)_tmp[1]; })
355 #if FFETARGET_okREAL3
356 typedef long ffetargetReal3
[?];
359 #if FFETARGET_okREAL4
360 typedef long ffetargetReal4
[?];
363 #if FFETARGET_okREAL5
364 typedef long ffetargetReal5
[?];
367 #if FFETARGET_okREAL6
368 typedef long ffetargetReal6
[?];
371 #if FFETARGET_okREAL7
372 typedef long ffetargetReal7
[?];
375 #if FFETARGET_okREAL8
376 typedef long ffetargetReal8
[?];
379 #if FFETARGET_okCOMPLEX1
380 struct _ffetarget_complex_1_
383 ffetargetReal1 imaginary
;
385 typedef struct _ffetarget_complex_1_ ffetargetComplex1
;
387 #if FFETARGET_okCOMPLEX2
388 struct _ffetarget_complex_2_
391 ffetargetReal2 imaginary
;
393 typedef struct _ffetarget_complex_2_ ffetargetComplex2
;
395 #if FFETARGET_okCOMPLEX3
396 struct _ffetarget_complex_3_
399 ffetargetReal3 imaginary
;
401 typedef struct _ffetarget_complex_3_ ffetargetComplex3
;
403 #if FFETARGET_okCOMPLEX4
404 struct _ffetarget_complex_4_
407 ffetargetReal4 imaginary
;
409 typedef struct _ffetarget_complex_4_ ffetargetComplex4
;
411 #if FFETARGET_okCOMPLEX5
412 struct _ffetarget_complex_5_
415 ffetargetReal5 imaginary
;
417 typedef struct _ffetarget_complex_5_ ffetargetComplex5
;
419 #if FFETARGET_okCOMPLEX6
420 struct _ffetarget_complex_6_
423 ffetargetReal6 imaginary
;
425 typedef struct _ffetarget_complex_6_ ffetargetComplex6
;
427 #if FFETARGET_okCOMPLEX7
428 struct _ffetarget_complex_7_
431 ffetargetReal7 imaginary
;
433 typedef struct _ffetarget_complex_7_ ffetargetComplex7
;
435 #if FFETARGET_okCOMPLEX8
436 struct _ffetarget_complex_8_
439 ffetargetReal8 imaginary
;
441 typedef struct _ffetarget_complex_8_ ffetargetComplex8
;
443 #if FFETARGET_okCHARACTER1
444 struct _ffetarget_char_1_
446 ffetargetCharacterSize length
;
449 typedef struct _ffetarget_char_1_ ffetargetCharacter1
;
450 typedef unsigned char ffetargetCharacterUnit1
;
452 #if FFETARGET_okCHARACTER2
453 typedef ? ffetargetCharacter2
;
454 typedef ? ffetargetCharacterUnit2
;
456 #if FFETARGET_okCHARACTER3
457 typedef ? ffetargetCharacter3
;
458 typedef ? ffetargetCharacterUnit3
;
460 #if FFETARGET_okCHARACTER4
461 typedef ? ffetargetCharacter4
;
462 typedef ? ffetargetCharacterUnit4
;
464 #if FFETARGET_okCHARACTER5
465 typedef ? ffetargetCharacter5
;
466 typedef ? ffetargetCharacterUnit5
;
468 #if FFETARGET_okCHARACTER6
469 typedef ? ffetargetCharacter6
;
470 typedef ? ffetargetCharacterUnit6
;
472 #if FFETARGET_okCHARACTER7
473 typedef ? ffetargetCharacter7
;
474 typedef ? ffetargetCharacterUnit7
;
476 #if FFETARGET_okCHARACTER8
477 typedef ? ffetargetCharacter8
;
478 typedef ? ffetargetCharacterUnit8
;
481 typedef unsigned long long int ffetargetTypeless
;
483 struct _ffetarget_hollerith_
485 ffetargetHollerithSize length
;
488 typedef struct _ffetarget_hollerith_ ffetargetHollerith
;
490 typedef ffetargetCharacter1 ffetargetCharacterDefault
;
491 typedef ffetargetComplex1 ffetargetComplexDefault
;
492 #if FFETARGET_okCOMPLEXDOUBLE
493 typedef ffetargetComplex2 ffetargetComplexDouble
;
495 #if FFETARGET_okCOMPLEXQUAD
496 typedef ffetargetComplex3 ffetargetComplexQuad
;
498 typedef ffetargetInteger1 ffetargetIntegerDefault
;
499 #define ffetargetIntegerDefault_f ffetargetInteger1_f
500 typedef ffetargetLogical1 ffetargetLogicalDefault
;
501 #define ffetargetLogicalDefault_f ffetargetLogical1_f
502 typedef ffetargetReal1 ffetargetRealDefault
;
503 #define ffetargetRealDefault_f ffetargetReal1_f
504 typedef ffetargetReal2 ffetargetRealDouble
;
505 #define ffetargetRealDouble_f ffetargetReal2_f
506 #if FFETARGET_okREALQUAD
507 typedef ffetargetReal3 ffetargetRealQuad
;
508 #define ffetargetRealQuad_f ffetargetReal3_f
511 /* Include files needed by this one. */
518 /* Structure definitions. */
521 /* Global objects accessed by users of this module. */
523 extern char ffetarget_string_
[40]; /* Temp for ascii-to-double (atof). */
524 extern HOST_WIDE_INT ffetarget_long_val_
;
525 extern HOST_WIDE_INT ffetarget_long_junk_
;
527 /* Declare functions with prototypes. */
529 void ffetarget_aggregate_info (ffeinfoBasictype
*ebt
, ffeinfoKindtype
*ekt
,
530 ffetargetAlign
*units
, ffeinfoBasictype abt
,
531 ffeinfoKindtype akt
);
532 ffetargetAlign
ffetarget_align (ffetargetAlign
*updated_alignment
,
533 ffetargetAlign
*updated_modulo
,
534 ffetargetOffset offset
,
535 ffetargetAlign alignment
,
536 ffetargetAlign modulo
);
537 #if FFETARGET_okCHARACTER1
538 bool ffetarget_character1 (ffetargetCharacter1
*val
, ffelexToken character
,
540 int ffetarget_cmp_character1 (ffetargetCharacter1 l
, ffetargetCharacter1 r
);
541 ffebad
ffetarget_concatenate_character1 (ffetargetCharacter1
*res
,
542 ffetargetCharacter1 l
,
543 ffetargetCharacter1 r
,
545 ffetargetCharacterSize
*len
);
546 ffebad
ffetarget_convert_character1_character1 (ffetargetCharacter1
*res
,
547 ffetargetCharacterSize res_size
,
548 ffetargetCharacter1 l
,
550 ffebad
ffetarget_convert_character1_hollerith (ffetargetCharacter1
*res
,
551 ffetargetCharacterSize res_size
,
552 ffetargetHollerith l
,
554 ffebad
ffetarget_convert_character1_integer4 (ffetargetCharacter1
*res
,
555 ffetargetCharacterSize res_size
,
558 ffebad
ffetarget_convert_character1_logical4 (ffetargetCharacter1
*res
,
559 ffetargetCharacterSize res_size
,
562 ffebad
ffetarget_convert_character1_typeless (ffetargetCharacter1
*res
,
563 ffetargetCharacterSize res_size
,
566 ffebad
ffetarget_eq_character1 (bool *res
, ffetargetCharacter1 l
,
567 ffetargetCharacter1 r
);
568 ffebad
ffetarget_le_character1 (bool *res
, ffetargetCharacter1 l
,
569 ffetargetCharacter1 r
);
570 ffebad
ffetarget_ge_character1 (bool *res
, ffetargetCharacter1 l
,
571 ffetargetCharacter1 r
);
572 ffebad
ffetarget_gt_character1 (bool *res
, ffetargetCharacter1 l
,
573 ffetargetCharacter1 r
);
574 ffebad
ffetarget_lt_character1 (bool *res
, ffetargetCharacter1 l
,
575 ffetargetCharacter1 r
);
576 ffebad
ffetarget_ne_character1 (bool *res
, ffetargetCharacter1 l
,
577 ffetargetCharacter1 r
);
578 ffebad
ffetarget_substr_character1 (ffetargetCharacter1
*res
,
579 ffetargetCharacter1 l
,
580 ffetargetCharacterSize first
,
581 ffetargetCharacterSize last
,
583 ffetargetCharacterSize
*len
);
585 int ffetarget_cmp_hollerith (ffetargetHollerith l
, ffetargetHollerith r
);
586 bool ffetarget_hollerith (ffetargetHollerith
*val
, ffelexToken hollerith
,
588 int ffetarget_cmp_typeless (ffetargetTypeless l
, ffetargetTypeless r
);
589 ffebad
ffetarget_convert_any_character1_ (char *res
, size_t size
,
590 ffetargetCharacter1 l
);
591 ffebad
ffetarget_convert_any_hollerith_ (char *res
, size_t size
,
592 ffetargetHollerith l
);
593 ffebad
ffetarget_convert_any_typeless_ (char *res
, size_t size
,
594 ffetargetTypeless l
);
595 #if FFETARGET_okCOMPLEX1
596 ffebad
ffetarget_divide_complex1 (ffetargetComplex1
*res
, ffetargetComplex1 l
,
597 ffetargetComplex1 r
);
599 #if FFETARGET_okCOMPLEX2
600 ffebad
ffetarget_divide_complex2 (ffetargetComplex2
*res
, ffetargetComplex2 l
,
601 ffetargetComplex2 r
);
603 #if FFETARGET_okCOMPLEX3
604 ffebad
ffetarget_divide_complex3 (ffetargetComplex3
*res
, ffetargetComplex3 l
,
605 ffetargetComplex3 r
);
607 #if FFETARGET_okCOMPLEX4
608 ffebad
ffetarget_divide_complex4 (ffetargetComplex4
*res
, ffetargetComplex4 l
,
609 ffetargetComplex4 r
);
611 #if FFETARGET_okCOMPLEX5
612 ffebad
ffetarget_divide_complex5 (ffetargetComplex5
*res
, ffetargetComplex5 l
,
613 ffetargetComplex5 r
);
615 #if FFETARGET_okCOMPLEX6
616 ffebad
ffetarget_divide_complex6 (ffetargetComplex6
*res
, ffetargetComplex6 l
,
617 ffetargetComplex6 r
);
619 #if FFETARGET_okCOMPLEX7
620 ffebad
ffetarget_divide_complex7 (ffetargetComplex7
*res
, ffetargetComplex7 l
,
621 ffetargetComplex7 r
);
623 #if FFETARGET_okCOMPLEX8
624 ffebad
ffetarget_divide_complex8 (ffetargetComplex8
*res
, ffetargetComplex8 l
,
625 ffetargetComplex8 r
);
627 #if FFETARGET_okINTEGER1
628 bool ffetarget_integer1 (ffetargetInteger1
*val
, ffelexToken integer
);
630 #if FFETARGET_okINTEGER2
631 bool ffetarget_integer2 (ffetargetInteger2
*val
, ffelexToken integer
);
633 #if FFETARGET_okINTEGER3
634 bool ffetarget_integer3 (ffetargetInteger3
*val
, ffelexToken integer
);
636 #if FFETARGET_okINTEGER4
637 bool ffetarget_integer4 (ffetargetInteger4
*val
, ffelexToken integer
);
639 #if FFETARGET_okINTEGER5
640 bool ffetarget_integer5 (ffetargetInteger5
*val
, ffelexToken integer
);
642 #if FFETARGET_okINTEGER6
643 bool ffetarget_integer6 (ffetargetInteger6
*val
, ffelexToken integer
);
645 #if FFETARGET_okINTEGER7
646 bool ffetarget_integer7 (ffetargetInteger7
*val
, ffelexToken integer
);
648 #if FFETARGET_okINTEGER8
649 bool ffetarget_integer8 (ffetargetInteger8
*val
, ffelexToken integer
);
651 bool ffetarget_integerbinary (ffetargetIntegerDefault
*val
,
652 ffelexToken integer
);
653 bool ffetarget_integerhex (ffetargetIntegerDefault
*val
,
654 ffelexToken integer
);
655 bool ffetarget_integeroctal (ffetargetIntegerDefault
*val
,
656 ffelexToken integer
);
657 void ffetarget_integer_bad_magical (ffelexToken t
);
658 void ffetarget_integer_bad_magical_binary (ffelexToken integer
, ffelexToken minus
);
659 void ffetarget_integer_bad_magical_precedence (ffelexToken integer
,
661 ffelexToken higher_op
);
662 void ffetarget_integer_bad_magical_precedence_binary (ffelexToken integer
,
664 ffelexToken higher_op
);
665 #if FFETARGET_okCHARACTER1
666 bool ffetarget_iszero_character1 (ffetargetCharacter1 constant
);
668 bool ffetarget_iszero_hollerith (ffetargetHollerith constant
);
669 void ffetarget_layout (const char *error_text
, ffetargetAlign
*alignment
,
670 ffetargetAlign
*modulo
, ffetargetOffset
*size
,
671 ffeinfoBasictype bt
, ffeinfoKindtype kt
,
672 ffetargetCharacterSize charsize
,
673 ffetargetIntegerDefault num_elements
);
674 #if FFETARGET_okCOMPLEX1
675 ffebad
ffetarget_multiply_complex1 (ffetargetComplex1
*res
,
677 ffetargetComplex1 r
);
679 #if FFETARGET_okCOMPLEX2
680 ffebad
ffetarget_multiply_complex2 (ffetargetComplex2
*res
,
682 ffetargetComplex2 r
);
684 #if FFETARGET_okCOMPLEX3
685 ffebad
ffetarget_multiply_complex3 (ffetargetComplex3
*res
,
687 ffetargetComplex3 r
);
689 #if FFETARGET_okCOMPLEX4
690 ffebad
ffetarget_multiply_complex4 (ffetargetComplex4
*res
,
692 ffetargetComplex4 r
);
694 #if FFETARGET_okCOMPLEX5
695 ffebad
ffetarget_multiply_complex5 (ffetargetComplex5
*res
,
697 ffetargetComplex5 r
);
699 #if FFETARGET_okCOMPLEX6
700 ffebad
ffetarget_multiply_complex6 (ffetargetComplex6
*res
,
702 ffetargetComplex6 r
);
704 #if FFETARGET_okCOMPLEX7
705 ffebad
ffetarget_multiply_complex7 (ffetargetComplex7
*res
,
707 ffetargetComplex7 r
);
709 #if FFETARGET_okCOMPLEX8
710 ffebad
ffetarget_multiply_complex8 (ffetargetComplex8
*res
,
712 ffetargetComplex8 r
);
714 ffebad
ffetarget_power_complexdefault_integerdefault (ffetargetComplexDefault
*res
,
715 ffetargetComplexDefault l
,
716 ffetargetIntegerDefault r
);
717 #if FFETARGET_okCOMPLEXDOUBLE
718 ffebad
ffetarget_power_complexdouble_integerdefault (ffetargetComplexDouble
*res
,
719 ffetargetComplexDouble l
,
720 ffetargetIntegerDefault r
);
722 ffebad
ffetarget_power_integerdefault_integerdefault (ffetargetIntegerDefault
*res
,
723 ffetargetIntegerDefault l
,
724 ffetargetIntegerDefault r
);
725 ffebad
ffetarget_power_realdefault_integerdefault (ffetargetRealDefault
*res
,
726 ffetargetRealDefault l
,
727 ffetargetIntegerDefault r
);
728 ffebad
ffetarget_power_realdouble_integerdefault (ffetargetRealDouble
*res
,
729 ffetargetRealDouble l
,
730 ffetargetIntegerDefault r
);
731 void ffetarget_print_binary (FILE *f
, ffetargetTypeless val
);
732 void ffetarget_print_character1 (FILE *f
, ffetargetCharacter1 val
);
733 void ffetarget_print_hollerith (FILE *f
, ffetargetHollerith val
);
734 void ffetarget_print_octal (FILE *f
, ffetargetTypeless val
);
735 void ffetarget_print_hex (FILE *f
, ffetargetTypeless val
);
736 #if FFETARGET_okREAL1
737 bool ffetarget_real1 (ffetargetReal1
*value
, ffelexToken integer
,
738 ffelexToken decimal
, ffelexToken fraction
,
739 ffelexToken exponent
, ffelexToken exponent_sign
,
740 ffelexToken exponent_digits
);
742 #if FFETARGET_okREAL2
743 bool ffetarget_real2 (ffetargetReal2
*value
, ffelexToken integer
,
744 ffelexToken decimal
, ffelexToken fraction
,
745 ffelexToken exponent
, ffelexToken exponent_sign
,
746 ffelexToken exponent_digits
);
748 #if FFETARGET_okREAL3
749 bool ffetarget_real3 (ffetargetReal3
*value
, ffelexToken integer
,
750 ffelexToken decimal
, ffelexToken fraction
,
751 ffelexToken exponent
, ffelexToken exponent_sign
,
752 ffelexToken exponent_digits
);
754 #if FFETARGET_okREAL4
755 bool ffetarget_real4 (ffetargetReal4
*value
, ffelexToken integer
,
756 ffelexToken decimal
, ffelexToken fraction
,
757 ffelexToken exponent
, ffelexToken exponent_sign
,
758 ffelexToken exponent_digits
);
760 #if FFETARGET_okREAL5
761 bool ffetarget_real5 (ffetargetReal5
*value
, ffelexToken integer
,
762 ffelexToken decimal
, ffelexToken fraction
,
763 ffelexToken exponent
, ffelexToken exponent_sign
,
764 ffelexToken exponent_digits
);
766 #if FFETARGET_okREAL6
767 bool ffetarget_real6 (ffetargetReal6
*value
, ffelexToken integer
,
768 ffelexToken decimal
, ffelexToken fraction
,
769 ffelexToken exponent
, ffelexToken exponent_sign
,
770 ffelexToken exponent_digits
);
772 #if FFETARGET_okREAL7
773 bool ffetarget_real7 (ffetargetReal7
*value
, ffelexToken integer
,
774 ffelexToken decimal
, ffelexToken fraction
,
775 ffelexToken exponent
, ffelexToken exponent_sign
,
776 ffelexToken exponent_digits
);
778 #if FFETARGET_okREAL8
779 bool ffetarget_real8 (ffetargetReal8
*value
, ffelexToken integer
,
780 ffelexToken decimal
, ffelexToken fraction
,
781 ffelexToken exponent
, ffelexToken exponent_sign
,
782 ffelexToken exponent_digits
);
784 bool ffetarget_typeless_binary (ffetargetTypeless
*value
, ffelexToken token
);
785 bool ffetarget_typeless_octal (ffetargetTypeless
*value
, ffelexToken token
);
786 bool ffetarget_typeless_hex (ffetargetTypeless
*value
, ffelexToken token
);
787 void ffetarget_verify_character1 (mallocPool pool
, ffetargetCharacter1 val
);
788 int ffetarget_num_digits_ (ffelexToken t
);
789 void *ffetarget_memcpy_ (void *dst
, void *src
, size_t len
);
793 #define FFETARGET_REAL_VALUE_FROM_INT_(resr, lf, kt) \
794 REAL_VALUE_FROM_INT (resr, (HOST_WIDE_INT) lf, \
795 (HOST_WIDE_INT) ((lf < 0) ? -1 : 0), \
796 ((kt == 1) ? SFmode : DFmode))
798 #if HOST_BITS_PER_LONGLONG > HOST_BITS_PER_WIDE_INT
799 #define FFETARGET_REAL_VALUE_FROM_LONGLONG_(resr, lf, kt) \
800 REAL_VALUE_FROM_INT (resr, (HOST_WIDE_INT) lf, \
801 (HOST_WIDE_INT) (lf >> HOST_BITS_PER_WIDE_INT), \
802 ((kt == 1) ? SFmode : DFmode))
803 #define FFETARGET_LONGLONG_FROM_INTS_(hi, lo) \
804 (((long long int) hi << HOST_BITS_PER_WIDE_INT) \
805 | (long long int) ((unsigned HOST_WIDE_INT) lo))
807 #define FFETARGET_REAL_VALUE_FROM_LONGLONG_(resr, lf, kt) \
808 FFETARGET_REAL_VALUE_FROM_INT_ (resr, lf, kt)
809 #define FFETARGET_LONGLONG_FROM_INTS_(hi, lo) lo
812 #define ffetarget_add_complex1(res,l,r) \
813 ({ REAL_VALUE_TYPE lr, li, rr, ri, resr, resi; \
814 lr = ffetarget_cvt_r1_to_rv_ ((l).real); \
815 li = ffetarget_cvt_r1_to_rv_ ((l).imaginary); \
816 rr = ffetarget_cvt_r1_to_rv_ ((r).real); \
817 ri = ffetarget_cvt_r1_to_rv_ ((r).imaginary); \
818 REAL_ARITHMETIC (resr, PLUS_EXPR, lr, rr); \
819 REAL_ARITHMETIC (resi, PLUS_EXPR, li, ri); \
820 ffetarget_cvt_rv_to_r1_ (resr, (res)->real); \
821 ffetarget_cvt_rv_to_r1_ (resi, (res)->imaginary); \
823 #define ffetarget_add_complex2(res,l,r) \
824 ({ REAL_VALUE_TYPE lr, li, rr, ri, resr, resi; \
825 lr = ffetarget_cvt_r2_to_rv_ (&((l).real.v[0])); \
826 li = ffetarget_cvt_r2_to_rv_ (&((l).imaginary.v[0])); \
827 rr = ffetarget_cvt_r2_to_rv_ (&((r).real.v[0])); \
828 ri = ffetarget_cvt_r2_to_rv_ (&((r).imaginary.v[0])); \
829 REAL_ARITHMETIC (resr, PLUS_EXPR, lr, rr); \
830 REAL_ARITHMETIC (resi, PLUS_EXPR, li, ri); \
831 ffetarget_cvt_rv_to_r2_ (resr, &((res)->real.v[0])); \
832 ffetarget_cvt_rv_to_r2_ (resi, &((res)->imaginary.v[0])); \
834 #define ffetarget_add_integer1(res,l,r) (*(res) = (l) + (r), FFEBAD)
835 #define ffetarget_add_integer2(res,l,r) (*(res) = (l) + (r), FFEBAD)
836 #define ffetarget_add_integer3(res,l,r) (*(res) = (l) + (r), FFEBAD)
837 #define ffetarget_add_integer4(res,l,r) (*(res) = (l) + (r), FFEBAD)
838 #define ffetarget_add_real1(res,l,r) \
839 ({ REAL_VALUE_TYPE lr, rr, resr; \
840 lr = ffetarget_cvt_r1_to_rv_ ((l)); \
841 rr = ffetarget_cvt_r1_to_rv_ ((r)); \
842 REAL_ARITHMETIC (resr, PLUS_EXPR, lr, rr); \
843 ffetarget_cvt_rv_to_r1_ (resr, *(res)); \
845 #define ffetarget_add_real2(res,l,r) \
846 ({ REAL_VALUE_TYPE lr, rr, resr; \
847 lr = ffetarget_cvt_r2_to_rv_ (&((l).v[0])); \
848 rr = ffetarget_cvt_r2_to_rv_ (&((r).v[0])); \
849 REAL_ARITHMETIC (resr, PLUS_EXPR, lr, rr); \
850 ffetarget_cvt_rv_to_r2_ (resr, &((res)->v[0])); \
852 #define ffetarget_aggregate_ptr_memcpy(dbt,dkt,sbt,skt) \
853 ((ffetargetCopyfunc) ffetarget_memcpy_)
854 #define ffetarget_and_integer1(res,l,r) (*(res) = (l) & (r), FFEBAD)
855 #define ffetarget_and_integer2(res,l,r) (*(res) = (l) & (r), FFEBAD)
856 #define ffetarget_and_integer3(res,l,r) (*(res) = (l) & (r), FFEBAD)
857 #define ffetarget_and_integer4(res,l,r) (*(res) = (l) & (r), FFEBAD)
858 #define ffetarget_and_logical1(res,l,r) (*(res) = (l) && (r), FFEBAD)
859 #define ffetarget_and_logical2(res,l,r) (*(res) = (l) && (r), FFEBAD)
860 #define ffetarget_and_logical3(res,l,r) (*(res) = (l) && (r), FFEBAD)
861 #define ffetarget_and_logical4(res,l,r) (*(res) = (l) && (r), FFEBAD)
862 #define ffetarget_binarymil(v,t) ffetarget_typeless_binary (v, t)
863 #define ffetarget_binaryvxt(v,t) ffetarget_typeless_binary (v, t)
864 #define ffetarget_cmp_integer1(l,r) ((l) == (r) ? 0 : ((l) < (r) ? -1 : 1))
865 #define ffetarget_cmp_integer2(l,r) ((l) == (r) ? 0 : ((l) < (r) ? -1 : 1))
866 #define ffetarget_cmp_integer3(l,r) ((l) == (r) ? 0 : ((l) < (r) ? -1 : 1))
867 #define ffetarget_cmp_integer4(l,r) ((l) == (r) ? 0 : ((l) < (r) ? -1 : 1))
868 #define ffetarget_cmp_logical1(l,r) ((l) == (r) ? 0 : ((l) < (r) ? -1 : 1))
869 #define ffetarget_cmp_logical2(l,r) ((l) == (r) ? 0 : ((l) < (r) ? -1 : 1))
870 #define ffetarget_cmp_logical3(l,r) ((l) == (r) ? 0 : ((l) < (r) ? -1 : 1))
871 #define ffetarget_cmp_logical4(l,r) ((l) == (r) ? 0 : ((l) < (r) ? -1 : 1))
872 #define ffetarget_cmp_real1(l,r) memcmp (&(l), &(r), sizeof(l))
873 #define ffetarget_cmp_real2(l,r) memcmp (&(l), &(r), sizeof(l))
874 #define ffetarget_cmp_real3(l,r) memcmp (&(l), &(r), sizeof(l))
875 #define ffetarget_cmp_typeless(l,r) \
876 memcmp (&(l), &(r), sizeof ((l)))
877 #define ffetarget_convert_character1_integer1(res,res_size,l,pool) \
878 ffetarget_convert_character1_integer4(res,res_size,(ffetargetInteger4)l,pool)
879 #define ffetarget_convert_character1_integer2(res,res_size,l,pool) \
880 ffetarget_convert_character1_integer4(res,res_size,(ffetargetInteger4)l,pool)
881 #define ffetarget_convert_character1_integer3(res,res_size,l,pool) \
882 ffetarget_convert_character1_integer4(res,res_size,(ffetargetInteger4)l,pool)
883 #define ffetarget_convert_character1_logical1(res,res_size,l,pool) \
884 ffetarget_convert_character1_logical4(res,res_size,(ffetargetLogical4)l,pool)
885 #define ffetarget_convert_character1_logical2(res,res_size,l,pool) \
886 ffetarget_convert_character1_logical4(res,res_size,(ffetargetLogical4)l,pool)
887 #define ffetarget_convert_character1_logical3(res,res_size,l,pool) \
888 ffetarget_convert_character1_logical4(res,res_size,(ffetargetLogical4)l,pool)
889 #define ffetarget_convert_complex1_character1(res,l) \
890 ffetarget_convert_any_character1_ ((char *) (res), sizeof(*(res)), l)
891 #define ffetarget_convert_complex1_hollerith(res,l) \
892 ffetarget_convert_any_hollerith_ ((char *) (res), sizeof(*(res)), l)
893 #define ffetarget_convert_complex1_typeless(res,l) \
894 ffetarget_convert_any_typeless_ ((char *) (res), sizeof(*(res)), l)
895 #define ffetarget_convert_complex1_complex2(res,l) \
896 ({ REAL_VALUE_TYPE lr, li; \
897 lr = ffetarget_cvt_r2_to_rv_ (&((l).real.v[0])); \
898 li = ffetarget_cvt_r2_to_rv_ (&((l).imaginary.v[0])); \
899 ffetarget_cvt_rv_to_r1_ (lr, (res)->real); \
900 ffetarget_cvt_rv_to_r1_ (li, (res)->imaginary), \
902 #define ffetarget_convert_complex1_integer(res,l) \
903 ({ REAL_VALUE_TYPE resi, resr; \
904 ffetargetInteger1 lf = (l); \
905 FFETARGET_REAL_VALUE_FROM_INT_ (resr, lf, 1); \
907 ffetarget_cvt_rv_to_r1_ (resr, (res)->real); \
908 ffetarget_cvt_rv_to_r1_ (resi, (res)->imaginary); \
910 #define ffetarget_convert_complex1_integer1 ffetarget_convert_complex1_integer
911 #define ffetarget_convert_complex1_integer2 ffetarget_convert_complex1_integer
912 #define ffetarget_convert_complex1_integer3 ffetarget_convert_complex1_integer
913 #define ffetarget_convert_complex1_integer4(res,l) \
914 ({ REAL_VALUE_TYPE resi, resr; \
915 ffetargetInteger4 lf = (l); \
916 FFETARGET_REAL_VALUE_FROM_LONGLONG_ (resr, lf, 1); \
918 ffetarget_cvt_rv_to_r1_ (resr, (res)->real); \
919 ffetarget_cvt_rv_to_r1_ (resi, (res)->imaginary); \
921 #define ffetarget_convert_complex1_real1(res,l) \
922 ((res)->real = (l), \
923 ffetarget_cvt_rv_to_r1_ (dconst0, (res)->imaginary), \
925 #define ffetarget_convert_complex1_real2(res,l) \
926 ({ REAL_VALUE_TYPE lr; \
927 lr = ffetarget_cvt_r2_to_rv_ (&((l).v[0])); \
928 ffetarget_cvt_rv_to_r1_ (lr, (res)->real); \
929 ffetarget_cvt_rv_to_r1_ (dconst0, (res)->imaginary), \
931 #define ffetarget_convert_complex2_character1(res,l) \
932 ffetarget_convert_any_character1_ ((char *) (res), sizeof(*(res)), l)
933 #define ffetarget_convert_complex2_hollerith(res,l) \
934 ffetarget_convert_any_hollerith_ ((char *) (res), sizeof(*(res)), l)
935 #define ffetarget_convert_complex2_typeless(res,l) \
936 ffetarget_convert_any_typeless_ ((char *) (res), sizeof(*(res)), l)
937 #define ffetarget_convert_complex2_complex1(res,l) \
938 ({ REAL_VALUE_TYPE lr, li; \
939 lr = ffetarget_cvt_r1_to_rv_ ((l).real); \
940 li = ffetarget_cvt_r1_to_rv_ ((l).imaginary); \
941 ffetarget_cvt_rv_to_r2_ (lr, &((res)->real.v[0])); \
942 ffetarget_cvt_rv_to_r2_ (li, &((res)->imaginary.v[0])), \
944 #define ffetarget_convert_complex2_integer(res,l) \
945 ({ REAL_VALUE_TYPE resi, resr; \
946 ffetargetInteger1 lf = (l); \
947 FFETARGET_REAL_VALUE_FROM_INT_ (resr, lf, 2); \
949 ffetarget_cvt_rv_to_r2_ (resr, &((res)->real.v[0])); \
950 ffetarget_cvt_rv_to_r2_ (resi, &((res)->imaginary.v[0])); \
952 #define ffetarget_convert_complex2_integer1 ffetarget_convert_complex2_integer
953 #define ffetarget_convert_complex2_integer2 ffetarget_convert_complex2_integer
954 #define ffetarget_convert_complex2_integer3 ffetarget_convert_complex2_integer
955 #define ffetarget_convert_complex2_integer4(res,l) \
956 ({ REAL_VALUE_TYPE resi, resr; \
957 ffetargetInteger4 lf = (l); \
958 FFETARGET_REAL_VALUE_FROM_LONGLONG_ (resr, lf, 2); \
960 ffetarget_cvt_rv_to_r2_ (resr, &((res)->real.v[0])); \
961 ffetarget_cvt_rv_to_r2_ (resi, &((res)->imaginary.v[0])); \
963 #define ffetarget_convert_complex2_real1(res,l) \
964 ({ REAL_VALUE_TYPE lr; \
965 lr = ffetarget_cvt_r1_to_rv_ (l); \
966 ffetarget_cvt_rv_to_r2_ (lr, &((res)->real.v[0])); \
967 ffetarget_cvt_rv_to_r2_ (dconst0, &((res)->imaginary.v[0])), \
969 #define ffetarget_convert_complex2_real2(res,l) \
970 ((res)->real = (l), \
971 ffetarget_cvt_rv_to_r2_ (dconst0, &((res)->imaginary.v[0])), \
973 #define ffetarget_convert_integer2_character1(res,l) \
974 ffetarget_convert_integer1_character1(res,l)
975 #define ffetarget_convert_integer2_complex1(res,l) \
976 ffetarget_convert_integer1_complex1(res,l)
977 #define ffetarget_convert_integer2_complex2(res,l) \
978 ffetarget_convert_integer1_complex2(res,l)
979 #define ffetarget_convert_integer2_hollerith(res,l) \
980 ffetarget_convert_integer1_hollerith(res,l)
981 #define ffetarget_convert_integer2_integer1(res,l) (*(res) = (l), FFEBAD)
982 #define ffetarget_convert_integer2_integer3(res,l) (*(res) = (l), FFEBAD)
983 #define ffetarget_convert_integer2_integer4(res,l) (*(res) = (l), FFEBAD)
984 #define ffetarget_convert_integer2_logical1(res,l) \
985 ffetarget_convert_integer1_logical1(res,l)
986 #define ffetarget_convert_integer2_logical2(res,l) \
987 ffetarget_convert_integer2_logical1(res,l)
988 #define ffetarget_convert_integer2_logical3(res,l) \
989 ffetarget_convert_integer2_logical1(res,l)
990 #define ffetarget_convert_integer2_logical4(res,l) \
991 ffetarget_convert_integer2_logical1(res,l)
992 #define ffetarget_convert_integer2_real1(res,l) \
993 ffetarget_convert_integer1_real1(res,l)
994 #define ffetarget_convert_integer2_real2(res,l) \
995 ffetarget_convert_integer1_real2(res,l)
996 #define ffetarget_convert_integer2_typeless(res,l) \
997 ffetarget_convert_integer1_typeless(res,l)
998 #define ffetarget_convert_integer3_character1(res,l) \
999 ffetarget_convert_integer1_character1(res,l)
1000 #define ffetarget_convert_integer3_complex1(res,l) \
1001 ffetarget_convert_integer1_complex1(res,l)
1002 #define ffetarget_convert_integer3_complex2(res,l) \
1003 ffetarget_convert_integer1_complex2(res,l)
1004 #define ffetarget_convert_integer3_hollerith(res,l) \
1005 ffetarget_convert_integer1_hollerith(res,l)
1006 #define ffetarget_convert_integer3_integer1(res,l) (*(res) = (l), FFEBAD)
1007 #define ffetarget_convert_integer3_integer2(res,l) (*(res) = (l), FFEBAD)
1008 #define ffetarget_convert_integer3_integer4(res,l) (*(res) = (l), FFEBAD)
1009 #define ffetarget_convert_integer3_logical1(res,l) \
1010 ffetarget_convert_integer1_logical1(res,l)
1011 #define ffetarget_convert_integer3_logical2(res,l) \
1012 ffetarget_convert_integer3_logical1(res,l)
1013 #define ffetarget_convert_integer3_logical3(res,l) \
1014 ffetarget_convert_integer3_logical1(res,l)
1015 #define ffetarget_convert_integer3_logical4(res,l) \
1016 ffetarget_convert_integer3_logical1(res,l)
1017 #define ffetarget_convert_integer3_real1(res,l) \
1018 ffetarget_convert_integer1_real1(res,l)
1019 #define ffetarget_convert_integer3_real2(res,l) \
1020 ffetarget_convert_integer1_real2(res,l)
1021 #define ffetarget_convert_integer3_typeless(res,l) \
1022 ffetarget_convert_integer1_typeless(res,l)
1023 #define ffetarget_convert_integer4_character1(res,l) \
1024 ffetarget_convert_integer1_character1(res,l)
1025 #define ffetarget_convert_integer4_complex1(res,l) \
1026 ({ REAL_VALUE_TYPE lr; \
1027 lr = ffetarget_cvt_r1_to_rv_ ((l).real); \
1028 REAL_VALUE_TO_INT (&ffetarget_long_val_, &ffetarget_long_junk_, lr); \
1029 *(res) = FFETARGET_LONGLONG_FROM_INTS_ (ffetarget_long_junk_, \
1030 ffetarget_long_val_); \
1032 #define ffetarget_convert_integer4_complex2(res,l) \
1033 ({ REAL_VALUE_TYPE lr; \
1034 lr = ffetarget_cvt_r2_to_rv_ (&((l).real.v[0])); \
1035 REAL_VALUE_TO_INT (&ffetarget_long_val_, &ffetarget_long_junk_, lr); \
1036 *(res) = FFETARGET_LONGLONG_FROM_INTS_ (ffetarget_long_junk_, \
1037 ffetarget_long_val_); \
1039 #define ffetarget_convert_integer4_hollerith(res,l) \
1040 ffetarget_convert_integer1_hollerith(res,l)
1041 #define ffetarget_convert_integer4_integer1(res,l) (*(res) = (l), FFEBAD)
1042 #define ffetarget_convert_integer4_integer2(res,l) (*(res) = (l), FFEBAD)
1043 #define ffetarget_convert_integer4_integer3(res,l) (*(res) = (l), FFEBAD)
1044 #define ffetarget_convert_integer4_logical1(res,l) \
1045 ffetarget_convert_integer1_logical1(res,l)
1046 #define ffetarget_convert_integer4_logical2(res,l) \
1047 ffetarget_convert_integer1_logical1(res,l)
1048 #define ffetarget_convert_integer4_logical3(res,l) \
1049 ffetarget_convert_integer1_logical1(res,l)
1050 #define ffetarget_convert_integer4_logical4(res,l) \
1051 ffetarget_convert_integer1_logical1(res,l)
1052 #define ffetarget_convert_integer4_real1(res,l) \
1053 ({ REAL_VALUE_TYPE lr; \
1054 lr = ffetarget_cvt_r1_to_rv_ (l); \
1055 REAL_VALUE_TO_INT (&ffetarget_long_val_, &ffetarget_long_junk_, lr); \
1056 *(res) = FFETARGET_LONGLONG_FROM_INTS_ (ffetarget_long_junk_, \
1057 ffetarget_long_val_); \
1059 #define ffetarget_convert_integer4_real2(res,l) \
1060 ({ REAL_VALUE_TYPE lr; \
1061 lr = ffetarget_cvt_r2_to_rv_ (&((l).v[0])); \
1062 REAL_VALUE_TO_INT (&ffetarget_long_val_, &ffetarget_long_junk_, lr); \
1063 *(res) = FFETARGET_LONGLONG_FROM_INTS_ (ffetarget_long_junk_, \
1064 ffetarget_long_val_); \
1066 #define ffetarget_convert_integer4_typeless(res,l) \
1067 ffetarget_convert_integer1_typeless(res,l)
1068 #define ffetarget_convert_logical1_character1(res,l) \
1069 ffetarget_convert_any_character1_ ((char *) (res), sizeof(*(res)), l)
1070 #define ffetarget_convert_logical1_hollerith(res,l) \
1071 ffetarget_convert_any_hollerith_ ((char *) (res), sizeof(*(res)), l)
1072 #define ffetarget_convert_logical1_typeless(res,l) \
1073 ffetarget_convert_any_typeless_ ((char *) (res), sizeof(*(res)), l)
1074 #define ffetarget_convert_logical1_logical2(res,l) (*(res) = (l), FFEBAD)
1075 #define ffetarget_convert_logical1_logical3(res,l) (*(res) = (l), FFEBAD)
1076 #define ffetarget_convert_logical1_logical4(res,l) (*(res) = (l), FFEBAD)
1077 #define ffetarget_convert_logical1_integer1(res,l) (*(res) = (l), FFEBAD)
1078 #define ffetarget_convert_logical1_integer2(res,l) (*(res) = (l), FFEBAD)
1079 #define ffetarget_convert_logical1_integer3(res,l) (*(res) = (l), FFEBAD)
1080 #define ffetarget_convert_logical1_integer4(res,l) (*(res) = (l), FFEBAD)
1081 #define ffetarget_convert_logical2_character1(res,l) \
1082 ffetarget_convert_any_character1_ ((char *) (res), sizeof(*(res)), l)
1083 #define ffetarget_convert_logical2_hollerith(res,l) \
1084 ffetarget_convert_any_hollerith_ ((char *) (res), sizeof(*(res)), l)
1085 #define ffetarget_convert_logical2_typeless(res,l) \
1086 ffetarget_convert_any_typeless_ ((char *) (res), sizeof(*(res)), l)
1087 #define ffetarget_convert_logical2_logical1(res,l) (*(res) = (l), FFEBAD)
1088 #define ffetarget_convert_logical2_logical3(res,l) (*(res) = (l), FFEBAD)
1089 #define ffetarget_convert_logical2_logical4(res,l) (*(res) = (l), FFEBAD)
1090 #define ffetarget_convert_logical2_integer1(res,l) (*(res) = (l), FFEBAD)
1091 #define ffetarget_convert_logical2_integer2(res,l) (*(res) = (l), FFEBAD)
1092 #define ffetarget_convert_logical2_integer3(res,l) (*(res) = (l), FFEBAD)
1093 #define ffetarget_convert_logical2_integer4(res,l) (*(res) = (l), FFEBAD)
1094 #define ffetarget_convert_logical3_character1(res,l) \
1095 ffetarget_convert_any_character1_ ((char *) (res), sizeof(*(res)), l)
1096 #define ffetarget_convert_logical3_hollerith(res,l) \
1097 ffetarget_convert_any_hollerith_ ((char *) (res), sizeof(*(res)), l)
1098 #define ffetarget_convert_logical3_typeless(res,l) \
1099 ffetarget_convert_any_typeless_ ((char *) (res), sizeof(*(res)), l)
1100 #define ffetarget_convert_logical3_logical1(res,l) (*(res) = (l), FFEBAD)
1101 #define ffetarget_convert_logical3_logical2(res,l) (*(res) = (l), FFEBAD)
1102 #define ffetarget_convert_logical3_logical4(res,l) (*(res) = (l), FFEBAD)
1103 #define ffetarget_convert_logical3_integer1(res,l) (*(res) = (l), FFEBAD)
1104 #define ffetarget_convert_logical3_integer2(res,l) (*(res) = (l), FFEBAD)
1105 #define ffetarget_convert_logical3_integer3(res,l) (*(res) = (l), FFEBAD)
1106 #define ffetarget_convert_logical3_integer4(res,l) (*(res) = (l), FFEBAD)
1107 #define ffetarget_convert_logical4_character1(res,l) \
1108 ffetarget_convert_any_character1_ ((char *) (res), sizeof(*(res)), l)
1109 #define ffetarget_convert_logical4_hollerith(res,l) \
1110 ffetarget_convert_any_hollerith_ ((char *) (res), sizeof(*(res)), l)
1111 #define ffetarget_convert_logical4_typeless(res,l) \
1112 ffetarget_convert_any_typeless_ ((char *) (res), sizeof(*(res)), l)
1113 #define ffetarget_convert_logical4_logical1(res,l) (*(res) = (l), FFEBAD)
1114 #define ffetarget_convert_logical4_logical2(res,l) (*(res) = (l), FFEBAD)
1115 #define ffetarget_convert_logical4_logical3(res,l) (*(res) = (l), FFEBAD)
1116 #define ffetarget_convert_logical4_integer1(res,l) (*(res) = (l), FFEBAD)
1117 #define ffetarget_convert_logical4_integer2(res,l) (*(res) = (l), FFEBAD)
1118 #define ffetarget_convert_logical4_integer3(res,l) (*(res) = (l), FFEBAD)
1119 #define ffetarget_convert_logical4_integer4(res,l) (*(res) = (l), FFEBAD)
1120 #define ffetarget_convert_integer1_character1(res,l) \
1121 ffetarget_convert_any_character1_ ((char *) (res), sizeof(*(res)), l)
1122 #define ffetarget_convert_integer1_hollerith(res,l) \
1123 ffetarget_convert_any_hollerith_ ((char *) (res), sizeof(*(res)), l)
1124 #define ffetarget_convert_integer1_typeless(res,l) \
1125 ffetarget_convert_any_typeless_ ((char *) (res), sizeof(*(res)), l)
1126 #define ffetarget_convert_integer1_integer2(res,l) (*(res) = (l), FFEBAD)
1127 #define ffetarget_convert_integer1_integer3(res,l) (*(res) = (l), FFEBAD)
1128 #define ffetarget_convert_integer1_integer4(res,l) (*(res) = (l), FFEBAD)
1129 #define ffetarget_convert_integer1_logical1(res,l) (*(res) = (l), FFEBAD)
1130 #define ffetarget_convert_integer1_logical2(res,l) (*(res) = (l), FFEBAD)
1131 #define ffetarget_convert_integer1_logical3(res,l) (*(res) = (l), FFEBAD)
1132 #define ffetarget_convert_integer1_logical4(res,l) (*(res) = (l), FFEBAD)
1133 #define ffetarget_convert_integer1_real1(res,l) \
1134 ({ REAL_VALUE_TYPE lr; \
1135 lr = ffetarget_cvt_r1_to_rv_ (l); \
1136 REAL_VALUE_TO_INT (&ffetarget_long_val_, &ffetarget_long_junk_, lr); \
1137 *(res) = ffetarget_long_val_; \
1139 #define ffetarget_convert_integer1_real2(res,l) \
1140 ({ REAL_VALUE_TYPE lr; \
1141 lr = ffetarget_cvt_r2_to_rv_ (&((l).v[0])); \
1142 REAL_VALUE_TO_INT (&ffetarget_long_val_, &ffetarget_long_junk_, lr); \
1143 *(res) = ffetarget_long_val_; \
1145 #define ffetarget_convert_integer1_complex1(res,l) \
1146 ({ REAL_VALUE_TYPE lr; \
1147 lr = ffetarget_cvt_r1_to_rv_ ((l).real); \
1148 REAL_VALUE_TO_INT (&ffetarget_long_val_, &ffetarget_long_junk_, lr); \
1149 *(res) = ffetarget_long_val_; \
1151 #define ffetarget_convert_integer1_complex2(res,l) \
1152 ({ REAL_VALUE_TYPE lr; \
1153 lr = ffetarget_cvt_r2_to_rv_ (&((l).real.v[0])); \
1154 REAL_VALUE_TO_INT (&ffetarget_long_val_, &ffetarget_long_junk_, lr); \
1155 *(res) = ffetarget_long_val_; \
1157 #define ffetarget_convert_real1_character1(res,l) \
1158 ffetarget_convert_any_character1_ ((char *) (res), sizeof(*(res)), l)
1159 #define ffetarget_convert_real1_hollerith(res,l) \
1160 ffetarget_convert_any_hollerith_ ((char *) (res), sizeof(*(res)), l)
1161 #define ffetarget_convert_real1_integer2(res,l) \
1162 ffetarget_convert_real1_integer1(res,l)
1163 #define ffetarget_convert_real1_integer3(res,l) \
1164 ffetarget_convert_real1_integer1(res,l)
1165 #define ffetarget_convert_real1_integer4(res,l) \
1166 ({ REAL_VALUE_TYPE resr; \
1167 ffetargetInteger4 lf = (l); \
1168 FFETARGET_REAL_VALUE_FROM_LONGLONG_ (resr, lf, 1); \
1169 ffetarget_cvt_rv_to_r1_ (resr, *(res)); \
1171 #define ffetarget_convert_real1_typeless(res,l) \
1172 ffetarget_convert_any_typeless_ ((char *) (res), sizeof(*(res)), l)
1173 #define ffetarget_convert_real1_complex1(res,l) (*(res) = (l).real, FFEBAD)
1174 #define ffetarget_convert_real1_complex2(res,l) \
1175 ffetarget_convert_real1_real2 ((res), (l).real)
1176 #define ffetarget_convert_real1_integer1(res,l) \
1177 ({ REAL_VALUE_TYPE resr; \
1178 ffetargetInteger1 lf = (l); \
1179 FFETARGET_REAL_VALUE_FROM_INT_ (resr, lf, 1); \
1180 ffetarget_cvt_rv_to_r1_ (resr, *(res)); \
1182 #define ffetarget_convert_real1_real2(res,l) \
1183 ({ REAL_VALUE_TYPE lr; \
1184 lr = ffetarget_cvt_r2_to_rv_ (&((l).v[0])); \
1185 ffetarget_cvt_rv_to_r1_ (lr, *(res)); \
1187 #define ffetarget_convert_real2_character1(res,l) \
1188 ffetarget_convert_any_character1_ ((char *) (res), sizeof(*(res)), l)
1189 #define ffetarget_convert_real2_hollerith(res,l) \
1190 ffetarget_convert_any_hollerith_ ((char *) (res), sizeof(*(res)), l)
1191 #define ffetarget_convert_real2_integer2(res,l) \
1192 ffetarget_convert_real2_integer1(res,l)
1193 #define ffetarget_convert_real2_integer3(res,l) \
1194 ffetarget_convert_real2_integer1(res,l)
1195 #define ffetarget_convert_real2_integer4(res,l) \
1196 ({ REAL_VALUE_TYPE resr; \
1197 ffetargetInteger4 lf = (l); \
1198 FFETARGET_REAL_VALUE_FROM_LONGLONG_ (resr, lf, 2); \
1199 ffetarget_cvt_rv_to_r2_ (resr, &((res)->v[0])); \
1201 #define ffetarget_convert_real2_typeless(res,l) \
1202 ffetarget_convert_any_typeless_ ((char *) (res), sizeof(*(res)), l)
1203 #define ffetarget_convert_real2_complex1(res,l) \
1204 ffetarget_convert_real2_real1 ((res), (l).real)
1205 #define ffetarget_convert_real2_complex2(res,l) (*(res) = (l).real, FFEBAD)
1206 #define ffetarget_convert_real2_integer(res,l) \
1207 ({ REAL_VALUE_TYPE resr; \
1208 ffetargetInteger1 lf = (l); \
1209 FFETARGET_REAL_VALUE_FROM_INT_ (resr, lf, 2); \
1210 ffetarget_cvt_rv_to_r2_ (resr, &((res)->v[0])); \
1212 #define ffetarget_convert_real2_integer1 ffetarget_convert_real2_integer
1213 #define ffetarget_convert_real2_real1(res,l) \
1214 ({ REAL_VALUE_TYPE lr; \
1215 lr = ffetarget_cvt_r1_to_rv_ ((l)); \
1216 ffetarget_cvt_rv_to_r2_ (lr, &((res)->v[0])); \
1218 #define ffetarget_divide_integer1(res,l,r) \
1219 (((r) == 0) ? (*(res) = 0, FFEBAD_DIV_BY_ZERO) \
1220 : (((r) == -1) ? (*(res) = -(l), FFEBAD) \
1221 : (*(res) = (l) / (r), FFEBAD)))
1222 #define ffetarget_divide_integer2(res,l,r) \
1223 ffetarget_divide_integer1(res,l,r)
1224 #define ffetarget_divide_integer3(res,l,r) \
1225 ffetarget_divide_integer1(res,l,r)
1226 #define ffetarget_divide_integer4(res,l,r) \
1227 ffetarget_divide_integer1(res,l,r)
1228 #define ffetarget_divide_real1(res,l,r) \
1229 ({ REAL_VALUE_TYPE lr, rr, resr; \
1230 lr = ffetarget_cvt_r1_to_rv_ ((l)); \
1231 rr = ffetarget_cvt_r1_to_rv_ ((r)); \
1232 REAL_VALUES_EQUAL (rr, dconst0) \
1233 ? ({ ffetarget_cvt_rv_to_r1_ (dconst0, *(res)); \
1234 FFEBAD_DIV_BY_ZERO; \
1236 : ({ REAL_ARITHMETIC (resr, RDIV_EXPR, lr, rr); \
1237 ffetarget_cvt_rv_to_r1_ (resr, *(res)); \
1241 #define ffetarget_divide_real2(res,l,r) \
1242 ({ REAL_VALUE_TYPE lr, rr, resr; \
1243 lr = ffetarget_cvt_r2_to_rv_ (&((l).v[0])); \
1244 rr = ffetarget_cvt_r2_to_rv_ (&((r).v[0])); \
1245 REAL_VALUES_EQUAL (rr, dconst0) \
1246 ? ({ ffetarget_cvt_rv_to_r2_ (dconst0, &((res)->v[0])); \
1247 FFEBAD_DIV_BY_ZERO; \
1249 : ({ REAL_ARITHMETIC (resr, RDIV_EXPR, lr, rr); \
1250 ffetarget_cvt_rv_to_r2_ (resr, &((res)->v[0])); \
1254 #define ffetarget_eq_complex1(res,l,r) \
1255 ({ REAL_VALUE_TYPE lr, li, rr, ri; \
1256 lr = ffetarget_cvt_r1_to_rv_ ((l).real); \
1257 li = ffetarget_cvt_r1_to_rv_ ((l).imaginary); \
1258 rr = ffetarget_cvt_r1_to_rv_ ((r).real); \
1259 ri = ffetarget_cvt_r1_to_rv_ ((r).imaginary); \
1260 *(res) = (REAL_VALUES_EQUAL (lr, rr) && REAL_VALUES_EQUAL (li, ri)) \
1263 #define ffetarget_eq_complex2(res,l,r) \
1264 ({ REAL_VALUE_TYPE lr, li, rr, ri; \
1265 lr = ffetarget_cvt_r2_to_rv_ (&((l).real.v[0])); \
1266 li = ffetarget_cvt_r2_to_rv_ (&((l).imaginary.v[0])); \
1267 rr = ffetarget_cvt_r2_to_rv_ (&((r).real.v[0])); \
1268 ri = ffetarget_cvt_r2_to_rv_ (&((r).imaginary.v[0])); \
1269 *(res) = (REAL_VALUES_EQUAL (lr, rr) && REAL_VALUES_EQUAL (li, ri)) \
1272 #define ffetarget_eq_integer1(res,l,r) \
1273 (*(res) = ((l) == (r)) ? TRUE : FALSE, FFEBAD)
1274 #define ffetarget_eq_integer2(res,l,r) \
1275 (*(res) = ((l) == (r)) ? TRUE : FALSE, FFEBAD)
1276 #define ffetarget_eq_integer3(res,l,r) \
1277 (*(res) = ((l) == (r)) ? TRUE : FALSE, FFEBAD)
1278 #define ffetarget_eq_integer4(res,l,r) \
1279 (*(res) = ((l) == (r)) ? TRUE : FALSE, FFEBAD)
1280 #define ffetarget_eq_real1(res,l,r) \
1281 ({ REAL_VALUE_TYPE lr, rr; \
1282 lr = ffetarget_cvt_r1_to_rv_ ((l)); \
1283 rr = ffetarget_cvt_r1_to_rv_ ((r)); \
1284 *(res) = REAL_VALUES_EQUAL (lr, rr) ? TRUE : FALSE; \
1286 #define ffetarget_eq_real2(res,l,r) \
1287 ({ REAL_VALUE_TYPE lr, rr; \
1288 lr = ffetarget_cvt_r2_to_rv_ (&((l).v[0])); \
1289 rr = ffetarget_cvt_r2_to_rv_ (&((r).v[0])); \
1290 *(res) = REAL_VALUES_EQUAL (lr, rr) ? TRUE : FALSE; \
1292 #define ffetarget_eqv_integer1(res,l,r) (*(res) = (l) ^ ~(r), FFEBAD)
1293 #define ffetarget_eqv_integer2(res,l,r) (*(res) = (l) ^ ~(r), FFEBAD)
1294 #define ffetarget_eqv_integer3(res,l,r) (*(res) = (l) ^ ~(r), FFEBAD)
1295 #define ffetarget_eqv_integer4(res,l,r) (*(res) = (l) ^ ~(r), FFEBAD)
1296 #define ffetarget_eqv_logical1(res,l,r) (*(res) = (l) == (r), FFEBAD)
1297 #define ffetarget_eqv_logical2(res,l,r) (*(res) = (l) == (r), FFEBAD)
1298 #define ffetarget_eqv_logical3(res,l,r) (*(res) = (l) == (r), FFEBAD)
1299 #define ffetarget_eqv_logical4(res,l,r) (*(res) = (l) == (r), FFEBAD)
1300 #define ffetarget_ge_integer1(res,l,r) \
1301 (*(res) = ((l) >= (r)) ? TRUE : FALSE, FFEBAD)
1302 #define ffetarget_ge_integer2(res,l,r) \
1303 (*(res) = ((l) >= (r)) ? TRUE : FALSE, FFEBAD)
1304 #define ffetarget_ge_integer3(res,l,r) \
1305 (*(res) = ((l) >= (r)) ? TRUE : FALSE, FFEBAD)
1306 #define ffetarget_ge_integer4(res,l,r) \
1307 (*(res) = ((l) >= (r)) ? TRUE : FALSE, FFEBAD)
1308 #define ffetarget_ge_real1(res,l,r) \
1309 ({ REAL_VALUE_TYPE lr, rr; \
1310 lr = ffetarget_cvt_r1_to_rv_ ((l)); \
1311 rr = ffetarget_cvt_r1_to_rv_ ((r)); \
1312 *(res) = REAL_VALUES_LESS (lr, rr) ? FALSE : TRUE; \
1314 #define ffetarget_ge_real2(res,l,r) \
1315 ({ REAL_VALUE_TYPE lr, rr; \
1316 lr = ffetarget_cvt_r2_to_rv_ (&((l).v[0])); \
1317 rr = ffetarget_cvt_r2_to_rv_ (&((r).v[0])); \
1318 *(res) = REAL_VALUES_LESS (lr, rr) ? FALSE : TRUE; \
1320 #define ffetarget_gt_integer1(res,l,r) \
1321 (*(res) = ((l) > (r)) ? TRUE : FALSE, FFEBAD)
1322 #define ffetarget_gt_integer2(res,l,r) \
1323 (*(res) = ((l) > (r)) ? TRUE : FALSE, FFEBAD)
1324 #define ffetarget_gt_integer3(res,l,r) \
1325 (*(res) = ((l) > (r)) ? TRUE : FALSE, FFEBAD)
1326 #define ffetarget_gt_integer4(res,l,r) \
1327 (*(res) = ((l) > (r)) ? TRUE : FALSE, FFEBAD)
1328 #define ffetarget_gt_real1(res,l,r) \
1329 ({ REAL_VALUE_TYPE lr, rr; \
1330 lr = ffetarget_cvt_r1_to_rv_ ((l)); \
1331 rr = ffetarget_cvt_r1_to_rv_ ((r)); \
1332 *(res) = (REAL_VALUES_LESS (lr, rr) || REAL_VALUES_EQUAL (lr, rr)) \
1335 #define ffetarget_gt_real2(res,l,r) \
1336 ({ REAL_VALUE_TYPE lr, rr; \
1337 lr = ffetarget_cvt_r2_to_rv_ (&((l).v[0])); \
1338 rr = ffetarget_cvt_r2_to_rv_ (&((r).v[0])); \
1339 *(res) = (REAL_VALUES_LESS (lr, rr) || REAL_VALUES_EQUAL (lr, rr)) \
1342 #define ffetarget_hexxmil(v,t) ffetarget_typeless_hex (v, t)
1343 #define ffetarget_hexxvxt(v,t) ffetarget_typeless_hex (v, t)
1344 #define ffetarget_hexzmil(v,t) ffetarget_typeless_hex (v, t)
1345 #define ffetarget_hexzvxt(v,t) ffetarget_typeless_hex (v, t)
1346 #define ffetarget_init_0()
1347 #define ffetarget_init_1()
1348 #define ffetarget_init_2()
1349 #define ffetarget_init_3()
1350 #define ffetarget_init_4()
1351 #ifdef FFETARGET_32bit_longs
1352 #define ffetarget_integerdefault_is_magical(i) \
1353 (((unsigned long int) i) == FFETARGET_integerBIG_MAGICAL)
1355 #define ffetarget_integerdefault_is_magical(i) \
1356 (((unsigned int) i) == FFETARGET_integerBIG_MAGICAL)
1358 #define ffetarget_iszero_real1(l) \
1359 ({ REAL_VALUE_TYPE lr; \
1360 lr = ffetarget_cvt_r1_to_rv_ ((l)); \
1361 REAL_VALUES_EQUAL (lr, dconst0); \
1363 #define ffetarget_iszero_real2(l) \
1364 ({ REAL_VALUE_TYPE lr; \
1365 lr = ffetarget_cvt_r2_to_rv_ (&((l).v[0])); \
1366 REAL_VALUES_EQUAL (lr, dconst0); \
1368 #define ffetarget_iszero_typeless(l) ((l) == 0)
1369 #define ffetarget_logical1(v,truth) (*(v) = truth ? 1 : 0)
1370 #define ffetarget_le_integer1(res,l,r) \
1371 (*(res) = ((l) <= (r)) ? TRUE : FALSE, FFEBAD)
1372 #define ffetarget_le_integer2(res,l,r) \
1373 (*(res) = ((l) <= (r)) ? TRUE : FALSE, FFEBAD)
1374 #define ffetarget_le_integer3(res,l,r) \
1375 (*(res) = ((l) <= (r)) ? TRUE : FALSE, FFEBAD)
1376 #define ffetarget_le_integer4(res,l,r) \
1377 (*(res) = ((l) <= (r)) ? TRUE : FALSE, FFEBAD)
1378 #define ffetarget_le_real1(res,l,r) \
1379 ({ REAL_VALUE_TYPE lr, rr; \
1380 lr = ffetarget_cvt_r1_to_rv_ ((l)); \
1381 rr = ffetarget_cvt_r1_to_rv_ ((r)); \
1382 *(res) = (REAL_VALUES_LESS (lr, rr) || REAL_VALUES_EQUAL (lr, rr)) \
1385 #define ffetarget_le_real2(res,l,r) \
1386 ({ REAL_VALUE_TYPE lr, rr; \
1387 lr = ffetarget_cvt_r2_to_rv_ (&((l).v[0])); \
1388 rr = ffetarget_cvt_r2_to_rv_ (&((r).v[0])); \
1389 *(res) = (REAL_VALUES_LESS (lr, rr) || REAL_VALUES_EQUAL (lr, rr)) \
1392 #define ffetarget_lt_integer1(res,l,r) \
1393 (*(res) = ((l) < (r)) ? TRUE : FALSE, FFEBAD)
1394 #define ffetarget_lt_integer2(res,l,r) \
1395 (*(res) = ((l) < (r)) ? TRUE : FALSE, FFEBAD)
1396 #define ffetarget_lt_integer3(res,l,r) \
1397 (*(res) = ((l) < (r)) ? TRUE : FALSE, FFEBAD)
1398 #define ffetarget_lt_integer4(res,l,r) \
1399 (*(res) = ((l) < (r)) ? TRUE : FALSE, FFEBAD)
1400 #define ffetarget_lt_real1(res,l,r) \
1401 ({ REAL_VALUE_TYPE lr, rr; \
1402 lr = ffetarget_cvt_r1_to_rv_ ((l)); \
1403 rr = ffetarget_cvt_r1_to_rv_ ((r)); \
1404 *(res) = REAL_VALUES_LESS (lr, rr) ? TRUE : FALSE; \
1406 #define ffetarget_lt_real2(res,l,r) \
1407 ({ REAL_VALUE_TYPE lr, rr; \
1408 lr = ffetarget_cvt_r2_to_rv_ (&((l).v[0])); \
1409 rr = ffetarget_cvt_r2_to_rv_ (&((r).v[0])); \
1410 *(res) = REAL_VALUES_LESS (lr, rr) ? TRUE : FALSE; \
1412 #define ffetarget_length_character1(c) ((c).length)
1413 #define ffetarget_length_characterdefault ffetarget_length_character1
1414 #define ffetarget_make_real1(res,lr) \
1415 ffetarget_cvt_rv_to_r1_ ((lr), *(res))
1416 #define ffetarget_make_real2(res,lr) \
1417 ffetarget_cvt_rv_to_r2_ ((lr), &((res)->v[0]))
1418 #define ffetarget_multiply_integer1(res,l,r) (*(res) = (l) * (r), FFEBAD)
1419 #define ffetarget_multiply_integer2(res,l,r) (*(res) = (l) * (r), FFEBAD)
1420 #define ffetarget_multiply_integer3(res,l,r) (*(res) = (l) * (r), FFEBAD)
1421 #define ffetarget_multiply_integer4(res,l,r) (*(res) = (l) * (r), FFEBAD)
1422 #define ffetarget_multiply_real1(res,l,r) \
1423 ({ REAL_VALUE_TYPE lr, rr, resr; \
1424 lr = ffetarget_cvt_r1_to_rv_ ((l)); \
1425 rr = ffetarget_cvt_r1_to_rv_ ((r)); \
1426 REAL_ARITHMETIC (resr, MULT_EXPR, lr, rr); \
1427 ffetarget_cvt_rv_to_r1_ (resr, *(res)); \
1429 #define ffetarget_multiply_real2(res,l,r) \
1430 ({ REAL_VALUE_TYPE lr, rr, resr; \
1431 lr = ffetarget_cvt_r2_to_rv_ (&((l).v[0])); \
1432 rr = ffetarget_cvt_r2_to_rv_ (&((r).v[0])); \
1433 REAL_ARITHMETIC (resr, MULT_EXPR, lr, rr); \
1434 ffetarget_cvt_rv_to_r2_ (resr, &((res)->v[0])); \
1436 #define ffetarget_ne_complex1(res,l,r) \
1437 ({ REAL_VALUE_TYPE lr, li, rr, ri; \
1438 lr = ffetarget_cvt_r1_to_rv_ ((l).real); \
1439 li = ffetarget_cvt_r1_to_rv_ ((l).imaginary); \
1440 rr = ffetarget_cvt_r1_to_rv_ ((r).real); \
1441 ri = ffetarget_cvt_r1_to_rv_ ((r).imaginary); \
1442 *(res) = (REAL_VALUES_EQUAL (lr, rr) && REAL_VALUES_EQUAL (li, ri)) \
1445 #define ffetarget_ne_complex2(res,l,r) \
1446 ({ REAL_VALUE_TYPE lr, li, rr, ri; \
1447 lr = ffetarget_cvt_r2_to_rv_ (&((l).real.v[0])); \
1448 li = ffetarget_cvt_r2_to_rv_ (&((l).imaginary.v[0])); \
1449 rr = ffetarget_cvt_r2_to_rv_ (&((r).real.v[0])); \
1450 ri = ffetarget_cvt_r2_to_rv_ (&((r).imaginary.v[0])); \
1451 *(res) = (REAL_VALUES_EQUAL (lr, rr) && REAL_VALUES_EQUAL (li, ri)) \
1454 #define ffetarget_ne_integer1(res,l,r) \
1455 (*(res) = ((l) != (r)) ? TRUE : FALSE, FFEBAD)
1456 #define ffetarget_ne_integer2(res,l,r) \
1457 (*(res) = ((l) != (r)) ? TRUE : FALSE, FFEBAD)
1458 #define ffetarget_ne_integer3(res,l,r) \
1459 (*(res) = ((l) != (r)) ? TRUE : FALSE, FFEBAD)
1460 #define ffetarget_ne_integer4(res,l,r) \
1461 (*(res) = ((l) != (r)) ? TRUE : FALSE, FFEBAD)
1462 #define ffetarget_ne_real1(res,l,r) \
1463 ({ REAL_VALUE_TYPE lr, rr; \
1464 lr = ffetarget_cvt_r1_to_rv_ ((l)); \
1465 rr = ffetarget_cvt_r1_to_rv_ ((r)); \
1466 *(res) = REAL_VALUES_EQUAL (lr, rr) ? FALSE : TRUE; \
1468 #define ffetarget_ne_real2(res,l,r) \
1469 ({ REAL_VALUE_TYPE lr, rr; \
1470 lr = ffetarget_cvt_r2_to_rv_ (&((l).v[0])); \
1471 rr = ffetarget_cvt_r2_to_rv_ (&((r).v[0])); \
1472 *(res) = REAL_VALUES_EQUAL (lr, rr) ? FALSE : TRUE; \
1474 #define ffetarget_neqv_integer1(res,l,r) (*(res) = (l) ^ (r), FFEBAD)
1475 #define ffetarget_neqv_integer2(res,l,r) (*(res) = (l) ^ (r), FFEBAD)
1476 #define ffetarget_neqv_integer3(res,l,r) (*(res) = (l) ^ (r), FFEBAD)
1477 #define ffetarget_neqv_integer4(res,l,r) (*(res) = (l) ^ (r), FFEBAD)
1478 #define ffetarget_neqv_logical1(res,l,r) (*(res) = (l) != (r), FFEBAD)
1479 #define ffetarget_neqv_logical2(res,l,r) (*(res) = (l) != (r), FFEBAD)
1480 #define ffetarget_neqv_logical3(res,l,r) (*(res) = (l) != (r), FFEBAD)
1481 #define ffetarget_neqv_logical4(res,l,r) (*(res) = (l) != (r), FFEBAD)
1482 #define ffetarget_not_integer1(res,l) (*(res) = ~(l), FFEBAD)
1483 #define ffetarget_not_integer2(res,l) (*(res) = ~(l), FFEBAD)
1484 #define ffetarget_not_integer3(res,l) (*(res) = ~(l), FFEBAD)
1485 #define ffetarget_not_integer4(res,l) (*(res) = ~(l), FFEBAD)
1486 #define ffetarget_not_logical1(res,l) (*(res) = !(l), FFEBAD)
1487 #define ffetarget_not_logical2(res,l) (*(res) = !(l), FFEBAD)
1488 #define ffetarget_not_logical3(res,l) (*(res) = !(l), FFEBAD)
1489 #define ffetarget_not_logical4(res,l) (*(res) = !(l), FFEBAD)
1490 #define ffetarget_octalmil(v,t) ffetarget_typeless_octal (v, t)
1491 #define ffetarget_octalvxt(v,t) ffetarget_typeless_octal (v, t)
1492 #define ffetarget_offset(res,l) (*(res) = (l), TRUE) /* Overflow? */
1493 #define ffetarget_offset_add(res,l,r) (*(res) = (l) + (r), TRUE) /* Overflow? */
1494 #define ffetarget_offset_charsize(res,l,u) (*(res) = (l) * (u), TRUE) /* Ov? */
1495 #define ffetarget_offset_multiply(res,l,r) (*(res) = (l) * (r), TRUE) /* Ov? */
1496 #define ffetarget_offset_overflow(text) ((void) 0) /* ~~no message? */
1497 #define ffetarget_or_integer1(res,l,r) (*(res) = (l) | (r), FFEBAD)
1498 #define ffetarget_or_integer2(res,l,r) (*(res) = (l) | (r), FFEBAD)
1499 #define ffetarget_or_integer3(res,l,r) (*(res) = (l) | (r), FFEBAD)
1500 #define ffetarget_or_integer4(res,l,r) (*(res) = (l) | (r), FFEBAD)
1501 #define ffetarget_or_logical1(res,l,r) (*(res) = (l) || (r), FFEBAD)
1502 #define ffetarget_or_logical2(res,l,r) (*(res) = (l) || (r), FFEBAD)
1503 #define ffetarget_or_logical3(res,l,r) (*(res) = (l) || (r), FFEBAD)
1504 #define ffetarget_or_logical4(res,l,r) (*(res) = (l) || (r), FFEBAD)
1505 #define ffetarget_print_binarymil(f,v) ffetarget_print_binary (f, v)
1506 #define ffetarget_print_binaryvxt(f,v) ffetarget_print_binary (f, v)
1507 #define ffetarget_print_hexxmil(f,v) ffetarget_print_hex (f, v)
1508 #define ffetarget_print_hexxvxt(f,v) ffetarget_print_hex (f, v)
1509 #define ffetarget_print_hexzmil(f,v) ffetarget_print_hex (f, v)
1510 #define ffetarget_print_hexzvxt(f,v) ffetarget_print_hex (f, v)
1511 #define ffetarget_print_integer1(f,v) \
1512 fprintf ((f), "%" ffetargetInteger1_f "d", (v))
1513 #define ffetarget_print_integer2(f,v) \
1514 fprintf ((f), "%" ffetargetInteger2_f "d", (v))
1515 #define ffetarget_print_integer3(f,v) \
1516 fprintf ((f), "%" ffetargetInteger3_f "d", (v))
1517 #define ffetarget_print_integer4(f,v) \
1518 fprintf ((f), "%" ffetargetInteger4_f "d", (v))
1519 #define ffetarget_print_logical1(f,v) \
1520 fprintf ((f), "%" ffetargetLogical1_f "d", (v))
1521 #define ffetarget_print_logical2(f,v) \
1522 fprintf ((f), "%" ffetargetLogical2_f "d", (v))
1523 #define ffetarget_print_logical3(f,v) \
1524 fprintf ((f), "%" ffetargetLogical3_f "d", (v))
1525 #define ffetarget_print_logical4(f,v) \
1526 fprintf ((f), "%" ffetargetLogical4_f "d", (v))
1527 #define ffetarget_print_octalmil(f,v) ffetarget_print_octal(f,v)
1528 #define ffetarget_print_octalvxt(f,v) ffetarget_print_octal(f,v)
1529 #define ffetarget_print_real1(f,l) \
1530 ({ REAL_VALUE_TYPE lr; \
1531 lr = ffetarget_cvt_r1_to_rv_ ((l)); \
1532 real_to_decimal (ffetarget_string_, &lr \
1533 sizeof(ffetarget_string_), 0, 1); \
1534 fputs (ffetarget_string_, (f)); \
1536 #define ffetarget_print_real2(f,l) \
1537 ({ REAL_VALUE_TYPE lr; \
1538 lr = ffetarget_cvt_r2_to_rv_ (&((l).v[0])); \
1539 real_to_decimal (ffetarget_string_, &lr, \
1540 sizeof(ffetarget_string_), 0, 1); \
1541 fputs (ffetarget_string_, (f)); \
1543 #define ffetarget_real1_one(res) ffetarget_cvt_rv_to_r1_ (dconst1, *(res))
1544 #define ffetarget_real2_one(res) ffetarget_cvt_rv_to_r2_ (dconst1, &((res)->v[0]))
1545 #define ffetarget_real1_two(res) ffetarget_cvt_rv_to_r1_ (dconst2, *(res))
1546 #define ffetarget_real2_two(res) ffetarget_cvt_rv_to_r2_ (dconst2, &((res)->v[0]))
1547 #define ffetarget_real1_zero(res) ffetarget_cvt_rv_to_r1_ (dconst0, *(res))
1548 #define ffetarget_real2_zero(res) ffetarget_cvt_rv_to_r2_ (dconst0, &((res)->v[0]))
1549 #define ffetarget_size_typeless_binary(t) ((ffetarget_num_digits_(t) + 7) / 8)
1550 #define ffetarget_size_typeless_octal(t) \
1551 ((ffetarget_num_digits_(t) * 3 + 7) / 8)
1552 #define ffetarget_size_typeless_hex(t) ((ffetarget_num_digits_(t) + 1) / 2)
1553 #define ffetarget_subtract_complex1(res,l,r) \
1554 ({ REAL_VALUE_TYPE lr, li, rr, ri, resr, resi; \
1555 lr = ffetarget_cvt_r1_to_rv_ ((l).real); \
1556 li = ffetarget_cvt_r1_to_rv_ ((l).imaginary); \
1557 rr = ffetarget_cvt_r1_to_rv_ ((r).real); \
1558 ri = ffetarget_cvt_r1_to_rv_ ((r).imaginary); \
1559 REAL_ARITHMETIC (resr, MINUS_EXPR, lr, rr); \
1560 REAL_ARITHMETIC (resi, MINUS_EXPR, li, ri); \
1561 ffetarget_cvt_rv_to_r1_ (resr, (res)->real); \
1562 ffetarget_cvt_rv_to_r1_ (resi, (res)->imaginary); \
1564 #define ffetarget_subtract_complex2(res,l,r) \
1565 ({ REAL_VALUE_TYPE lr, li, rr, ri, resr, resi; \
1566 lr = ffetarget_cvt_r2_to_rv_ (&((l).real.v[0])); \
1567 li = ffetarget_cvt_r2_to_rv_ (&((l).imaginary.v[0])); \
1568 rr = ffetarget_cvt_r2_to_rv_ (&((r).real.v[0])); \
1569 ri = ffetarget_cvt_r2_to_rv_ (&((r).imaginary.v[0])); \
1570 REAL_ARITHMETIC (resr, MINUS_EXPR, lr, rr); \
1571 REAL_ARITHMETIC (resi, MINUS_EXPR, li, ri); \
1572 ffetarget_cvt_rv_to_r2_ (resr, &((res)->real.v[0])); \
1573 ffetarget_cvt_rv_to_r2_ (resi, &((res)->imaginary.v[0])); \
1575 #define ffetarget_subtract_integer1(res,l,r) (*(res) = (l) - (r), FFEBAD)
1576 #define ffetarget_subtract_integer2(res,l,r) (*(res) = (l) - (r), FFEBAD)
1577 #define ffetarget_subtract_integer3(res,l,r) (*(res) = (l) - (r), FFEBAD)
1578 #define ffetarget_subtract_integer4(res,l,r) (*(res) = (l) - (r), FFEBAD)
1579 #define ffetarget_subtract_real1(res,l,r) \
1580 ({ REAL_VALUE_TYPE lr, rr, resr; \
1581 lr = ffetarget_cvt_r1_to_rv_ ((l)); \
1582 rr = ffetarget_cvt_r1_to_rv_ ((r)); \
1583 REAL_ARITHMETIC (resr, MINUS_EXPR, lr, rr); \
1584 ffetarget_cvt_rv_to_r1_ (resr, *(res)); \
1586 #define ffetarget_subtract_real2(res,l,r) \
1587 ({ REAL_VALUE_TYPE lr, rr, resr; \
1588 lr = ffetarget_cvt_r2_to_rv_ (&((l).v[0])); \
1589 rr = ffetarget_cvt_r2_to_rv_ (&((r).v[0])); \
1590 REAL_ARITHMETIC (resr, MINUS_EXPR, lr, rr); \
1591 ffetarget_cvt_rv_to_r2_ (resr, &((res)->v[0])); \
1593 #define ffetarget_terminate_0()
1594 #define ffetarget_terminate_1()
1595 #define ffetarget_terminate_2()
1596 #define ffetarget_terminate_3()
1597 #define ffetarget_terminate_4()
1598 #define ffetarget_text_character1(c) ((c).text)
1599 #define ffetarget_text_characterdefault ffetarget_text_character1
1600 #define ffetarget_uminus_complex1(res,l) \
1601 ({ REAL_VALUE_TYPE lr, li, resr, resi; \
1602 lr = ffetarget_cvt_r1_to_rv_ ((l).real); \
1603 li = ffetarget_cvt_r1_to_rv_ ((l).imaginary); \
1604 resr = REAL_VALUE_NEGATE (lr); \
1605 resi = REAL_VALUE_NEGATE (li); \
1606 ffetarget_cvt_rv_to_r1_ (resr, (res)->real); \
1607 ffetarget_cvt_rv_to_r1_ (resi, (res)->imaginary); \
1609 #define ffetarget_uminus_complex2(res,l) \
1610 ({ REAL_VALUE_TYPE lr, li, resr, resi; \
1611 lr = ffetarget_cvt_r2_to_rv_ (&((l).real.v[0])); \
1612 li = ffetarget_cvt_r2_to_rv_ (&((l).imaginary.v[0])); \
1613 resr = REAL_VALUE_NEGATE (lr); \
1614 resi = REAL_VALUE_NEGATE (li); \
1615 ffetarget_cvt_rv_to_r2_ (resr, &((res)->real.v[0])); \
1616 ffetarget_cvt_rv_to_r2_ (resi, &((res)->imaginary.v[0])); \
1618 #define ffetarget_uminus_integer1(res,l) (*(res) = -(l), FFEBAD)
1619 #define ffetarget_uminus_integer2(res,l) (*(res) = -(l), FFEBAD)
1620 #define ffetarget_uminus_integer3(res,l) (*(res) = -(l), FFEBAD)
1621 #define ffetarget_uminus_integer4(res,l) (*(res) = -(l), FFEBAD)
1622 #define ffetarget_uminus_real1(res,l) \
1623 ({ REAL_VALUE_TYPE lr, resr; \
1624 lr = ffetarget_cvt_r1_to_rv_ ((l)); \
1625 resr = REAL_VALUE_NEGATE (lr); \
1626 ffetarget_cvt_rv_to_r1_ (resr, *(res)); \
1628 #define ffetarget_uminus_real2(res,l) \
1629 ({ REAL_VALUE_TYPE lr, resr; \
1630 lr = ffetarget_cvt_r2_to_rv_ (&((l).v[0])); \
1631 resr = REAL_VALUE_NEGATE (lr); \
1632 ffetarget_cvt_rv_to_r2_ (resr, &((res)->v[0])); \
1634 #define ffetarget_value_real1(lr) ffetarget_cvt_r1_to_rv_ ((lr))
1635 #define ffetarget_value_real2(lr) ffetarget_cvt_r2_to_rv_ (&((lr).v[0]))
1636 #define ffetarget_xor_integer1(res,l,r) (*(res) = (l) ^ (r), FFEBAD)
1637 #define ffetarget_xor_integer2(res,l,r) (*(res) = (l) ^ (r), FFEBAD)
1638 #define ffetarget_xor_integer3(res,l,r) (*(res) = (l) ^ (r), FFEBAD)
1639 #define ffetarget_xor_integer4(res,l,r) (*(res) = (l) ^ (r), FFEBAD)
1640 #define ffetarget_xor_logical1(res,l,r) (*(res) = (l) != (r), FFEBAD)
1641 #define ffetarget_xor_logical2(res,l,r) (*(res) = (l) != (r), FFEBAD)
1642 #define ffetarget_xor_logical3(res,l,r) (*(res) = (l) != (r), FFEBAD)
1643 #define ffetarget_xor_logical4(res,l,r) (*(res) = (l) != (r), FFEBAD)
1645 /* End of #include file. */
1647 #endif /* ! GCC_F_TARGET_H */