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