1 /* bld.c -- Implementation File (module.c template V1.0)
2 Copyright (C) 1995, 1996 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
26 The primary "output" of the FFE includes ffebld objects, which
27 connect expressions, operators, and operands together, along with
28 connecting lists of expressions together for argument or dimension
33 Change names of some things for consistency.
47 /* Externals defined here. */
49 ffebldArity ffebld_arity_op_
[]
52 #define FFEBLD_OP(KWD,NAME,ARITY) ARITY,
56 struct _ffebld_pool_stack_ ffebld_pool_stack_
;
58 /* Simple definitions and enumerations. */
61 /* Internal typedefs. */
64 /* Private include files. */
67 /* Internal structure definitions. */
70 /* Static objects accessed by functions in this module. */
73 static struct _ffebld_ ffebld_blank_
77 {FFEINFO_basictypeNONE
, FFEINFO_kindtypeNONE
, 0, FFEINFO_kindNONE
,
78 FFEINFO_whereNONE
, FFETARGET_charactersizeNONE
},
82 #if FFETARGET_okCHARACTER1
83 static ffebldConstant ffebld_constant_character1_
;
85 #if FFETARGET_okCHARACTER2
86 static ffebldConstant ffebld_constant_character2_
;
88 #if FFETARGET_okCHARACTER3
89 static ffebldConstant ffebld_constant_character3_
;
91 #if FFETARGET_okCHARACTER4
92 static ffebldConstant ffebld_constant_character4_
;
94 #if FFETARGET_okCHARACTER5
95 static ffebldConstant ffebld_constant_character5_
;
97 #if FFETARGET_okCHARACTER6
98 static ffebldConstant ffebld_constant_character6_
;
100 #if FFETARGET_okCHARACTER7
101 static ffebldConstant ffebld_constant_character7_
;
103 #if FFETARGET_okCHARACTER8
104 static ffebldConstant ffebld_constant_character8_
;
106 #if FFETARGET_okCOMPLEX1
107 static ffebldConstant ffebld_constant_complex1_
;
109 #if FFETARGET_okCOMPLEX2
110 static ffebldConstant ffebld_constant_complex2_
;
112 #if FFETARGET_okCOMPLEX3
113 static ffebldConstant ffebld_constant_complex3_
;
115 #if FFETARGET_okCOMPLEX4
116 static ffebldConstant ffebld_constant_complex4_
;
118 #if FFETARGET_okCOMPLEX5
119 static ffebldConstant ffebld_constant_complex5_
;
121 #if FFETARGET_okCOMPLEX6
122 static ffebldConstant ffebld_constant_complex6_
;
124 #if FFETARGET_okCOMPLEX7
125 static ffebldConstant ffebld_constant_complex7_
;
127 #if FFETARGET_okCOMPLEX8
128 static ffebldConstant ffebld_constant_complex8_
;
130 #if FFETARGET_okINTEGER1
131 static ffebldConstant ffebld_constant_integer1_
;
133 #if FFETARGET_okINTEGER2
134 static ffebldConstant ffebld_constant_integer2_
;
136 #if FFETARGET_okINTEGER3
137 static ffebldConstant ffebld_constant_integer3_
;
139 #if FFETARGET_okINTEGER4
140 static ffebldConstant ffebld_constant_integer4_
;
142 #if FFETARGET_okINTEGER5
143 static ffebldConstant ffebld_constant_integer5_
;
145 #if FFETARGET_okINTEGER6
146 static ffebldConstant ffebld_constant_integer6_
;
148 #if FFETARGET_okINTEGER7
149 static ffebldConstant ffebld_constant_integer7_
;
151 #if FFETARGET_okINTEGER8
152 static ffebldConstant ffebld_constant_integer8_
;
154 #if FFETARGET_okLOGICAL1
155 static ffebldConstant ffebld_constant_logical1_
;
157 #if FFETARGET_okLOGICAL2
158 static ffebldConstant ffebld_constant_logical2_
;
160 #if FFETARGET_okLOGICAL3
161 static ffebldConstant ffebld_constant_logical3_
;
163 #if FFETARGET_okLOGICAL4
164 static ffebldConstant ffebld_constant_logical4_
;
166 #if FFETARGET_okLOGICAL5
167 static ffebldConstant ffebld_constant_logical5_
;
169 #if FFETARGET_okLOGICAL6
170 static ffebldConstant ffebld_constant_logical6_
;
172 #if FFETARGET_okLOGICAL7
173 static ffebldConstant ffebld_constant_logical7_
;
175 #if FFETARGET_okLOGICAL8
176 static ffebldConstant ffebld_constant_logical8_
;
178 #if FFETARGET_okREAL1
179 static ffebldConstant ffebld_constant_real1_
;
181 #if FFETARGET_okREAL2
182 static ffebldConstant ffebld_constant_real2_
;
184 #if FFETARGET_okREAL3
185 static ffebldConstant ffebld_constant_real3_
;
187 #if FFETARGET_okREAL4
188 static ffebldConstant ffebld_constant_real4_
;
190 #if FFETARGET_okREAL5
191 static ffebldConstant ffebld_constant_real5_
;
193 #if FFETARGET_okREAL6
194 static ffebldConstant ffebld_constant_real6_
;
196 #if FFETARGET_okREAL7
197 static ffebldConstant ffebld_constant_real7_
;
199 #if FFETARGET_okREAL8
200 static ffebldConstant ffebld_constant_real8_
;
202 static ffebldConstant ffebld_constant_hollerith_
;
203 static ffebldConstant ffebld_constant_typeless_
[FFEBLD_constTYPELESS_LAST
204 - FFEBLD_constTYPELESS_FIRST
+ 1];
206 static const char *ffebld_op_string_
[]
209 #define FFEBLD_OP(KWD,NAME,ARITY) NAME,
210 #include "bld-op.def"
214 /* Static functions (internal). */
217 /* Internal macros. */
219 #define integerdefault_ CATX(integer,FFETARGET_ktINTEGERDEFAULT)
220 #define logicaldefault_ CATX(logical,FFETARGET_ktLOGICALDEFAULT)
221 #define realdefault_ CATX(real,FFETARGET_ktREALDEFAULT)
222 #define realdouble_ CATX(real,FFETARGET_ktREALDOUBLE)
223 #define realquad_ CATX(real,FFETARGET_ktREALQUAD)
225 /* ffebld_constant_cmp -- Compare two constants a la strcmp
227 ffebldConstant c1, c2;
228 if (ffebld_constant_cmp(c1,c2) == 0)
229 // they're equal, else they're not.
231 Returns -1 if c1 < c2, 0 if c1 == c2, +1 if c1 == c2. */
234 ffebld_constant_cmp (ffebldConstant c1
, ffebldConstant c2
)
239 assert (ffebld_constant_type (c1
) == ffebld_constant_type (c2
));
241 switch (ffebld_constant_type (c1
))
243 #if FFETARGET_okINTEGER1
244 case FFEBLD_constINTEGER1
:
245 return ffetarget_cmp_integer1 (ffebld_constant_integer1 (c1
),
246 ffebld_constant_integer1 (c2
));
249 #if FFETARGET_okINTEGER2
250 case FFEBLD_constINTEGER2
:
251 return ffetarget_cmp_integer2 (ffebld_constant_integer2 (c1
),
252 ffebld_constant_integer2 (c2
));
255 #if FFETARGET_okINTEGER3
256 case FFEBLD_constINTEGER3
:
257 return ffetarget_cmp_integer3 (ffebld_constant_integer3 (c1
),
258 ffebld_constant_integer3 (c2
));
261 #if FFETARGET_okINTEGER4
262 case FFEBLD_constINTEGER4
:
263 return ffetarget_cmp_integer4 (ffebld_constant_integer4 (c1
),
264 ffebld_constant_integer4 (c2
));
267 #if FFETARGET_okINTEGER5
268 case FFEBLD_constINTEGER5
:
269 return ffetarget_cmp_integer5 (ffebld_constant_integer5 (c1
),
270 ffebld_constant_integer5 (c2
));
273 #if FFETARGET_okINTEGER6
274 case FFEBLD_constINTEGER6
:
275 return ffetarget_cmp_integer6 (ffebld_constant_integer6 (c1
),
276 ffebld_constant_integer6 (c2
));
279 #if FFETARGET_okINTEGER7
280 case FFEBLD_constINTEGER7
:
281 return ffetarget_cmp_integer7 (ffebld_constant_integer7 (c1
),
282 ffebld_constant_integer7 (c2
));
285 #if FFETARGET_okINTEGER8
286 case FFEBLD_constINTEGER8
:
287 return ffetarget_cmp_integer8 (ffebld_constant_integer8 (c1
),
288 ffebld_constant_integer8 (c2
));
291 #if FFETARGET_okLOGICAL1
292 case FFEBLD_constLOGICAL1
:
293 return ffetarget_cmp_logical1 (ffebld_constant_logical1 (c1
),
294 ffebld_constant_logical1 (c2
));
297 #if FFETARGET_okLOGICAL2
298 case FFEBLD_constLOGICAL2
:
299 return ffetarget_cmp_logical2 (ffebld_constant_logical2 (c1
),
300 ffebld_constant_logical2 (c2
));
303 #if FFETARGET_okLOGICAL3
304 case FFEBLD_constLOGICAL3
:
305 return ffetarget_cmp_logical3 (ffebld_constant_logical3 (c1
),
306 ffebld_constant_logical3 (c2
));
309 #if FFETARGET_okLOGICAL4
310 case FFEBLD_constLOGICAL4
:
311 return ffetarget_cmp_logical4 (ffebld_constant_logical4 (c1
),
312 ffebld_constant_logical4 (c2
));
315 #if FFETARGET_okLOGICAL5
316 case FFEBLD_constLOGICAL5
:
317 return ffetarget_cmp_logical5 (ffebld_constant_logical5 (c1
),
318 ffebld_constant_logical5 (c2
));
321 #if FFETARGET_okLOGICAL6
322 case FFEBLD_constLOGICAL6
:
323 return ffetarget_cmp_logical6 (ffebld_constant_logical6 (c1
),
324 ffebld_constant_logical6 (c2
));
327 #if FFETARGET_okLOGICAL7
328 case FFEBLD_constLOGICAL7
:
329 return ffetarget_cmp_logical7 (ffebld_constant_logical7 (c1
),
330 ffebld_constant_logical7 (c2
));
333 #if FFETARGET_okLOGICAL8
334 case FFEBLD_constLOGICAL8
:
335 return ffetarget_cmp_logical8 (ffebld_constant_logical8 (c1
),
336 ffebld_constant_logical8 (c2
));
339 #if FFETARGET_okREAL1
340 case FFEBLD_constREAL1
:
341 return ffetarget_cmp_real1 (ffebld_constant_real1 (c1
),
342 ffebld_constant_real1 (c2
));
345 #if FFETARGET_okREAL2
346 case FFEBLD_constREAL2
:
347 return ffetarget_cmp_real2 (ffebld_constant_real2 (c1
),
348 ffebld_constant_real2 (c2
));
351 #if FFETARGET_okREAL3
352 case FFEBLD_constREAL3
:
353 return ffetarget_cmp_real3 (ffebld_constant_real3 (c1
),
354 ffebld_constant_real3 (c2
));
357 #if FFETARGET_okREAL4
358 case FFEBLD_constREAL4
:
359 return ffetarget_cmp_real4 (ffebld_constant_real4 (c1
),
360 ffebld_constant_real4 (c2
));
363 #if FFETARGET_okREAL5
364 case FFEBLD_constREAL5
:
365 return ffetarget_cmp_real5 (ffebld_constant_real5 (c1
),
366 ffebld_constant_real5 (c2
));
369 #if FFETARGET_okREAL6
370 case FFEBLD_constREAL6
:
371 return ffetarget_cmp_real6 (ffebld_constant_real6 (c1
),
372 ffebld_constant_real6 (c2
));
375 #if FFETARGET_okREAL7
376 case FFEBLD_constREAL7
:
377 return ffetarget_cmp_real7 (ffebld_constant_real7 (c1
),
378 ffebld_constant_real7 (c2
));
381 #if FFETARGET_okREAL8
382 case FFEBLD_constREAL8
:
383 return ffetarget_cmp_real8 (ffebld_constant_real8 (c1
),
384 ffebld_constant_real8 (c2
));
387 #if FFETARGET_okCHARACTER1
388 case FFEBLD_constCHARACTER1
:
389 return ffetarget_cmp_character1 (ffebld_constant_character1 (c1
),
390 ffebld_constant_character1 (c2
));
393 #if FFETARGET_okCHARACTER2
394 case FFEBLD_constCHARACTER2
:
395 return ffetarget_cmp_character2 (ffebld_constant_character2 (c1
),
396 ffebld_constant_character2 (c2
));
399 #if FFETARGET_okCHARACTER3
400 case FFEBLD_constCHARACTER3
:
401 return ffetarget_cmp_character3 (ffebld_constant_character3 (c1
),
402 ffebld_constant_character3 (c2
));
405 #if FFETARGET_okCHARACTER4
406 case FFEBLD_constCHARACTER4
:
407 return ffetarget_cmp_character4 (ffebld_constant_character4 (c1
),
408 ffebld_constant_character4 (c2
));
411 #if FFETARGET_okCHARACTER5
412 case FFEBLD_constCHARACTER5
:
413 return ffetarget_cmp_character5 (ffebld_constant_character5 (c1
),
414 ffebld_constant_character5 (c2
));
417 #if FFETARGET_okCHARACTER6
418 case FFEBLD_constCHARACTER6
:
419 return ffetarget_cmp_character6 (ffebld_constant_character6 (c1
),
420 ffebld_constant_character6 (c2
));
423 #if FFETARGET_okCHARACTER7
424 case FFEBLD_constCHARACTER7
:
425 return ffetarget_cmp_character7 (ffebld_constant_character7 (c1
),
426 ffebld_constant_character7 (c2
));
429 #if FFETARGET_okCHARACTER8
430 case FFEBLD_constCHARACTER8
:
431 return ffetarget_cmp_character8 (ffebld_constant_character8 (c1
),
432 ffebld_constant_character8 (c2
));
436 assert ("bad constant type" == NULL
);
441 /* ffebld_constant_dump -- Display summary of constant's contents
444 ffebld_constant_dump(c);
446 Displays the constant in summary form. */
448 #if FFECOM_targetCURRENT == FFECOM_targetFFE
450 ffebld_constant_dump (ffebldConstant c
)
452 switch (ffebld_constant_type (c
))
454 #if FFETARGET_okINTEGER1
455 case FFEBLD_constINTEGER1
:
456 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeINTEGER
,
457 FFEINFO_kindtypeINTEGER1
);
458 ffebld_constantunion_dump (ffebld_constant_union (c
),
459 FFEINFO_basictypeINTEGER
, FFEINFO_kindtypeINTEGER1
);
463 #if FFETARGET_okINTEGER2
464 case FFEBLD_constINTEGER2
:
465 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeINTEGER
,
466 FFEINFO_kindtypeINTEGER2
);
467 ffebld_constantunion_dump (ffebld_constant_union (c
),
468 FFEINFO_basictypeINTEGER
, FFEINFO_kindtypeINTEGER2
);
472 #if FFETARGET_okINTEGER3
473 case FFEBLD_constINTEGER3
:
474 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeINTEGER
,
475 FFEINFO_kindtypeINTEGER3
);
476 ffebld_constantunion_dump (ffebld_constant_union (c
),
477 FFEINFO_basictypeINTEGER
, FFEINFO_kindtypeINTEGER3
);
481 #if FFETARGET_okINTEGER4
482 case FFEBLD_constINTEGER4
:
483 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeINTEGER
,
484 FFEINFO_kindtypeINTEGER4
);
485 ffebld_constantunion_dump (ffebld_constant_union (c
),
486 FFEINFO_basictypeINTEGER
, FFEINFO_kindtypeINTEGER4
);
490 #if FFETARGET_okINTEGER5
491 case FFEBLD_constINTEGER5
:
492 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeINTEGER
,
493 FFEINFO_kindtypeINTEGER5
);
494 ffebld_constantunion_dump (ffebld_constant_union (c
),
495 FFEINFO_basictypeINTEGER
, FFEINFO_kindtypeINTEGER5
);
499 #if FFETARGET_okINTEGER6
500 case FFEBLD_constINTEGER6
:
501 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeINTEGER
,
502 FFEINFO_kindtypeINTEGER6
);
503 ffebld_constantunion_dump (ffebld_constant_union (c
),
504 FFEINFO_basictypeINTEGER
, FFEINFO_kindtypeINTEGER6
);
508 #if FFETARGET_okINTEGER7
509 case FFEBLD_constINTEGER7
:
510 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeINTEGER
,
511 FFEINFO_kindtypeINTEGER7
);
512 ffebld_constantunion_dump (ffebld_constant_union (c
),
513 FFEINFO_basictypeINTEGER
, FFEINFO_kindtypeINTEGER7
);
517 #if FFETARGET_okINTEGER8
518 case FFEBLD_constINTEGER8
:
519 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeINTEGER
,
520 FFEINFO_kindtypeINTEGER8
);
521 ffebld_constantunion_dump (ffebld_constant_union (c
),
522 FFEINFO_basictypeINTEGER
, FFEINFO_kindtypeINTEGER8
);
526 #if FFETARGET_okLOGICAL1
527 case FFEBLD_constLOGICAL1
:
528 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeLOGICAL
,
529 FFEINFO_kindtypeLOGICAL1
);
530 ffebld_constantunion_dump (ffebld_constant_union (c
),
531 FFEINFO_basictypeLOGICAL
, FFEINFO_kindtypeLOGICAL1
);
535 #if FFETARGET_okLOGICAL2
536 case FFEBLD_constLOGICAL2
:
537 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeLOGICAL
,
538 FFEINFO_kindtypeLOGICAL2
);
539 ffebld_constantunion_dump (ffebld_constant_union (c
),
540 FFEINFO_basictypeLOGICAL
, FFEINFO_kindtypeLOGICAL2
);
544 #if FFETARGET_okLOGICAL3
545 case FFEBLD_constLOGICAL3
:
546 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeLOGICAL
,
547 FFEINFO_kindtypeLOGICAL3
);
548 ffebld_constantunion_dump (ffebld_constant_union (c
),
549 FFEINFO_basictypeLOGICAL
, FFEINFO_kindtypeLOGICAL3
);
553 #if FFETARGET_okLOGICAL4
554 case FFEBLD_constLOGICAL4
:
555 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeLOGICAL
,
556 FFEINFO_kindtypeLOGICAL4
);
557 ffebld_constantunion_dump (ffebld_constant_union (c
),
558 FFEINFO_basictypeLOGICAL
, FFEINFO_kindtypeLOGICAL4
);
562 #if FFETARGET_okLOGICAL5
563 case FFEBLD_constLOGICAL5
:
564 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeLOGICAL
,
565 FFEINFO_kindtypeLOGICAL5
);
566 ffebld_constantunion_dump (ffebld_constant_union (c
),
567 FFEINFO_basictypeLOGICAL
, FFEINFO_kindtypeLOGICAL5
);
571 #if FFETARGET_okLOGICAL6
572 case FFEBLD_constLOGICAL6
:
573 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeLOGICAL
,
574 FFEINFO_kindtypeLOGICAL6
);
575 ffebld_constantunion_dump (ffebld_constant_union (c
),
576 FFEINFO_basictypeLOGICAL
, FFEINFO_kindtypeLOGICAL6
);
580 #if FFETARGET_okLOGICAL7
581 case FFEBLD_constLOGICAL7
:
582 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeLOGICAL
,
583 FFEINFO_kindtypeLOGICAL7
);
584 ffebld_constantunion_dump (ffebld_constant_union (c
),
585 FFEINFO_basictypeLOGICAL
, FFEINFO_kindtypeLOGICAL7
);
589 #if FFETARGET_okLOGICAL8
590 case FFEBLD_constLOGICAL8
:
591 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeLOGICAL
,
592 FFEINFO_kindtypeLOGICAL8
);
593 ffebld_constantunion_dump (ffebld_constant_union (c
),
594 FFEINFO_basictypeLOGICAL
, FFEINFO_kindtypeLOGICAL8
);
598 #if FFETARGET_okREAL1
599 case FFEBLD_constREAL1
:
600 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeREAL
,
601 FFEINFO_kindtypeREAL1
);
602 ffebld_constantunion_dump (ffebld_constant_union (c
),
603 FFEINFO_basictypeREAL
, FFEINFO_kindtypeREAL1
);
607 #if FFETARGET_okREAL2
608 case FFEBLD_constREAL2
:
609 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeREAL
,
610 FFEINFO_kindtypeREAL2
);
611 ffebld_constantunion_dump (ffebld_constant_union (c
),
612 FFEINFO_basictypeREAL
, FFEINFO_kindtypeREAL2
);
616 #if FFETARGET_okREAL3
617 case FFEBLD_constREAL3
:
618 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeREAL
,
619 FFEINFO_kindtypeREAL3
);
620 ffebld_constantunion_dump (ffebld_constant_union (c
),
621 FFEINFO_basictypeREAL
, FFEINFO_kindtypeREAL3
);
625 #if FFETARGET_okREAL4
626 case FFEBLD_constREAL4
:
627 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeREAL
,
628 FFEINFO_kindtypeREAL4
);
629 ffebld_constantunion_dump (ffebld_constant_union (c
),
630 FFEINFO_basictypeREAL
, FFEINFO_kindtypeREAL4
);
634 #if FFETARGET_okREAL5
635 case FFEBLD_constREAL5
:
636 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeREAL
,
637 FFEINFO_kindtypeREAL5
);
638 ffebld_constantunion_dump (ffebld_constant_union (c
),
639 FFEINFO_basictypeREAL
, FFEINFO_kindtypeREAL5
);
643 #if FFETARGET_okREAL6
644 case FFEBLD_constREAL6
:
645 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeREAL
,
646 FFEINFO_kindtypeREAL6
);
647 ffebld_constantunion_dump (ffebld_constant_union (c
),
648 FFEINFO_basictypeREAL
, FFEINFO_kindtypeREAL6
);
652 #if FFETARGET_okREAL7
653 case FFEBLD_constREAL7
:
654 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeREAL
,
655 FFEINFO_kindtypeREAL7
);
656 ffebld_constantunion_dump (ffebld_constant_union (c
),
657 FFEINFO_basictypeREAL
, FFEINFO_kindtypeREAL7
);
661 #if FFETARGET_okREAL8
662 case FFEBLD_constREAL8
:
663 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeREAL
,
664 FFEINFO_kindtypeREAL8
);
665 ffebld_constantunion_dump (ffebld_constant_union (c
),
666 FFEINFO_basictypeREAL
, FFEINFO_kindtypeREAL8
);
670 #if FFETARGET_okCOMPLEX1
671 case FFEBLD_constCOMPLEX1
:
672 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeCOMPLEX
,
673 FFEINFO_kindtypeREAL1
);
674 ffebld_constantunion_dump (ffebld_constant_union (c
),
675 FFEINFO_basictypeCOMPLEX
, FFEINFO_kindtypeREAL1
);
679 #if FFETARGET_okCOMPLEX2
680 case FFEBLD_constCOMPLEX2
:
681 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeCOMPLEX
,
682 FFEINFO_kindtypeREAL2
);
683 ffebld_constantunion_dump (ffebld_constant_union (c
),
684 FFEINFO_basictypeCOMPLEX
, FFEINFO_kindtypeREAL2
);
688 #if FFETARGET_okCOMPLEX3
689 case FFEBLD_constCOMPLEX3
:
690 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeCOMPLEX
,
691 FFEINFO_kindtypeREAL3
);
692 ffebld_constantunion_dump (ffebld_constant_union (c
),
693 FFEINFO_basictypeCOMPLEX
, FFEINFO_kindtypeREAL3
);
697 #if FFETARGET_okCOMPLEX4
698 case FFEBLD_constCOMPLEX4
:
699 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeCOMPLEX
,
700 FFEINFO_kindtypeREAL4
);
701 ffebld_constantunion_dump (ffebld_constant_union (c
),
702 FFEINFO_basictypeCOMPLEX
, FFEINFO_kindtypeREAL4
);
706 #if FFETARGET_okCOMPLEX5
707 case FFEBLD_constCOMPLEX5
:
708 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeCOMPLEX
,
709 FFEINFO_kindtypeREAL5
);
710 ffebld_constantunion_dump (ffebld_constant_union (c
),
711 FFEINFO_basictypeCOMPLEX
, FFEINFO_kindtypeREAL5
);
715 #if FFETARGET_okCOMPLEX6
716 case FFEBLD_constCOMPLEX6
:
717 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeCOMPLEX
,
718 FFEINFO_kindtypeREAL6
);
719 ffebld_constantunion_dump (ffebld_constant_union (c
),
720 FFEINFO_basictypeCOMPLEX
, FFEINFO_kindtypeREAL6
);
724 #if FFETARGET_okCOMPLEX7
725 case FFEBLD_constCOMPLEX7
:
726 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeCOMPLEX
,
727 FFEINFO_kindtypeREAL7
);
728 ffebld_constantunion_dump (ffebld_constant_union (c
),
729 FFEINFO_basictypeCOMPLEX
, FFEINFO_kindtypeREAL7
);
733 #if FFETARGET_okCOMPLEX8
734 case FFEBLD_constCOMPLEX8
:
735 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeCOMPLEX
,
736 FFEINFO_kindtypeREAL8
);
737 ffebld_constantunion_dump (ffebld_constant_union (c
),
738 FFEINFO_basictypeCOMPLEX
, FFEINFO_kindtypeREAL8
);
742 #if FFETARGET_okCHARACTER1
743 case FFEBLD_constCHARACTER1
:
744 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeCHARACTER
,
745 FFEINFO_kindtypeCHARACTER1
);
746 ffebld_constantunion_dump (ffebld_constant_union (c
),
747 FFEINFO_basictypeCHARACTER
, FFEINFO_kindtypeCHARACTER1
);
751 #if FFETARGET_okCHARACTER2
752 case FFEBLD_constCHARACTER2
:
753 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeCHARACTER
,
754 FFEINFO_kindtypeCHARACTER2
);
755 ffebld_constantunion_dump (ffebld_constant_union (c
),
756 FFEINFO_basictypeCHARACTER
, FFEINFO_kindtypeCHARACTER2
);
760 #if FFETARGET_okCHARACTER3
761 case FFEBLD_constCHARACTER3
:
762 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeCHARACTER
,
763 FFEINFO_kindtypeCHARACTER3
);
764 ffebld_constantunion_dump (ffebld_constant_union (c
),
765 FFEINFO_basictypeCHARACTER
, FFEINFO_kindtypeCHARACTER3
);
769 #if FFETARGET_okCHARACTER4
770 case FFEBLD_constCHARACTER4
:
771 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeCHARACTER
,
772 FFEINFO_kindtypeCHARACTER4
);
773 ffebld_constantunion_dump (ffebld_constant_union (c
),
774 FFEINFO_basictypeCHARACTER
, FFEINFO_kindtypeCHARACTER4
);
778 #if FFETARGET_okCHARACTER5
779 case FFEBLD_constCHARACTER5
:
780 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeCHARACTER
,
781 FFEINFO_kindtypeCHARACTER5
);
782 ffebld_constantunion_dump (ffebld_constant_union (c
),
783 FFEINFO_basictypeCHARACTER
, FFEINFO_kindtypeCHARACTER5
);
787 #if FFETARGET_okCHARACTER6
788 case FFEBLD_constCHARACTER6
:
789 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeCHARACTER
,
790 FFEINFO_kindtypeCHARACTER6
);
791 ffebld_constantunion_dump (ffebld_constant_union (c
),
792 FFEINFO_basictypeCHARACTER
, FFEINFO_kindtypeCHARACTER6
);
796 #if FFETARGET_okCHARACTER7
797 case FFEBLD_constCHARACTER7
:
798 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeCHARACTER
,
799 FFEINFO_kindtypeCHARACTER7
);
800 ffebld_constantunion_dump (ffebld_constant_union (c
),
801 FFEINFO_basictypeCHARACTER
, FFEINFO_kindtypeCHARACTER7
);
805 #if FFETARGET_okCHARACTER8
806 case FFEBLD_constCHARACTER8
:
807 ffebld_dump_prefix (dmpout
, FFEINFO_basictypeCHARACTER
,
808 FFEINFO_kindtypeCHARACTER8
);
809 ffebld_constantunion_dump (ffebld_constant_union (c
),
810 FFEINFO_basictypeCHARACTER
, FFEINFO_kindtypeCHARACTER8
);
814 case FFEBLD_constHOLLERITH
:
815 fprintf (dmpout
, "H%" ffetargetHollerithSize_f
"u/",
816 ffebld_constant_hollerith (c
).length
);
817 ffetarget_print_hollerith (dmpout
, ffebld_constant_hollerith (c
));
820 case FFEBLD_constBINARY_MIL
:
821 fprintf (dmpout
, "BM/");
822 ffetarget_print_binarymil (dmpout
, ffebld_constant_typeless (c
));
825 case FFEBLD_constBINARY_VXT
:
826 fprintf (dmpout
, "BV/");
827 ffetarget_print_binaryvxt (dmpout
, ffebld_constant_typeless (c
));
830 case FFEBLD_constOCTAL_MIL
:
831 fprintf (dmpout
, "OM/");
832 ffetarget_print_octalmil (dmpout
, ffebld_constant_typeless (c
));
835 case FFEBLD_constOCTAL_VXT
:
836 fprintf (dmpout
, "OV/");
837 ffetarget_print_octalvxt (dmpout
, ffebld_constant_typeless (c
));
840 case FFEBLD_constHEX_X_MIL
:
841 fprintf (dmpout
, "XM/");
842 ffetarget_print_hexxmil (dmpout
, ffebld_constant_typeless (c
));
845 case FFEBLD_constHEX_X_VXT
:
846 fprintf (dmpout
, "XV/");
847 ffetarget_print_hexxvxt (dmpout
, ffebld_constant_typeless (c
));
850 case FFEBLD_constHEX_Z_MIL
:
851 fprintf (dmpout
, "ZM/");
852 ffetarget_print_hexzmil (dmpout
, ffebld_constant_typeless (c
));
855 case FFEBLD_constHEX_Z_VXT
:
856 fprintf (dmpout
, "ZV/");
857 ffetarget_print_hexzvxt (dmpout
, ffebld_constant_typeless (c
));
861 assert ("bad constant type" == NULL
);
862 fprintf (dmpout
, "?/?");
868 /* ffebld_constant_is_magical -- Determine if integer is "magical"
871 if (ffebld_constant_is_magical(c))
872 // it is 2**(n-1), where n is # bits in ffetargetIntegerDefault type
873 // (this test is important for 2's-complement machines only). */
876 ffebld_constant_is_magical (ffebldConstant c
)
878 switch (ffebld_constant_type (c
))
880 case FFEBLD_constINTEGERDEFAULT
:
881 return ffetarget_integerdefault_is_magical (ffebld_constant_integer1 (c
));
888 /* Determine if constant is zero. Used to ensure step count
889 for DO loops isn't zero, also to determine if values will
890 be binary zeros, so not entirely portable at this point. */
893 ffebld_constant_is_zero (ffebldConstant c
)
895 switch (ffebld_constant_type (c
))
897 #if FFETARGET_okINTEGER1
898 case FFEBLD_constINTEGER1
:
899 return ffebld_constant_integer1 (c
) == 0;
902 #if FFETARGET_okINTEGER2
903 case FFEBLD_constINTEGER2
:
904 return ffebld_constant_integer2 (c
) == 0;
907 #if FFETARGET_okINTEGER3
908 case FFEBLD_constINTEGER3
:
909 return ffebld_constant_integer3 (c
) == 0;
912 #if FFETARGET_okINTEGER4
913 case FFEBLD_constINTEGER4
:
914 return ffebld_constant_integer4 (c
) == 0;
917 #if FFETARGET_okINTEGER5
918 case FFEBLD_constINTEGER5
:
919 return ffebld_constant_integer5 (c
) == 0;
922 #if FFETARGET_okINTEGER6
923 case FFEBLD_constINTEGER6
:
924 return ffebld_constant_integer6 (c
) == 0;
927 #if FFETARGET_okINTEGER7
928 case FFEBLD_constINTEGER7
:
929 return ffebld_constant_integer7 (c
) == 0;
932 #if FFETARGET_okINTEGER8
933 case FFEBLD_constINTEGER8
:
934 return ffebld_constant_integer8 (c
) == 0;
937 #if FFETARGET_okLOGICAL1
938 case FFEBLD_constLOGICAL1
:
939 return ffebld_constant_logical1 (c
) == 0;
942 #if FFETARGET_okLOGICAL2
943 case FFEBLD_constLOGICAL2
:
944 return ffebld_constant_logical2 (c
) == 0;
947 #if FFETARGET_okLOGICAL3
948 case FFEBLD_constLOGICAL3
:
949 return ffebld_constant_logical3 (c
) == 0;
952 #if FFETARGET_okLOGICAL4
953 case FFEBLD_constLOGICAL4
:
954 return ffebld_constant_logical4 (c
) == 0;
957 #if FFETARGET_okLOGICAL5
958 case FFEBLD_constLOGICAL5
:
959 return ffebld_constant_logical5 (c
) == 0;
962 #if FFETARGET_okLOGICAL6
963 case FFEBLD_constLOGICAL6
:
964 return ffebld_constant_logical6 (c
) == 0;
967 #if FFETARGET_okLOGICAL7
968 case FFEBLD_constLOGICAL7
:
969 return ffebld_constant_logical7 (c
) == 0;
972 #if FFETARGET_okLOGICAL8
973 case FFEBLD_constLOGICAL8
:
974 return ffebld_constant_logical8 (c
) == 0;
977 #if FFETARGET_okREAL1
978 case FFEBLD_constREAL1
:
979 return ffetarget_iszero_real1 (ffebld_constant_real1 (c
));
982 #if FFETARGET_okREAL2
983 case FFEBLD_constREAL2
:
984 return ffetarget_iszero_real2 (ffebld_constant_real2 (c
));
987 #if FFETARGET_okREAL3
988 case FFEBLD_constREAL3
:
989 return ffetarget_iszero_real3 (ffebld_constant_real3 (c
));
992 #if FFETARGET_okREAL4
993 case FFEBLD_constREAL4
:
994 return ffetarget_iszero_real4 (ffebld_constant_real4 (c
));
997 #if FFETARGET_okREAL5
998 case FFEBLD_constREAL5
:
999 return ffetarget_iszero_real5 (ffebld_constant_real5 (c
));
1002 #if FFETARGET_okREAL6
1003 case FFEBLD_constREAL6
:
1004 return ffetarget_iszero_real6 (ffebld_constant_real6 (c
));
1007 #if FFETARGET_okREAL7
1008 case FFEBLD_constREAL7
:
1009 return ffetarget_iszero_real7 (ffebld_constant_real7 (c
));
1012 #if FFETARGET_okREAL8
1013 case FFEBLD_constREAL8
:
1014 return ffetarget_iszero_real8 (ffebld_constant_real8 (c
));
1017 #if FFETARGET_okCOMPLEX1
1018 case FFEBLD_constCOMPLEX1
:
1019 return ffetarget_iszero_real1 (ffebld_constant_complex1 (c
).real
)
1020 && ffetarget_iszero_real1 (ffebld_constant_complex1 (c
).imaginary
);
1023 #if FFETARGET_okCOMPLEX2
1024 case FFEBLD_constCOMPLEX2
:
1025 return ffetarget_iszero_real2 (ffebld_constant_complex2 (c
).real
)
1026 && ffetarget_iszero_real2 (ffebld_constant_complex2 (c
).imaginary
);
1029 #if FFETARGET_okCOMPLEX3
1030 case FFEBLD_constCOMPLEX3
:
1031 return ffetarget_iszero_real3 (ffebld_constant_complex3 (c
).real
)
1032 && ffetarget_iszero_real3 (ffebld_constant_complex3 (c
).imaginary
);
1035 #if FFETARGET_okCOMPLEX4
1036 case FFEBLD_constCOMPLEX4
:
1037 return ffetarget_iszero_real4 (ffebld_constant_complex4 (c
).real
)
1038 && ffetarget_iszero_real4 (ffebld_constant_complex4 (c
).imaginary
);
1041 #if FFETARGET_okCOMPLEX5
1042 case FFEBLD_constCOMPLEX5
:
1043 return ffetarget_iszero_real5 (ffebld_constant_complex5 (c
).real
)
1044 && ffetarget_iszero_real5 (ffebld_constant_complex5 (c
).imaginary
);
1047 #if FFETARGET_okCOMPLEX6
1048 case FFEBLD_constCOMPLEX6
:
1049 return ffetarget_iszero_real6 (ffebld_constant_complex6 (c
).real
)
1050 && ffetarget_iszero_real6 (ffebld_constant_complex6 (c
).imaginary
);
1053 #if FFETARGET_okCOMPLEX7
1054 case FFEBLD_constCOMPLEX7
:
1055 return ffetarget_iszero_real7 (ffebld_constant_complex7 (c
).real
)
1056 && ffetarget_iszero_real7 (ffebld_constant_complex7 (c
).imaginary
);
1059 #if FFETARGET_okCOMPLEX8
1060 case FFEBLD_constCOMPLEX8
:
1061 return ffetarget_iszero_real8 (ffebld_constant_complex8 (c
).real
)
1062 && ffetarget_iszero_real8 (ffebld_constant_complex8 (c
).imaginary
);
1065 #if FFETARGET_okCHARACTER1
1066 case FFEBLD_constCHARACTER1
:
1067 return ffetarget_iszero_character1 (ffebld_constant_character1 (c
));
1070 #if FFETARGET_okCHARACTER2 || FFETARGET_okCHARACTER3 /* ... */
1071 #error "no support for these!!"
1074 case FFEBLD_constHOLLERITH
:
1075 return ffetarget_iszero_hollerith (ffebld_constant_hollerith (c
));
1077 case FFEBLD_constBINARY_MIL
:
1078 case FFEBLD_constBINARY_VXT
:
1079 case FFEBLD_constOCTAL_MIL
:
1080 case FFEBLD_constOCTAL_VXT
:
1081 case FFEBLD_constHEX_X_MIL
:
1082 case FFEBLD_constHEX_X_VXT
:
1083 case FFEBLD_constHEX_Z_MIL
:
1084 case FFEBLD_constHEX_Z_VXT
:
1085 return ffetarget_iszero_typeless (ffebld_constant_typeless (c
));
1092 /* ffebld_constant_new_character1 -- Return character1 constant object from token
1096 #if FFETARGET_okCHARACTER1
1098 ffebld_constant_new_character1 (ffelexToken t
)
1100 ffetargetCharacter1 val
;
1102 ffetarget_character1 (&val
, t
, ffebld_constant_pool());
1103 return ffebld_constant_new_character1_val (val
);
1107 /* ffebld_constant_new_character1_val -- Return an character1 constant object
1111 #if FFETARGET_okCHARACTER1
1113 ffebld_constant_new_character1_val (ffetargetCharacter1 val
)
1119 ffetarget_verify_character1 (ffebld_constant_pool(), val
);
1121 for (c
= (ffebldConstant
) &ffebld_constant_character1_
;
1125 malloc_verify_kp (ffebld_constant_pool(),
1127 sizeof (*(c
->next
)));
1128 ffetarget_verify_character1 (ffebld_constant_pool(),
1129 ffebld_constant_character1 (c
->next
));
1130 cmp
= ffetarget_cmp_character1 (val
,
1131 ffebld_constant_character1 (c
->next
));
1138 nc
= malloc_new_kp (ffebld_constant_pool(),
1139 "FFEBLD_constCHARACTER1",
1142 nc
->consttype
= FFEBLD_constCHARACTER1
;
1143 nc
->u
.character1
= val
;
1144 #ifdef FFECOM_constantHOOK
1145 nc
->hook
= FFECOM_constantNULL
;
1153 /* ffebld_constant_new_complex1 -- Return complex1 constant object from token
1157 #if FFETARGET_okCOMPLEX1
1159 ffebld_constant_new_complex1 (ffebldConstant real
,
1160 ffebldConstant imaginary
)
1162 ffetargetComplex1 val
;
1164 val
.real
= ffebld_constant_real1 (real
);
1165 val
.imaginary
= ffebld_constant_real1 (imaginary
);
1166 return ffebld_constant_new_complex1_val (val
);
1170 /* ffebld_constant_new_complex1_val -- Return a complex1 constant object
1174 #if FFETARGET_okCOMPLEX1
1176 ffebld_constant_new_complex1_val (ffetargetComplex1 val
)
1182 for (c
= (ffebldConstant
) &ffebld_constant_complex1_
;
1186 cmp
= ffetarget_cmp_real1 (val
.real
, ffebld_constant_complex1 (c
->next
).real
);
1188 cmp
= ffetarget_cmp_real1 (val
.imaginary
,
1189 ffebld_constant_complex1 (c
->next
).imaginary
);
1196 nc
= malloc_new_kp (ffebld_constant_pool(),
1197 "FFEBLD_constCOMPLEX1",
1200 nc
->consttype
= FFEBLD_constCOMPLEX1
;
1201 nc
->u
.complex1
= val
;
1202 #ifdef FFECOM_constantHOOK
1203 nc
->hook
= FFECOM_constantNULL
;
1211 /* ffebld_constant_new_complex2 -- Return complex2 constant object from token
1215 #if FFETARGET_okCOMPLEX2
1217 ffebld_constant_new_complex2 (ffebldConstant real
,
1218 ffebldConstant imaginary
)
1220 ffetargetComplex2 val
;
1222 val
.real
= ffebld_constant_real2 (real
);
1223 val
.imaginary
= ffebld_constant_real2 (imaginary
);
1224 return ffebld_constant_new_complex2_val (val
);
1228 /* ffebld_constant_new_complex2_val -- Return a complex2 constant object
1232 #if FFETARGET_okCOMPLEX2
1234 ffebld_constant_new_complex2_val (ffetargetComplex2 val
)
1240 for (c
= (ffebldConstant
) &ffebld_constant_complex2_
;
1244 cmp
= ffetarget_cmp_real2 (val
.real
, ffebld_constant_complex2 (c
->next
).real
);
1246 cmp
= ffetarget_cmp_real2 (val
.imaginary
,
1247 ffebld_constant_complex2 (c
->next
).imaginary
);
1254 nc
= malloc_new_kp (ffebld_constant_pool(),
1255 "FFEBLD_constCOMPLEX2",
1258 nc
->consttype
= FFEBLD_constCOMPLEX2
;
1259 nc
->u
.complex2
= val
;
1260 #ifdef FFECOM_constantHOOK
1261 nc
->hook
= FFECOM_constantNULL
;
1269 /* ffebld_constant_new_hollerith -- Return hollerith constant object from token
1274 ffebld_constant_new_hollerith (ffelexToken t
)
1276 ffetargetHollerith val
;
1278 ffetarget_hollerith (&val
, t
, ffebld_constant_pool());
1279 return ffebld_constant_new_hollerith_val (val
);
1282 /* ffebld_constant_new_hollerith_val -- Return an hollerith constant object
1287 ffebld_constant_new_hollerith_val (ffetargetHollerith val
)
1293 for (c
= (ffebldConstant
) &ffebld_constant_hollerith_
;
1297 cmp
= ffetarget_cmp_hollerith (val
, ffebld_constant_hollerith (c
->next
));
1304 nc
= malloc_new_kp (ffebld_constant_pool(),
1305 "FFEBLD_constHOLLERITH",
1308 nc
->consttype
= FFEBLD_constHOLLERITH
;
1309 nc
->u
.hollerith
= val
;
1310 #ifdef FFECOM_constantHOOK
1311 nc
->hook
= FFECOM_constantNULL
;
1318 /* ffebld_constant_new_integer1 -- Return integer1 constant object from token
1322 Parses the token as a decimal integer constant, thus it must be an
1323 FFELEX_typeNUMBER. */
1325 #if FFETARGET_okINTEGER1
1327 ffebld_constant_new_integer1 (ffelexToken t
)
1329 ffetargetInteger1 val
;
1331 assert (ffelex_token_type (t
) == FFELEX_typeNUMBER
);
1333 ffetarget_integer1 (&val
, t
);
1334 return ffebld_constant_new_integer1_val (val
);
1338 /* ffebld_constant_new_integer1_val -- Return an integer1 constant object
1342 #if FFETARGET_okINTEGER1
1344 ffebld_constant_new_integer1_val (ffetargetInteger1 val
)
1350 for (c
= (ffebldConstant
) &ffebld_constant_integer1_
;
1354 cmp
= ffetarget_cmp_integer1 (val
, ffebld_constant_integer1 (c
->next
));
1361 nc
= malloc_new_kp (ffebld_constant_pool(),
1362 "FFEBLD_constINTEGER1",
1365 nc
->consttype
= FFEBLD_constINTEGER1
;
1366 nc
->u
.integer1
= val
;
1367 #ifdef FFECOM_constantHOOK
1368 nc
->hook
= FFECOM_constantNULL
;
1376 /* ffebld_constant_new_integer2_val -- Return an integer2 constant object
1380 #if FFETARGET_okINTEGER2
1382 ffebld_constant_new_integer2_val (ffetargetInteger2 val
)
1388 for (c
= (ffebldConstant
) &ffebld_constant_integer2_
;
1392 cmp
= ffetarget_cmp_integer2 (val
, ffebld_constant_integer2 (c
->next
));
1399 nc
= malloc_new_kp (ffebld_constant_pool(),
1400 "FFEBLD_constINTEGER2",
1403 nc
->consttype
= FFEBLD_constINTEGER2
;
1404 nc
->u
.integer2
= val
;
1405 #ifdef FFECOM_constantHOOK
1406 nc
->hook
= FFECOM_constantNULL
;
1414 /* ffebld_constant_new_integer3_val -- Return an integer3 constant object
1418 #if FFETARGET_okINTEGER3
1420 ffebld_constant_new_integer3_val (ffetargetInteger3 val
)
1426 for (c
= (ffebldConstant
) &ffebld_constant_integer3_
;
1430 cmp
= ffetarget_cmp_integer3 (val
, ffebld_constant_integer3 (c
->next
));
1437 nc
= malloc_new_kp (ffebld_constant_pool(),
1438 "FFEBLD_constINTEGER3",
1441 nc
->consttype
= FFEBLD_constINTEGER3
;
1442 nc
->u
.integer3
= val
;
1443 #ifdef FFECOM_constantHOOK
1444 nc
->hook
= FFECOM_constantNULL
;
1452 /* ffebld_constant_new_integer4_val -- Return an integer4 constant object
1456 #if FFETARGET_okINTEGER4
1458 ffebld_constant_new_integer4_val (ffetargetInteger4 val
)
1464 for (c
= (ffebldConstant
) &ffebld_constant_integer4_
;
1468 cmp
= ffetarget_cmp_integer4 (val
, ffebld_constant_integer4 (c
->next
));
1475 nc
= malloc_new_kp (ffebld_constant_pool(),
1476 "FFEBLD_constINTEGER4",
1479 nc
->consttype
= FFEBLD_constINTEGER4
;
1480 nc
->u
.integer4
= val
;
1481 #ifdef FFECOM_constantHOOK
1482 nc
->hook
= FFECOM_constantNULL
;
1490 /* ffebld_constant_new_integerbinary -- Return binary constant object from token
1494 Parses the token as a binary integer constant, thus it must be an
1495 FFELEX_typeNUMBER. */
1498 ffebld_constant_new_integerbinary (ffelexToken t
)
1500 ffetargetIntegerDefault val
;
1502 assert ((ffelex_token_type (t
) == FFELEX_typeNAME
)
1503 || (ffelex_token_type (t
) == FFELEX_typeNUMBER
));
1505 ffetarget_integerbinary (&val
, t
);
1506 return ffebld_constant_new_integerdefault_val (val
);
1509 /* ffebld_constant_new_integerhex -- Return hex constant object from token
1513 Parses the token as a hex integer constant, thus it must be an
1514 FFELEX_typeNUMBER. */
1517 ffebld_constant_new_integerhex (ffelexToken t
)
1519 ffetargetIntegerDefault val
;
1521 assert ((ffelex_token_type (t
) == FFELEX_typeNAME
)
1522 || (ffelex_token_type (t
) == FFELEX_typeNUMBER
));
1524 ffetarget_integerhex (&val
, t
);
1525 return ffebld_constant_new_integerdefault_val (val
);
1528 /* ffebld_constant_new_integeroctal -- Return octal constant object from token
1532 Parses the token as a octal integer constant, thus it must be an
1533 FFELEX_typeNUMBER. */
1536 ffebld_constant_new_integeroctal (ffelexToken t
)
1538 ffetargetIntegerDefault val
;
1540 assert ((ffelex_token_type (t
) == FFELEX_typeNAME
)
1541 || (ffelex_token_type (t
) == FFELEX_typeNUMBER
));
1543 ffetarget_integeroctal (&val
, t
);
1544 return ffebld_constant_new_integerdefault_val (val
);
1547 /* ffebld_constant_new_logical1 -- Return logical1 constant object from token
1551 Parses the token as a decimal logical constant, thus it must be an
1552 FFELEX_typeNUMBER. */
1554 #if FFETARGET_okLOGICAL1
1556 ffebld_constant_new_logical1 (bool truth
)
1558 ffetargetLogical1 val
;
1560 ffetarget_logical1 (&val
, truth
);
1561 return ffebld_constant_new_logical1_val (val
);
1565 /* ffebld_constant_new_logical1_val -- Return a logical1 constant object
1569 #if FFETARGET_okLOGICAL1
1571 ffebld_constant_new_logical1_val (ffetargetLogical1 val
)
1577 for (c
= (ffebldConstant
) &ffebld_constant_logical1_
;
1581 cmp
= ffetarget_cmp_logical1 (val
, ffebld_constant_logical1 (c
->next
));
1588 nc
= malloc_new_kp (ffebld_constant_pool(),
1589 "FFEBLD_constLOGICAL1",
1592 nc
->consttype
= FFEBLD_constLOGICAL1
;
1593 nc
->u
.logical1
= val
;
1594 #ifdef FFECOM_constantHOOK
1595 nc
->hook
= FFECOM_constantNULL
;
1603 /* ffebld_constant_new_logical2_val -- Return a logical2 constant object
1607 #if FFETARGET_okLOGICAL2
1609 ffebld_constant_new_logical2_val (ffetargetLogical2 val
)
1615 for (c
= (ffebldConstant
) &ffebld_constant_logical2_
;
1619 cmp
= ffetarget_cmp_logical2 (val
, ffebld_constant_logical2 (c
->next
));
1626 nc
= malloc_new_kp (ffebld_constant_pool(),
1627 "FFEBLD_constLOGICAL2",
1630 nc
->consttype
= FFEBLD_constLOGICAL2
;
1631 nc
->u
.logical2
= val
;
1632 #ifdef FFECOM_constantHOOK
1633 nc
->hook
= FFECOM_constantNULL
;
1641 /* ffebld_constant_new_logical3_val -- Return a logical3 constant object
1645 #if FFETARGET_okLOGICAL3
1647 ffebld_constant_new_logical3_val (ffetargetLogical3 val
)
1653 for (c
= (ffebldConstant
) &ffebld_constant_logical3_
;
1657 cmp
= ffetarget_cmp_logical3 (val
, ffebld_constant_logical3 (c
->next
));
1664 nc
= malloc_new_kp (ffebld_constant_pool(),
1665 "FFEBLD_constLOGICAL3",
1668 nc
->consttype
= FFEBLD_constLOGICAL3
;
1669 nc
->u
.logical3
= val
;
1670 #ifdef FFECOM_constantHOOK
1671 nc
->hook
= FFECOM_constantNULL
;
1679 /* ffebld_constant_new_logical4_val -- Return a logical4 constant object
1683 #if FFETARGET_okLOGICAL4
1685 ffebld_constant_new_logical4_val (ffetargetLogical4 val
)
1691 for (c
= (ffebldConstant
) &ffebld_constant_logical4_
;
1695 cmp
= ffetarget_cmp_logical4 (val
, ffebld_constant_logical4 (c
->next
));
1702 nc
= malloc_new_kp (ffebld_constant_pool(),
1703 "FFEBLD_constLOGICAL4",
1706 nc
->consttype
= FFEBLD_constLOGICAL4
;
1707 nc
->u
.logical4
= val
;
1708 #ifdef FFECOM_constantHOOK
1709 nc
->hook
= FFECOM_constantNULL
;
1717 /* ffebld_constant_new_real1 -- Return real1 constant object from token
1721 #if FFETARGET_okREAL1
1723 ffebld_constant_new_real1 (ffelexToken integer
, ffelexToken decimal
,
1724 ffelexToken fraction
, ffelexToken exponent
, ffelexToken exponent_sign
,
1725 ffelexToken exponent_digits
)
1729 ffetarget_real1 (&val
,
1730 integer
, decimal
, fraction
, exponent
, exponent_sign
, exponent_digits
);
1731 return ffebld_constant_new_real1_val (val
);
1735 /* ffebld_constant_new_real1_val -- Return an real1 constant object
1739 #if FFETARGET_okREAL1
1741 ffebld_constant_new_real1_val (ffetargetReal1 val
)
1747 for (c
= (ffebldConstant
) &ffebld_constant_real1_
;
1751 cmp
= ffetarget_cmp_real1 (val
, ffebld_constant_real1 (c
->next
));
1758 nc
= malloc_new_kp (ffebld_constant_pool(),
1759 "FFEBLD_constREAL1",
1762 nc
->consttype
= FFEBLD_constREAL1
;
1764 #ifdef FFECOM_constantHOOK
1765 nc
->hook
= FFECOM_constantNULL
;
1773 /* ffebld_constant_new_real2 -- Return real2 constant object from token
1777 #if FFETARGET_okREAL2
1779 ffebld_constant_new_real2 (ffelexToken integer
, ffelexToken decimal
,
1780 ffelexToken fraction
, ffelexToken exponent
, ffelexToken exponent_sign
,
1781 ffelexToken exponent_digits
)
1785 ffetarget_real2 (&val
,
1786 integer
, decimal
, fraction
, exponent
, exponent_sign
, exponent_digits
);
1787 return ffebld_constant_new_real2_val (val
);
1791 /* ffebld_constant_new_real2_val -- Return an real2 constant object
1795 #if FFETARGET_okREAL2
1797 ffebld_constant_new_real2_val (ffetargetReal2 val
)
1803 for (c
= (ffebldConstant
) &ffebld_constant_real2_
;
1807 cmp
= ffetarget_cmp_real2 (val
, ffebld_constant_real2 (c
->next
));
1814 nc
= malloc_new_kp (ffebld_constant_pool(),
1815 "FFEBLD_constREAL2",
1818 nc
->consttype
= FFEBLD_constREAL2
;
1820 #ifdef FFECOM_constantHOOK
1821 nc
->hook
= FFECOM_constantNULL
;
1829 /* ffebld_constant_new_typeless_bm -- Return typeless constant object from token
1833 Parses the token as a decimal integer constant, thus it must be an
1834 FFELEX_typeNUMBER. */
1837 ffebld_constant_new_typeless_bm (ffelexToken t
)
1839 ffetargetTypeless val
;
1841 ffetarget_binarymil (&val
, t
);
1842 return ffebld_constant_new_typeless_val (FFEBLD_constBINARY_MIL
, val
);
1845 /* ffebld_constant_new_typeless_bv -- Return typeless constant object from token
1849 Parses the token as a decimal integer constant, thus it must be an
1850 FFELEX_typeNUMBER. */
1853 ffebld_constant_new_typeless_bv (ffelexToken t
)
1855 ffetargetTypeless val
;
1857 ffetarget_binaryvxt (&val
, t
);
1858 return ffebld_constant_new_typeless_val (FFEBLD_constBINARY_VXT
, val
);
1861 /* ffebld_constant_new_typeless_hxm -- Return typeless constant object from token
1865 Parses the token as a decimal integer constant, thus it must be an
1866 FFELEX_typeNUMBER. */
1869 ffebld_constant_new_typeless_hxm (ffelexToken t
)
1871 ffetargetTypeless val
;
1873 ffetarget_hexxmil (&val
, t
);
1874 return ffebld_constant_new_typeless_val (FFEBLD_constHEX_X_MIL
, val
);
1877 /* ffebld_constant_new_typeless_hxv -- Return typeless constant object from token
1881 Parses the token as a decimal integer constant, thus it must be an
1882 FFELEX_typeNUMBER. */
1885 ffebld_constant_new_typeless_hxv (ffelexToken t
)
1887 ffetargetTypeless val
;
1889 ffetarget_hexxvxt (&val
, t
);
1890 return ffebld_constant_new_typeless_val (FFEBLD_constHEX_X_VXT
, val
);
1893 /* ffebld_constant_new_typeless_hzm -- Return typeless constant object from token
1897 Parses the token as a decimal integer constant, thus it must be an
1898 FFELEX_typeNUMBER. */
1901 ffebld_constant_new_typeless_hzm (ffelexToken t
)
1903 ffetargetTypeless val
;
1905 ffetarget_hexzmil (&val
, t
);
1906 return ffebld_constant_new_typeless_val (FFEBLD_constHEX_Z_MIL
, val
);
1909 /* ffebld_constant_new_typeless_hzv -- Return typeless constant object from token
1913 Parses the token as a decimal integer constant, thus it must be an
1914 FFELEX_typeNUMBER. */
1917 ffebld_constant_new_typeless_hzv (ffelexToken t
)
1919 ffetargetTypeless val
;
1921 ffetarget_hexzvxt (&val
, t
);
1922 return ffebld_constant_new_typeless_val (FFEBLD_constHEX_Z_VXT
, val
);
1925 /* ffebld_constant_new_typeless_om -- Return typeless constant object from token
1929 Parses the token as a decimal integer constant, thus it must be an
1930 FFELEX_typeNUMBER. */
1933 ffebld_constant_new_typeless_om (ffelexToken t
)
1935 ffetargetTypeless val
;
1937 ffetarget_octalmil (&val
, t
);
1938 return ffebld_constant_new_typeless_val (FFEBLD_constOCTAL_MIL
, val
);
1941 /* ffebld_constant_new_typeless_ov -- Return typeless constant object from token
1945 Parses the token as a decimal integer constant, thus it must be an
1946 FFELEX_typeNUMBER. */
1949 ffebld_constant_new_typeless_ov (ffelexToken t
)
1951 ffetargetTypeless val
;
1953 ffetarget_octalvxt (&val
, t
);
1954 return ffebld_constant_new_typeless_val (FFEBLD_constOCTAL_VXT
, val
);
1957 /* ffebld_constant_new_typeless_val -- Return a typeless constant object
1962 ffebld_constant_new_typeless_val (ffebldConst type
, ffetargetTypeless val
)
1968 for (c
= (ffebldConstant
) &ffebld_constant_typeless_
[type
1969 - FFEBLD_constTYPELESS_FIRST
];
1973 cmp
= ffetarget_cmp_typeless (val
, ffebld_constant_typeless (c
->next
));
1980 nc
= malloc_new_kp (ffebld_constant_pool(),
1981 "FFEBLD_constTYPELESS",
1984 nc
->consttype
= type
;
1985 nc
->u
.typeless
= val
;
1986 #ifdef FFECOM_constantHOOK
1987 nc
->hook
= FFECOM_constantNULL
;
1994 /* ffebld_constantarray_dump -- Display summary of array's contents
1996 ffebldConstantArray a;
1997 ffeinfoBasictype bt;
1999 ffetargetOffset size;
2000 ffebld_constant_dump(a,bt,kt,size,NULL);
2002 Displays the constant array in summary form. The fifth argument, if
2003 supplied, is an ffebit object that is consulted as to whether the
2004 constant at a particular offset is valid. */
2006 #if FFECOM_targetCURRENT == FFECOM_targetFFE
2008 ffebld_constantarray_dump (ffebldConstantArray array
, ffeinfoBasictype bt
,
2009 ffeinfoKindtype kt
, ffetargetOffset size
, ffebit bits
)
2014 ffebld_dump_prefix (dmpout
, bt
, kt
);
2016 fprintf (dmpout
, "\\(");
2020 for (i
= 0; i
< size
; ++i
)
2022 ffebld_constantunion_dump (ffebld_constantarray_get (array
, bt
, kt
, i
), bt
,
2025 fputc (',', dmpout
);
2032 ffetargetOffset offset
= 0;
2036 ffebit_test (bits
, offset
, &value
, &length
);
2037 if (value
&& (length
!= 0))
2040 fprintf (dmpout
, "[%" ffetargetOffset_f
"d]:", offset
);
2043 "[%" ffetargetOffset_f
"u..%" ffetargetOffset_f
"d]:",
2044 offset
, offset
+ (ffetargetOffset
) length
- 1);
2045 for (j
= 0; j
< length
; ++j
, ++offset
)
2047 ffebld_constantunion_dump (ffebld_constantarray_get (array
, bt
, kt
,
2049 if (j
!= length
- 1)
2050 fputc (',', dmpout
);
2052 fprintf (dmpout
, ";");
2057 while (length
!= 0);
2059 fprintf (dmpout
, "\\)");
2064 /* ffebld_constantarray_get -- Get a value from an array of constants
2069 ffebld_constantarray_get (ffebldConstantArray array
, ffeinfoBasictype bt
,
2070 ffeinfoKindtype kt
, ffetargetOffset offset
)
2072 ffebldConstantUnion u
;
2076 case FFEINFO_basictypeINTEGER
:
2079 #if FFETARGET_okINTEGER1
2080 case FFEINFO_kindtypeINTEGER1
:
2081 u
.integer1
= *(array
.integer1
+ offset
);
2085 #if FFETARGET_okINTEGER2
2086 case FFEINFO_kindtypeINTEGER2
:
2087 u
.integer2
= *(array
.integer2
+ offset
);
2091 #if FFETARGET_okINTEGER3
2092 case FFEINFO_kindtypeINTEGER3
:
2093 u
.integer3
= *(array
.integer3
+ offset
);
2097 #if FFETARGET_okINTEGER4
2098 case FFEINFO_kindtypeINTEGER4
:
2099 u
.integer4
= *(array
.integer4
+ offset
);
2103 #if FFETARGET_okINTEGER5
2104 case FFEINFO_kindtypeINTEGER5
:
2105 u
.integer5
= *(array
.integer5
+ offset
);
2109 #if FFETARGET_okINTEGER6
2110 case FFEINFO_kindtypeINTEGER6
:
2111 u
.integer6
= *(array
.integer6
+ offset
);
2115 #if FFETARGET_okINTEGER7
2116 case FFEINFO_kindtypeINTEGER7
:
2117 u
.integer7
= *(array
.integer7
+ offset
);
2121 #if FFETARGET_okINTEGER8
2122 case FFEINFO_kindtypeINTEGER8
:
2123 u
.integer8
= *(array
.integer8
+ offset
);
2128 assert ("bad INTEGER kindtype" == NULL
);
2133 case FFEINFO_basictypeLOGICAL
:
2136 #if FFETARGET_okLOGICAL1
2137 case FFEINFO_kindtypeLOGICAL1
:
2138 u
.logical1
= *(array
.logical1
+ offset
);
2142 #if FFETARGET_okLOGICAL2
2143 case FFEINFO_kindtypeLOGICAL2
:
2144 u
.logical2
= *(array
.logical2
+ offset
);
2148 #if FFETARGET_okLOGICAL3
2149 case FFEINFO_kindtypeLOGICAL3
:
2150 u
.logical3
= *(array
.logical3
+ offset
);
2154 #if FFETARGET_okLOGICAL4
2155 case FFEINFO_kindtypeLOGICAL4
:
2156 u
.logical4
= *(array
.logical4
+ offset
);
2160 #if FFETARGET_okLOGICAL5
2161 case FFEINFO_kindtypeLOGICAL5
:
2162 u
.logical5
= *(array
.logical5
+ offset
);
2166 #if FFETARGET_okLOGICAL6
2167 case FFEINFO_kindtypeLOGICAL6
:
2168 u
.logical6
= *(array
.logical6
+ offset
);
2172 #if FFETARGET_okLOGICAL7
2173 case FFEINFO_kindtypeLOGICAL7
:
2174 u
.logical7
= *(array
.logical7
+ offset
);
2178 #if FFETARGET_okLOGICAL8
2179 case FFEINFO_kindtypeLOGICAL8
:
2180 u
.logical8
= *(array
.logical8
+ offset
);
2185 assert ("bad LOGICAL kindtype" == NULL
);
2190 case FFEINFO_basictypeREAL
:
2193 #if FFETARGET_okREAL1
2194 case FFEINFO_kindtypeREAL1
:
2195 u
.real1
= *(array
.real1
+ offset
);
2199 #if FFETARGET_okREAL2
2200 case FFEINFO_kindtypeREAL2
:
2201 u
.real2
= *(array
.real2
+ offset
);
2205 #if FFETARGET_okREAL3
2206 case FFEINFO_kindtypeREAL3
:
2207 u
.real3
= *(array
.real3
+ offset
);
2211 #if FFETARGET_okREAL4
2212 case FFEINFO_kindtypeREAL4
:
2213 u
.real4
= *(array
.real4
+ offset
);
2217 #if FFETARGET_okREAL5
2218 case FFEINFO_kindtypeREAL5
:
2219 u
.real5
= *(array
.real5
+ offset
);
2223 #if FFETARGET_okREAL6
2224 case FFEINFO_kindtypeREAL6
:
2225 u
.real6
= *(array
.real6
+ offset
);
2229 #if FFETARGET_okREAL7
2230 case FFEINFO_kindtypeREAL7
:
2231 u
.real7
= *(array
.real7
+ offset
);
2235 #if FFETARGET_okREAL8
2236 case FFEINFO_kindtypeREAL8
:
2237 u
.real8
= *(array
.real8
+ offset
);
2242 assert ("bad REAL kindtype" == NULL
);
2247 case FFEINFO_basictypeCOMPLEX
:
2250 #if FFETARGET_okCOMPLEX1
2251 case FFEINFO_kindtypeREAL1
:
2252 u
.complex1
= *(array
.complex1
+ offset
);
2256 #if FFETARGET_okCOMPLEX2
2257 case FFEINFO_kindtypeREAL2
:
2258 u
.complex2
= *(array
.complex2
+ offset
);
2262 #if FFETARGET_okCOMPLEX3
2263 case FFEINFO_kindtypeREAL3
:
2264 u
.complex3
= *(array
.complex3
+ offset
);
2268 #if FFETARGET_okCOMPLEX4
2269 case FFEINFO_kindtypeREAL4
:
2270 u
.complex4
= *(array
.complex4
+ offset
);
2274 #if FFETARGET_okCOMPLEX5
2275 case FFEINFO_kindtypeREAL5
:
2276 u
.complex5
= *(array
.complex5
+ offset
);
2280 #if FFETARGET_okCOMPLEX6
2281 case FFEINFO_kindtypeREAL6
:
2282 u
.complex6
= *(array
.complex6
+ offset
);
2286 #if FFETARGET_okCOMPLEX7
2287 case FFEINFO_kindtypeREAL7
:
2288 u
.complex7
= *(array
.complex7
+ offset
);
2292 #if FFETARGET_okCOMPLEX8
2293 case FFEINFO_kindtypeREAL8
:
2294 u
.complex8
= *(array
.complex8
+ offset
);
2299 assert ("bad COMPLEX kindtype" == NULL
);
2304 case FFEINFO_basictypeCHARACTER
:
2307 #if FFETARGET_okCHARACTER1
2308 case FFEINFO_kindtypeCHARACTER1
:
2309 u
.character1
.length
= 1;
2310 u
.character1
.text
= array
.character1
+ offset
;
2314 #if FFETARGET_okCHARACTER2
2315 case FFEINFO_kindtypeCHARACTER2
:
2316 u
.character2
.length
= 1;
2317 u
.character2
.text
= array
.character2
+ offset
;
2321 #if FFETARGET_okCHARACTER3
2322 case FFEINFO_kindtypeCHARACTER3
:
2323 u
.character3
.length
= 1;
2324 u
.character3
.text
= array
.character3
+ offset
;
2328 #if FFETARGET_okCHARACTER4
2329 case FFEINFO_kindtypeCHARACTER4
:
2330 u
.character4
.length
= 1;
2331 u
.character4
.text
= array
.character4
+ offset
;
2335 #if FFETARGET_okCHARACTER5
2336 case FFEINFO_kindtypeCHARACTER5
:
2337 u
.character5
.length
= 1;
2338 u
.character5
.text
= array
.character5
+ offset
;
2342 #if FFETARGET_okCHARACTER6
2343 case FFEINFO_kindtypeCHARACTER6
:
2344 u
.character6
.length
= 1;
2345 u
.character6
.text
= array
.character6
+ offset
;
2349 #if FFETARGET_okCHARACTER7
2350 case FFEINFO_kindtypeCHARACTER7
:
2351 u
.character7
.length
= 1;
2352 u
.character7
.text
= array
.character7
+ offset
;
2356 #if FFETARGET_okCHARACTER8
2357 case FFEINFO_kindtypeCHARACTER8
:
2358 u
.character8
.length
= 1;
2359 u
.character8
.text
= array
.character8
+ offset
;
2364 assert ("bad CHARACTER kindtype" == NULL
);
2370 assert ("bad basictype" == NULL
);
2377 /* ffebld_constantarray_new -- Make an array of constants
2382 ffebld_constantarray_new (ffeinfoBasictype bt
,
2383 ffeinfoKindtype kt
, ffetargetOffset size
)
2385 ffebldConstantArray ptr
;
2389 case FFEINFO_basictypeINTEGER
:
2392 #if FFETARGET_okINTEGER1
2393 case FFEINFO_kindtypeINTEGER1
:
2394 ptr
.integer1
= malloc_new_zkp (ffebld_constant_pool(),
2395 "ffebldConstantArray",
2396 size
*= sizeof (ffetargetInteger1
),
2401 #if FFETARGET_okINTEGER2
2402 case FFEINFO_kindtypeINTEGER2
:
2403 ptr
.integer2
= malloc_new_zkp (ffebld_constant_pool(),
2404 "ffebldConstantArray",
2405 size
*= sizeof (ffetargetInteger2
),
2410 #if FFETARGET_okINTEGER3
2411 case FFEINFO_kindtypeINTEGER3
:
2412 ptr
.integer3
= malloc_new_zkp (ffebld_constant_pool(),
2413 "ffebldConstantArray",
2414 size
*= sizeof (ffetargetInteger3
),
2419 #if FFETARGET_okINTEGER4
2420 case FFEINFO_kindtypeINTEGER4
:
2421 ptr
.integer4
= malloc_new_zkp (ffebld_constant_pool(),
2422 "ffebldConstantArray",
2423 size
*= sizeof (ffetargetInteger4
),
2428 #if FFETARGET_okINTEGER5
2429 case FFEINFO_kindtypeINTEGER5
:
2430 ptr
.integer5
= malloc_new_zkp (ffebld_constant_pool(),
2431 "ffebldConstantArray",
2432 size
*= sizeof (ffetargetInteger5
),
2437 #if FFETARGET_okINTEGER6
2438 case FFEINFO_kindtypeINTEGER6
:
2439 ptr
.integer6
= malloc_new_zkp (ffebld_constant_pool(),
2440 "ffebldConstantArray",
2441 size
*= sizeof (ffetargetInteger6
),
2446 #if FFETARGET_okINTEGER7
2447 case FFEINFO_kindtypeINTEGER7
:
2448 ptr
.integer7
= malloc_new_zkp (ffebld_constant_pool(),
2449 "ffebldConstantArray",
2450 size
*= sizeof (ffetargetInteger7
),
2455 #if FFETARGET_okINTEGER8
2456 case FFEINFO_kindtypeINTEGER8
:
2457 ptr
.integer8
= malloc_new_zkp (ffebld_constant_pool(),
2458 "ffebldConstantArray",
2459 size
*= sizeof (ffetargetInteger8
),
2465 assert ("bad INTEGER kindtype" == NULL
);
2470 case FFEINFO_basictypeLOGICAL
:
2473 #if FFETARGET_okLOGICAL1
2474 case FFEINFO_kindtypeLOGICAL1
:
2475 ptr
.logical1
= malloc_new_zkp (ffebld_constant_pool(),
2476 "ffebldConstantArray",
2477 size
*= sizeof (ffetargetLogical1
),
2482 #if FFETARGET_okLOGICAL2
2483 case FFEINFO_kindtypeLOGICAL2
:
2484 ptr
.logical2
= malloc_new_zkp (ffebld_constant_pool(),
2485 "ffebldConstantArray",
2486 size
*= sizeof (ffetargetLogical2
),
2491 #if FFETARGET_okLOGICAL3
2492 case FFEINFO_kindtypeLOGICAL3
:
2493 ptr
.logical3
= malloc_new_zkp (ffebld_constant_pool(),
2494 "ffebldConstantArray",
2495 size
*= sizeof (ffetargetLogical3
),
2500 #if FFETARGET_okLOGICAL4
2501 case FFEINFO_kindtypeLOGICAL4
:
2502 ptr
.logical4
= malloc_new_zkp (ffebld_constant_pool(),
2503 "ffebldConstantArray",
2504 size
*= sizeof (ffetargetLogical4
),
2509 #if FFETARGET_okLOGICAL5
2510 case FFEINFO_kindtypeLOGICAL5
:
2511 ptr
.logical5
= malloc_new_zkp (ffebld_constant_pool(),
2512 "ffebldConstantArray",
2513 size
*= sizeof (ffetargetLogical5
),
2518 #if FFETARGET_okLOGICAL6
2519 case FFEINFO_kindtypeLOGICAL6
:
2520 ptr
.logical6
= malloc_new_zkp (ffebld_constant_pool(),
2521 "ffebldConstantArray",
2522 size
*= sizeof (ffetargetLogical6
),
2527 #if FFETARGET_okLOGICAL7
2528 case FFEINFO_kindtypeLOGICAL7
:
2529 ptr
.logical7
= malloc_new_zkp (ffebld_constant_pool(),
2530 "ffebldConstantArray",
2531 size
*= sizeof (ffetargetLogical7
),
2536 #if FFETARGET_okLOGICAL8
2537 case FFEINFO_kindtypeLOGICAL8
:
2538 ptr
.logical8
= malloc_new_zkp (ffebld_constant_pool(),
2539 "ffebldConstantArray",
2540 size
*= sizeof (ffetargetLogical8
),
2546 assert ("bad LOGICAL kindtype" == NULL
);
2551 case FFEINFO_basictypeREAL
:
2554 #if FFETARGET_okREAL1
2555 case FFEINFO_kindtypeREAL1
:
2556 ptr
.real1
= malloc_new_zkp (ffebld_constant_pool(),
2557 "ffebldConstantArray",
2558 size
*= sizeof (ffetargetReal1
),
2563 #if FFETARGET_okREAL2
2564 case FFEINFO_kindtypeREAL2
:
2565 ptr
.real2
= malloc_new_zkp (ffebld_constant_pool(),
2566 "ffebldConstantArray",
2567 size
*= sizeof (ffetargetReal2
),
2572 #if FFETARGET_okREAL3
2573 case FFEINFO_kindtypeREAL3
:
2574 ptr
.real3
= malloc_new_zkp (ffebld_constant_pool(),
2575 "ffebldConstantArray",
2576 size
*= sizeof (ffetargetReal3
),
2581 #if FFETARGET_okREAL4
2582 case FFEINFO_kindtypeREAL4
:
2583 ptr
.real4
= malloc_new_zkp (ffebld_constant_pool(),
2584 "ffebldConstantArray",
2585 size
*= sizeof (ffetargetReal4
),
2590 #if FFETARGET_okREAL5
2591 case FFEINFO_kindtypeREAL5
:
2592 ptr
.real5
= malloc_new_zkp (ffebld_constant_pool(),
2593 "ffebldConstantArray",
2594 size
*= sizeof (ffetargetReal5
),
2599 #if FFETARGET_okREAL6
2600 case FFEINFO_kindtypeREAL6
:
2601 ptr
.real6
= malloc_new_zkp (ffebld_constant_pool(),
2602 "ffebldConstantArray",
2603 size
*= sizeof (ffetargetReal6
),
2608 #if FFETARGET_okREAL7
2609 case FFEINFO_kindtypeREAL7
:
2610 ptr
.real7
= malloc_new_zkp (ffebld_constant_pool(),
2611 "ffebldConstantArray",
2612 size
*= sizeof (ffetargetReal7
),
2617 #if FFETARGET_okREAL8
2618 case FFEINFO_kindtypeREAL8
:
2619 ptr
.real8
= malloc_new_zkp (ffebld_constant_pool(),
2620 "ffebldConstantArray",
2621 size
*= sizeof (ffetargetReal8
),
2627 assert ("bad REAL kindtype" == NULL
);
2632 case FFEINFO_basictypeCOMPLEX
:
2635 #if FFETARGET_okCOMPLEX1
2636 case FFEINFO_kindtypeREAL1
:
2637 ptr
.complex1
= malloc_new_zkp (ffebld_constant_pool(),
2638 "ffebldConstantArray",
2639 size
*= sizeof (ffetargetComplex1
),
2644 #if FFETARGET_okCOMPLEX2
2645 case FFEINFO_kindtypeREAL2
:
2646 ptr
.complex2
= malloc_new_zkp (ffebld_constant_pool(),
2647 "ffebldConstantArray",
2648 size
*= sizeof (ffetargetComplex2
),
2653 #if FFETARGET_okCOMPLEX3
2654 case FFEINFO_kindtypeREAL3
:
2655 ptr
.complex3
= malloc_new_zkp (ffebld_constant_pool(),
2656 "ffebldConstantArray",
2657 size
*= sizeof (ffetargetComplex3
),
2662 #if FFETARGET_okCOMPLEX4
2663 case FFEINFO_kindtypeREAL4
:
2664 ptr
.complex4
= malloc_new_zkp (ffebld_constant_pool(),
2665 "ffebldConstantArray",
2666 size
*= sizeof (ffetargetComplex4
),
2671 #if FFETARGET_okCOMPLEX5
2672 case FFEINFO_kindtypeREAL5
:
2673 ptr
.complex5
= malloc_new_zkp (ffebld_constant_pool(),
2674 "ffebldConstantArray",
2675 size
*= sizeof (ffetargetComplex5
),
2680 #if FFETARGET_okCOMPLEX6
2681 case FFEINFO_kindtypeREAL6
:
2682 ptr
.complex6
= malloc_new_zkp (ffebld_constant_pool(),
2683 "ffebldConstantArray",
2684 size
*= sizeof (ffetargetComplex6
),
2689 #if FFETARGET_okCOMPLEX7
2690 case FFEINFO_kindtypeREAL7
:
2691 ptr
.complex7
= malloc_new_zkp (ffebld_constant_pool(),
2692 "ffebldConstantArray",
2693 size
*= sizeof (ffetargetComplex7
),
2698 #if FFETARGET_okCOMPLEX8
2699 case FFEINFO_kindtypeREAL8
:
2700 ptr
.complex8
= malloc_new_zkp (ffebld_constant_pool(),
2701 "ffebldConstantArray",
2702 size
*= sizeof (ffetargetComplex8
),
2708 assert ("bad COMPLEX kindtype" == NULL
);
2713 case FFEINFO_basictypeCHARACTER
:
2716 #if FFETARGET_okCHARACTER1
2717 case FFEINFO_kindtypeCHARACTER1
:
2718 ptr
.character1
= malloc_new_zkp (ffebld_constant_pool(),
2719 "ffebldConstantArray",
2721 *= sizeof (ffetargetCharacterUnit1
),
2726 #if FFETARGET_okCHARACTER2
2727 case FFEINFO_kindtypeCHARACTER2
:
2728 ptr
.character2
= malloc_new_zkp (ffebld_constant_pool(),
2729 "ffebldConstantArray",
2731 *= sizeof (ffetargetCharacterUnit2
),
2736 #if FFETARGET_okCHARACTER3
2737 case FFEINFO_kindtypeCHARACTER3
:
2738 ptr
.character3
= malloc_new_zkp (ffebld_constant_pool(),
2739 "ffebldConstantArray",
2741 *= sizeof (ffetargetCharacterUnit3
),
2746 #if FFETARGET_okCHARACTER4
2747 case FFEINFO_kindtypeCHARACTER4
:
2748 ptr
.character4
= malloc_new_zkp (ffebld_constant_pool(),
2749 "ffebldConstantArray",
2751 *= sizeof (ffetargetCharacterUnit4
),
2756 #if FFETARGET_okCHARACTER5
2757 case FFEINFO_kindtypeCHARACTER5
:
2758 ptr
.character5
= malloc_new_zkp (ffebld_constant_pool(),
2759 "ffebldConstantArray",
2761 *= sizeof (ffetargetCharacterUnit5
),
2766 #if FFETARGET_okCHARACTER6
2767 case FFEINFO_kindtypeCHARACTER6
:
2768 ptr
.character6
= malloc_new_zkp (ffebld_constant_pool(),
2769 "ffebldConstantArray",
2771 *= sizeof (ffetargetCharacterUnit6
),
2776 #if FFETARGET_okCHARACTER7
2777 case FFEINFO_kindtypeCHARACTER7
:
2778 ptr
.character7
= malloc_new_zkp (ffebld_constant_pool(),
2779 "ffebldConstantArray",
2781 *= sizeof (ffetargetCharacterUnit7
),
2786 #if FFETARGET_okCHARACTER8
2787 case FFEINFO_kindtypeCHARACTER8
:
2788 ptr
.character8
= malloc_new_zkp (ffebld_constant_pool(),
2789 "ffebldConstantArray",
2791 *= sizeof (ffetargetCharacterUnit8
),
2797 assert ("bad CHARACTER kindtype" == NULL
);
2803 assert ("bad basictype" == NULL
);
2810 /* ffebld_constantarray_preparray -- Prepare for copy between arrays
2814 Like _prepare, but the source is an array instead of a single-value
2818 ffebld_constantarray_preparray (void **aptr
, void **cptr
, size_t *size
,
2819 ffebldConstantArray array
, ffeinfoBasictype abt
, ffeinfoKindtype akt
,
2820 ffetargetOffset offset
, ffebldConstantArray source_array
,
2821 ffeinfoBasictype cbt
, ffeinfoKindtype ckt
)
2825 case FFEINFO_basictypeINTEGER
:
2828 #if FFETARGET_okINTEGER1
2829 case FFEINFO_kindtypeINTEGER1
:
2830 *aptr
= array
.integer1
+ offset
;
2834 #if FFETARGET_okINTEGER2
2835 case FFEINFO_kindtypeINTEGER2
:
2836 *aptr
= array
.integer2
+ offset
;
2840 #if FFETARGET_okINTEGER3
2841 case FFEINFO_kindtypeINTEGER3
:
2842 *aptr
= array
.integer3
+ offset
;
2846 #if FFETARGET_okINTEGER4
2847 case FFEINFO_kindtypeINTEGER4
:
2848 *aptr
= array
.integer4
+ offset
;
2852 #if FFETARGET_okINTEGER5
2853 case FFEINFO_kindtypeINTEGER5
:
2854 *aptr
= array
.integer5
+ offset
;
2858 #if FFETARGET_okINTEGER6
2859 case FFEINFO_kindtypeINTEGER6
:
2860 *aptr
= array
.integer6
+ offset
;
2864 #if FFETARGET_okINTEGER7
2865 case FFEINFO_kindtypeINTEGER7
:
2866 *aptr
= array
.integer7
+ offset
;
2870 #if FFETARGET_okINTEGER8
2871 case FFEINFO_kindtypeINTEGER8
:
2872 *aptr
= array
.integer8
+ offset
;
2877 assert ("bad INTEGER akindtype" == NULL
);
2882 case FFEINFO_basictypeLOGICAL
:
2885 #if FFETARGET_okLOGICAL1
2886 case FFEINFO_kindtypeLOGICAL1
:
2887 *aptr
= array
.logical1
+ offset
;
2891 #if FFETARGET_okLOGICAL2
2892 case FFEINFO_kindtypeLOGICAL2
:
2893 *aptr
= array
.logical2
+ offset
;
2897 #if FFETARGET_okLOGICAL3
2898 case FFEINFO_kindtypeLOGICAL3
:
2899 *aptr
= array
.logical3
+ offset
;
2903 #if FFETARGET_okLOGICAL4
2904 case FFEINFO_kindtypeLOGICAL4
:
2905 *aptr
= array
.logical4
+ offset
;
2909 #if FFETARGET_okLOGICAL5
2910 case FFEINFO_kindtypeLOGICAL5
:
2911 *aptr
= array
.logical5
+ offset
;
2915 #if FFETARGET_okLOGICAL6
2916 case FFEINFO_kindtypeLOGICAL6
:
2917 *aptr
= array
.logical6
+ offset
;
2921 #if FFETARGET_okLOGICAL7
2922 case FFEINFO_kindtypeLOGICAL7
:
2923 *aptr
= array
.logical7
+ offset
;
2927 #if FFETARGET_okLOGICAL8
2928 case FFEINFO_kindtypeLOGICAL8
:
2929 *aptr
= array
.logical8
+ offset
;
2934 assert ("bad LOGICAL akindtype" == NULL
);
2939 case FFEINFO_basictypeREAL
:
2942 #if FFETARGET_okREAL1
2943 case FFEINFO_kindtypeREAL1
:
2944 *aptr
= array
.real1
+ offset
;
2948 #if FFETARGET_okREAL2
2949 case FFEINFO_kindtypeREAL2
:
2950 *aptr
= array
.real2
+ offset
;
2954 #if FFETARGET_okREAL3
2955 case FFEINFO_kindtypeREAL3
:
2956 *aptr
= array
.real3
+ offset
;
2960 #if FFETARGET_okREAL4
2961 case FFEINFO_kindtypeREAL4
:
2962 *aptr
= array
.real4
+ offset
;
2966 #if FFETARGET_okREAL5
2967 case FFEINFO_kindtypeREAL5
:
2968 *aptr
= array
.real5
+ offset
;
2972 #if FFETARGET_okREAL6
2973 case FFEINFO_kindtypeREAL6
:
2974 *aptr
= array
.real6
+ offset
;
2978 #if FFETARGET_okREAL7
2979 case FFEINFO_kindtypeREAL7
:
2980 *aptr
= array
.real7
+ offset
;
2984 #if FFETARGET_okREAL8
2985 case FFEINFO_kindtypeREAL8
:
2986 *aptr
= array
.real8
+ offset
;
2991 assert ("bad REAL akindtype" == NULL
);
2996 case FFEINFO_basictypeCOMPLEX
:
2999 #if FFETARGET_okCOMPLEX1
3000 case FFEINFO_kindtypeREAL1
:
3001 *aptr
= array
.complex1
+ offset
;
3005 #if FFETARGET_okCOMPLEX2
3006 case FFEINFO_kindtypeREAL2
:
3007 *aptr
= array
.complex2
+ offset
;
3011 #if FFETARGET_okCOMPLEX3
3012 case FFEINFO_kindtypeREAL3
:
3013 *aptr
= array
.complex3
+ offset
;
3017 #if FFETARGET_okCOMPLEX4
3018 case FFEINFO_kindtypeREAL4
:
3019 *aptr
= array
.complex4
+ offset
;
3023 #if FFETARGET_okCOMPLEX5
3024 case FFEINFO_kindtypeREAL5
:
3025 *aptr
= array
.complex5
+ offset
;
3029 #if FFETARGET_okCOMPLEX6
3030 case FFEINFO_kindtypeREAL6
:
3031 *aptr
= array
.complex6
+ offset
;
3035 #if FFETARGET_okCOMPLEX7
3036 case FFEINFO_kindtypeREAL7
:
3037 *aptr
= array
.complex7
+ offset
;
3041 #if FFETARGET_okCOMPLEX8
3042 case FFEINFO_kindtypeREAL8
:
3043 *aptr
= array
.complex8
+ offset
;
3048 assert ("bad COMPLEX akindtype" == NULL
);
3053 case FFEINFO_basictypeCHARACTER
:
3056 #if FFETARGET_okCHARACTER1
3057 case FFEINFO_kindtypeCHARACTER1
:
3058 *aptr
= array
.character1
+ offset
;
3062 #if FFETARGET_okCHARACTER2
3063 case FFEINFO_kindtypeCHARACTER2
:
3064 *aptr
= array
.character2
+ offset
;
3068 #if FFETARGET_okCHARACTER3
3069 case FFEINFO_kindtypeCHARACTER3
:
3070 *aptr
= array
.character3
+ offset
;
3074 #if FFETARGET_okCHARACTER4
3075 case FFEINFO_kindtypeCHARACTER4
:
3076 *aptr
= array
.character4
+ offset
;
3080 #if FFETARGET_okCHARACTER5
3081 case FFEINFO_kindtypeCHARACTER5
:
3082 *aptr
= array
.character5
+ offset
;
3086 #if FFETARGET_okCHARACTER6
3087 case FFEINFO_kindtypeCHARACTER6
:
3088 *aptr
= array
.character6
+ offset
;
3092 #if FFETARGET_okCHARACTER7
3093 case FFEINFO_kindtypeCHARACTER7
:
3094 *aptr
= array
.character7
+ offset
;
3098 #if FFETARGET_okCHARACTER8
3099 case FFEINFO_kindtypeCHARACTER8
:
3100 *aptr
= array
.character8
+ offset
;
3105 assert ("bad CHARACTER akindtype" == NULL
);
3111 assert ("bad abasictype" == NULL
);
3117 case FFEINFO_basictypeINTEGER
:
3120 #if FFETARGET_okINTEGER1
3121 case FFEINFO_kindtypeINTEGER1
:
3122 *cptr
= source_array
.integer1
;
3123 *size
= sizeof (*source_array
.integer1
);
3127 #if FFETARGET_okINTEGER2
3128 case FFEINFO_kindtypeINTEGER2
:
3129 *cptr
= source_array
.integer2
;
3130 *size
= sizeof (*source_array
.integer2
);
3134 #if FFETARGET_okINTEGER3
3135 case FFEINFO_kindtypeINTEGER3
:
3136 *cptr
= source_array
.integer3
;
3137 *size
= sizeof (*source_array
.integer3
);
3141 #if FFETARGET_okINTEGER4
3142 case FFEINFO_kindtypeINTEGER4
:
3143 *cptr
= source_array
.integer4
;
3144 *size
= sizeof (*source_array
.integer4
);
3148 #if FFETARGET_okINTEGER5
3149 case FFEINFO_kindtypeINTEGER5
:
3150 *cptr
= source_array
.integer5
;
3151 *size
= sizeof (*source_array
.integer5
);
3155 #if FFETARGET_okINTEGER6
3156 case FFEINFO_kindtypeINTEGER6
:
3157 *cptr
= source_array
.integer6
;
3158 *size
= sizeof (*source_array
.integer6
);
3162 #if FFETARGET_okINTEGER7
3163 case FFEINFO_kindtypeINTEGER7
:
3164 *cptr
= source_array
.integer7
;
3165 *size
= sizeof (*source_array
.integer7
);
3169 #if FFETARGET_okINTEGER8
3170 case FFEINFO_kindtypeINTEGER8
:
3171 *cptr
= source_array
.integer8
;
3172 *size
= sizeof (*source_array
.integer8
);
3177 assert ("bad INTEGER ckindtype" == NULL
);
3182 case FFEINFO_basictypeLOGICAL
:
3185 #if FFETARGET_okLOGICAL1
3186 case FFEINFO_kindtypeLOGICAL1
:
3187 *cptr
= source_array
.logical1
;
3188 *size
= sizeof (*source_array
.logical1
);
3192 #if FFETARGET_okLOGICAL2
3193 case FFEINFO_kindtypeLOGICAL2
:
3194 *cptr
= source_array
.logical2
;
3195 *size
= sizeof (*source_array
.logical2
);
3199 #if FFETARGET_okLOGICAL3
3200 case FFEINFO_kindtypeLOGICAL3
:
3201 *cptr
= source_array
.logical3
;
3202 *size
= sizeof (*source_array
.logical3
);
3206 #if FFETARGET_okLOGICAL4
3207 case FFEINFO_kindtypeLOGICAL4
:
3208 *cptr
= source_array
.logical4
;
3209 *size
= sizeof (*source_array
.logical4
);
3213 #if FFETARGET_okLOGICAL5
3214 case FFEINFO_kindtypeLOGICAL5
:
3215 *cptr
= source_array
.logical5
;
3216 *size
= sizeof (*source_array
.logical5
);
3220 #if FFETARGET_okLOGICAL6
3221 case FFEINFO_kindtypeLOGICAL6
:
3222 *cptr
= source_array
.logical6
;
3223 *size
= sizeof (*source_array
.logical6
);
3227 #if FFETARGET_okLOGICAL7
3228 case FFEINFO_kindtypeLOGICAL7
:
3229 *cptr
= source_array
.logical7
;
3230 *size
= sizeof (*source_array
.logical7
);
3234 #if FFETARGET_okLOGICAL8
3235 case FFEINFO_kindtypeLOGICAL8
:
3236 *cptr
= source_array
.logical8
;
3237 *size
= sizeof (*source_array
.logical8
);
3242 assert ("bad LOGICAL ckindtype" == NULL
);
3247 case FFEINFO_basictypeREAL
:
3250 #if FFETARGET_okREAL1
3251 case FFEINFO_kindtypeREAL1
:
3252 *cptr
= source_array
.real1
;
3253 *size
= sizeof (*source_array
.real1
);
3257 #if FFETARGET_okREAL2
3258 case FFEINFO_kindtypeREAL2
:
3259 *cptr
= source_array
.real2
;
3260 *size
= sizeof (*source_array
.real2
);
3264 #if FFETARGET_okREAL3
3265 case FFEINFO_kindtypeREAL3
:
3266 *cptr
= source_array
.real3
;
3267 *size
= sizeof (*source_array
.real3
);
3271 #if FFETARGET_okREAL4
3272 case FFEINFO_kindtypeREAL4
:
3273 *cptr
= source_array
.real4
;
3274 *size
= sizeof (*source_array
.real4
);
3278 #if FFETARGET_okREAL5
3279 case FFEINFO_kindtypeREAL5
:
3280 *cptr
= source_array
.real5
;
3281 *size
= sizeof (*source_array
.real5
);
3285 #if FFETARGET_okREAL6
3286 case FFEINFO_kindtypeREAL6
:
3287 *cptr
= source_array
.real6
;
3288 *size
= sizeof (*source_array
.real6
);
3292 #if FFETARGET_okREAL7
3293 case FFEINFO_kindtypeREAL7
:
3294 *cptr
= source_array
.real7
;
3295 *size
= sizeof (*source_array
.real7
);
3299 #if FFETARGET_okREAL8
3300 case FFEINFO_kindtypeREAL8
:
3301 *cptr
= source_array
.real8
;
3302 *size
= sizeof (*source_array
.real8
);
3307 assert ("bad REAL ckindtype" == NULL
);
3312 case FFEINFO_basictypeCOMPLEX
:
3315 #if FFETARGET_okCOMPLEX1
3316 case FFEINFO_kindtypeREAL1
:
3317 *cptr
= source_array
.complex1
;
3318 *size
= sizeof (*source_array
.complex1
);
3322 #if FFETARGET_okCOMPLEX2
3323 case FFEINFO_kindtypeREAL2
:
3324 *cptr
= source_array
.complex2
;
3325 *size
= sizeof (*source_array
.complex2
);
3329 #if FFETARGET_okCOMPLEX3
3330 case FFEINFO_kindtypeREAL3
:
3331 *cptr
= source_array
.complex3
;
3332 *size
= sizeof (*source_array
.complex3
);
3336 #if FFETARGET_okCOMPLEX4
3337 case FFEINFO_kindtypeREAL4
:
3338 *cptr
= source_array
.complex4
;
3339 *size
= sizeof (*source_array
.complex4
);
3343 #if FFETARGET_okCOMPLEX5
3344 case FFEINFO_kindtypeREAL5
:
3345 *cptr
= source_array
.complex5
;
3346 *size
= sizeof (*source_array
.complex5
);
3350 #if FFETARGET_okCOMPLEX6
3351 case FFEINFO_kindtypeREAL6
:
3352 *cptr
= source_array
.complex6
;
3353 *size
= sizeof (*source_array
.complex6
);
3357 #if FFETARGET_okCOMPLEX7
3358 case FFEINFO_kindtypeREAL7
:
3359 *cptr
= source_array
.complex7
;
3360 *size
= sizeof (*source_array
.complex7
);
3364 #if FFETARGET_okCOMPLEX8
3365 case FFEINFO_kindtypeREAL8
:
3366 *cptr
= source_array
.complex8
;
3367 *size
= sizeof (*source_array
.complex8
);
3372 assert ("bad COMPLEX ckindtype" == NULL
);
3377 case FFEINFO_basictypeCHARACTER
:
3380 #if FFETARGET_okCHARACTER1
3381 case FFEINFO_kindtypeCHARACTER1
:
3382 *cptr
= source_array
.character1
;
3383 *size
= sizeof (*source_array
.character1
);
3387 #if FFETARGET_okCHARACTER2
3388 case FFEINFO_kindtypeCHARACTER2
:
3389 *cptr
= source_array
.character2
;
3390 *size
= sizeof (*source_array
.character2
);
3394 #if FFETARGET_okCHARACTER3
3395 case FFEINFO_kindtypeCHARACTER3
:
3396 *cptr
= source_array
.character3
;
3397 *size
= sizeof (*source_array
.character3
);
3401 #if FFETARGET_okCHARACTER4
3402 case FFEINFO_kindtypeCHARACTER4
:
3403 *cptr
= source_array
.character4
;
3404 *size
= sizeof (*source_array
.character4
);
3408 #if FFETARGET_okCHARACTER5
3409 case FFEINFO_kindtypeCHARACTER5
:
3410 *cptr
= source_array
.character5
;
3411 *size
= sizeof (*source_array
.character5
);
3415 #if FFETARGET_okCHARACTER6
3416 case FFEINFO_kindtypeCHARACTER6
:
3417 *cptr
= source_array
.character6
;
3418 *size
= sizeof (*source_array
.character6
);
3422 #if FFETARGET_okCHARACTER7
3423 case FFEINFO_kindtypeCHARACTER7
:
3424 *cptr
= source_array
.character7
;
3425 *size
= sizeof (*source_array
.character7
);
3429 #if FFETARGET_okCHARACTER8
3430 case FFEINFO_kindtypeCHARACTER8
:
3431 *cptr
= source_array
.character8
;
3432 *size
= sizeof (*source_array
.character8
);
3437 assert ("bad CHARACTER ckindtype" == NULL
);
3443 assert ("bad cbasictype" == NULL
);
3448 /* ffebld_constantarray_prepare -- Prepare for copy between value and array
3452 Like _put, but just returns the pointers to the beginnings of the
3453 array and the constant and returns the size (the amount of info to
3454 copy). The idea is that the caller can use memcpy to accomplish the
3455 same thing as _put (though slower), or the caller can use a different
3456 function that swaps bytes, words, etc for a different target machine.
3457 Also, the type of the array may be different from the type of the
3458 constant; the array type is used to determine the meaning (scale) of
3459 the offset field (to calculate the array pointer), the constant type is
3460 used to determine the constant pointer and the size (amount of info to
3464 ffebld_constantarray_prepare (void **aptr
, void **cptr
, size_t *size
,
3465 ffebldConstantArray array
, ffeinfoBasictype abt
, ffeinfoKindtype akt
,
3466 ffetargetOffset offset
, ffebldConstantUnion
*constant
,
3467 ffeinfoBasictype cbt
, ffeinfoKindtype ckt
)
3471 case FFEINFO_basictypeINTEGER
:
3474 #if FFETARGET_okINTEGER1
3475 case FFEINFO_kindtypeINTEGER1
:
3476 *aptr
= array
.integer1
+ offset
;
3480 #if FFETARGET_okINTEGER2
3481 case FFEINFO_kindtypeINTEGER2
:
3482 *aptr
= array
.integer2
+ offset
;
3486 #if FFETARGET_okINTEGER3
3487 case FFEINFO_kindtypeINTEGER3
:
3488 *aptr
= array
.integer3
+ offset
;
3492 #if FFETARGET_okINTEGER4
3493 case FFEINFO_kindtypeINTEGER4
:
3494 *aptr
= array
.integer4
+ offset
;
3498 #if FFETARGET_okINTEGER5
3499 case FFEINFO_kindtypeINTEGER5
:
3500 *aptr
= array
.integer5
+ offset
;
3504 #if FFETARGET_okINTEGER6
3505 case FFEINFO_kindtypeINTEGER6
:
3506 *aptr
= array
.integer6
+ offset
;
3510 #if FFETARGET_okINTEGER7
3511 case FFEINFO_kindtypeINTEGER7
:
3512 *aptr
= array
.integer7
+ offset
;
3516 #if FFETARGET_okINTEGER8
3517 case FFEINFO_kindtypeINTEGER8
:
3518 *aptr
= array
.integer8
+ offset
;
3523 assert ("bad INTEGER akindtype" == NULL
);
3528 case FFEINFO_basictypeLOGICAL
:
3531 #if FFETARGET_okLOGICAL1
3532 case FFEINFO_kindtypeLOGICAL1
:
3533 *aptr
= array
.logical1
+ offset
;
3537 #if FFETARGET_okLOGICAL2
3538 case FFEINFO_kindtypeLOGICAL2
:
3539 *aptr
= array
.logical2
+ offset
;
3543 #if FFETARGET_okLOGICAL3
3544 case FFEINFO_kindtypeLOGICAL3
:
3545 *aptr
= array
.logical3
+ offset
;
3549 #if FFETARGET_okLOGICAL4
3550 case FFEINFO_kindtypeLOGICAL4
:
3551 *aptr
= array
.logical4
+ offset
;
3555 #if FFETARGET_okLOGICAL5
3556 case FFEINFO_kindtypeLOGICAL5
:
3557 *aptr
= array
.logical5
+ offset
;
3561 #if FFETARGET_okLOGICAL6
3562 case FFEINFO_kindtypeLOGICAL6
:
3563 *aptr
= array
.logical6
+ offset
;
3567 #if FFETARGET_okLOGICAL7
3568 case FFEINFO_kindtypeLOGICAL7
:
3569 *aptr
= array
.logical7
+ offset
;
3573 #if FFETARGET_okLOGICAL8
3574 case FFEINFO_kindtypeLOGICAL8
:
3575 *aptr
= array
.logical8
+ offset
;
3580 assert ("bad LOGICAL akindtype" == NULL
);
3585 case FFEINFO_basictypeREAL
:
3588 #if FFETARGET_okREAL1
3589 case FFEINFO_kindtypeREAL1
:
3590 *aptr
= array
.real1
+ offset
;
3594 #if FFETARGET_okREAL2
3595 case FFEINFO_kindtypeREAL2
:
3596 *aptr
= array
.real2
+ offset
;
3600 #if FFETARGET_okREAL3
3601 case FFEINFO_kindtypeREAL3
:
3602 *aptr
= array
.real3
+ offset
;
3606 #if FFETARGET_okREAL4
3607 case FFEINFO_kindtypeREAL4
:
3608 *aptr
= array
.real4
+ offset
;
3612 #if FFETARGET_okREAL5
3613 case FFEINFO_kindtypeREAL5
:
3614 *aptr
= array
.real5
+ offset
;
3618 #if FFETARGET_okREAL6
3619 case FFEINFO_kindtypeREAL6
:
3620 *aptr
= array
.real6
+ offset
;
3624 #if FFETARGET_okREAL7
3625 case FFEINFO_kindtypeREAL7
:
3626 *aptr
= array
.real7
+ offset
;
3630 #if FFETARGET_okREAL8
3631 case FFEINFO_kindtypeREAL8
:
3632 *aptr
= array
.real8
+ offset
;
3637 assert ("bad REAL akindtype" == NULL
);
3642 case FFEINFO_basictypeCOMPLEX
:
3645 #if FFETARGET_okCOMPLEX1
3646 case FFEINFO_kindtypeREAL1
:
3647 *aptr
= array
.complex1
+ offset
;
3651 #if FFETARGET_okCOMPLEX2
3652 case FFEINFO_kindtypeREAL2
:
3653 *aptr
= array
.complex2
+ offset
;
3657 #if FFETARGET_okCOMPLEX3
3658 case FFEINFO_kindtypeREAL3
:
3659 *aptr
= array
.complex3
+ offset
;
3663 #if FFETARGET_okCOMPLEX4
3664 case FFEINFO_kindtypeREAL4
:
3665 *aptr
= array
.complex4
+ offset
;
3669 #if FFETARGET_okCOMPLEX5
3670 case FFEINFO_kindtypeREAL5
:
3671 *aptr
= array
.complex5
+ offset
;
3675 #if FFETARGET_okCOMPLEX6
3676 case FFEINFO_kindtypeREAL6
:
3677 *aptr
= array
.complex6
+ offset
;
3681 #if FFETARGET_okCOMPLEX7
3682 case FFEINFO_kindtypeREAL7
:
3683 *aptr
= array
.complex7
+ offset
;
3687 #if FFETARGET_okCOMPLEX8
3688 case FFEINFO_kindtypeREAL8
:
3689 *aptr
= array
.complex8
+ offset
;
3694 assert ("bad COMPLEX akindtype" == NULL
);
3699 case FFEINFO_basictypeCHARACTER
:
3702 #if FFETARGET_okCHARACTER1
3703 case FFEINFO_kindtypeCHARACTER1
:
3704 *aptr
= array
.character1
+ offset
;
3708 #if FFETARGET_okCHARACTER2
3709 case FFEINFO_kindtypeCHARACTER2
:
3710 *aptr
= array
.character2
+ offset
;
3714 #if FFETARGET_okCHARACTER3
3715 case FFEINFO_kindtypeCHARACTER3
:
3716 *aptr
= array
.character3
+ offset
;
3720 #if FFETARGET_okCHARACTER4
3721 case FFEINFO_kindtypeCHARACTER4
:
3722 *aptr
= array
.character4
+ offset
;
3726 #if FFETARGET_okCHARACTER5
3727 case FFEINFO_kindtypeCHARACTER5
:
3728 *aptr
= array
.character5
+ offset
;
3732 #if FFETARGET_okCHARACTER6
3733 case FFEINFO_kindtypeCHARACTER6
:
3734 *aptr
= array
.character6
+ offset
;
3738 #if FFETARGET_okCHARACTER7
3739 case FFEINFO_kindtypeCHARACTER7
:
3740 *aptr
= array
.character7
+ offset
;
3744 #if FFETARGET_okCHARACTER8
3745 case FFEINFO_kindtypeCHARACTER8
:
3746 *aptr
= array
.character8
+ offset
;
3751 assert ("bad CHARACTER akindtype" == NULL
);
3757 assert ("bad abasictype" == NULL
);
3763 case FFEINFO_basictypeINTEGER
:
3766 #if FFETARGET_okINTEGER1
3767 case FFEINFO_kindtypeINTEGER1
:
3768 *cptr
= &constant
->integer1
;
3769 *size
= sizeof (constant
->integer1
);
3773 #if FFETARGET_okINTEGER2
3774 case FFEINFO_kindtypeINTEGER2
:
3775 *cptr
= &constant
->integer2
;
3776 *size
= sizeof (constant
->integer2
);
3780 #if FFETARGET_okINTEGER3
3781 case FFEINFO_kindtypeINTEGER3
:
3782 *cptr
= &constant
->integer3
;
3783 *size
= sizeof (constant
->integer3
);
3787 #if FFETARGET_okINTEGER4
3788 case FFEINFO_kindtypeINTEGER4
:
3789 *cptr
= &constant
->integer4
;
3790 *size
= sizeof (constant
->integer4
);
3794 #if FFETARGET_okINTEGER5
3795 case FFEINFO_kindtypeINTEGER5
:
3796 *cptr
= &constant
->integer5
;
3797 *size
= sizeof (constant
->integer5
);
3801 #if FFETARGET_okINTEGER6
3802 case FFEINFO_kindtypeINTEGER6
:
3803 *cptr
= &constant
->integer6
;
3804 *size
= sizeof (constant
->integer6
);
3808 #if FFETARGET_okINTEGER7
3809 case FFEINFO_kindtypeINTEGER7
:
3810 *cptr
= &constant
->integer7
;
3811 *size
= sizeof (constant
->integer7
);
3815 #if FFETARGET_okINTEGER8
3816 case FFEINFO_kindtypeINTEGER8
:
3817 *cptr
= &constant
->integer8
;
3818 *size
= sizeof (constant
->integer8
);
3823 assert ("bad INTEGER ckindtype" == NULL
);
3828 case FFEINFO_basictypeLOGICAL
:
3831 #if FFETARGET_okLOGICAL1
3832 case FFEINFO_kindtypeLOGICAL1
:
3833 *cptr
= &constant
->logical1
;
3834 *size
= sizeof (constant
->logical1
);
3838 #if FFETARGET_okLOGICAL2
3839 case FFEINFO_kindtypeLOGICAL2
:
3840 *cptr
= &constant
->logical2
;
3841 *size
= sizeof (constant
->logical2
);
3845 #if FFETARGET_okLOGICAL3
3846 case FFEINFO_kindtypeLOGICAL3
:
3847 *cptr
= &constant
->logical3
;
3848 *size
= sizeof (constant
->logical3
);
3852 #if FFETARGET_okLOGICAL4
3853 case FFEINFO_kindtypeLOGICAL4
:
3854 *cptr
= &constant
->logical4
;
3855 *size
= sizeof (constant
->logical4
);
3859 #if FFETARGET_okLOGICAL5
3860 case FFEINFO_kindtypeLOGICAL5
:
3861 *cptr
= &constant
->logical5
;
3862 *size
= sizeof (constant
->logical5
);
3866 #if FFETARGET_okLOGICAL6
3867 case FFEINFO_kindtypeLOGICAL6
:
3868 *cptr
= &constant
->logical6
;
3869 *size
= sizeof (constant
->logical6
);
3873 #if FFETARGET_okLOGICAL7
3874 case FFEINFO_kindtypeLOGICAL7
:
3875 *cptr
= &constant
->logical7
;
3876 *size
= sizeof (constant
->logical7
);
3880 #if FFETARGET_okLOGICAL8
3881 case FFEINFO_kindtypeLOGICAL8
:
3882 *cptr
= &constant
->logical8
;
3883 *size
= sizeof (constant
->logical8
);
3888 assert ("bad LOGICAL ckindtype" == NULL
);
3893 case FFEINFO_basictypeREAL
:
3896 #if FFETARGET_okREAL1
3897 case FFEINFO_kindtypeREAL1
:
3898 *cptr
= &constant
->real1
;
3899 *size
= sizeof (constant
->real1
);
3903 #if FFETARGET_okREAL2
3904 case FFEINFO_kindtypeREAL2
:
3905 *cptr
= &constant
->real2
;
3906 *size
= sizeof (constant
->real2
);
3910 #if FFETARGET_okREAL3
3911 case FFEINFO_kindtypeREAL3
:
3912 *cptr
= &constant
->real3
;
3913 *size
= sizeof (constant
->real3
);
3917 #if FFETARGET_okREAL4
3918 case FFEINFO_kindtypeREAL4
:
3919 *cptr
= &constant
->real4
;
3920 *size
= sizeof (constant
->real4
);
3924 #if FFETARGET_okREAL5
3925 case FFEINFO_kindtypeREAL5
:
3926 *cptr
= &constant
->real5
;
3927 *size
= sizeof (constant
->real5
);
3931 #if FFETARGET_okREAL6
3932 case FFEINFO_kindtypeREAL6
:
3933 *cptr
= &constant
->real6
;
3934 *size
= sizeof (constant
->real6
);
3938 #if FFETARGET_okREAL7
3939 case FFEINFO_kindtypeREAL7
:
3940 *cptr
= &constant
->real7
;
3941 *size
= sizeof (constant
->real7
);
3945 #if FFETARGET_okREAL8
3946 case FFEINFO_kindtypeREAL8
:
3947 *cptr
= &constant
->real8
;
3948 *size
= sizeof (constant
->real8
);
3953 assert ("bad REAL ckindtype" == NULL
);
3958 case FFEINFO_basictypeCOMPLEX
:
3961 #if FFETARGET_okCOMPLEX1
3962 case FFEINFO_kindtypeREAL1
:
3963 *cptr
= &constant
->complex1
;
3964 *size
= sizeof (constant
->complex1
);
3968 #if FFETARGET_okCOMPLEX2
3969 case FFEINFO_kindtypeREAL2
:
3970 *cptr
= &constant
->complex2
;
3971 *size
= sizeof (constant
->complex2
);
3975 #if FFETARGET_okCOMPLEX3
3976 case FFEINFO_kindtypeREAL3
:
3977 *cptr
= &constant
->complex3
;
3978 *size
= sizeof (constant
->complex3
);
3982 #if FFETARGET_okCOMPLEX4
3983 case FFEINFO_kindtypeREAL4
:
3984 *cptr
= &constant
->complex4
;
3985 *size
= sizeof (constant
->complex4
);
3989 #if FFETARGET_okCOMPLEX5
3990 case FFEINFO_kindtypeREAL5
:
3991 *cptr
= &constant
->complex5
;
3992 *size
= sizeof (constant
->complex5
);
3996 #if FFETARGET_okCOMPLEX6
3997 case FFEINFO_kindtypeREAL6
:
3998 *cptr
= &constant
->complex6
;
3999 *size
= sizeof (constant
->complex6
);
4003 #if FFETARGET_okCOMPLEX7
4004 case FFEINFO_kindtypeREAL7
:
4005 *cptr
= &constant
->complex7
;
4006 *size
= sizeof (constant
->complex7
);
4010 #if FFETARGET_okCOMPLEX8
4011 case FFEINFO_kindtypeREAL8
:
4012 *cptr
= &constant
->complex8
;
4013 *size
= sizeof (constant
->complex8
);
4018 assert ("bad COMPLEX ckindtype" == NULL
);
4023 case FFEINFO_basictypeCHARACTER
:
4026 #if FFETARGET_okCHARACTER1
4027 case FFEINFO_kindtypeCHARACTER1
:
4028 *cptr
= ffetarget_text_character1 (constant
->character1
);
4029 *size
= ffetarget_length_character1 (constant
->character1
);
4033 #if FFETARGET_okCHARACTER2
4034 case FFEINFO_kindtypeCHARACTER2
:
4035 *cptr
= ffetarget_text_character2 (constant
->character2
);
4036 *size
= ffetarget_length_character2 (constant
->character2
);
4040 #if FFETARGET_okCHARACTER3
4041 case FFEINFO_kindtypeCHARACTER3
:
4042 *cptr
= ffetarget_text_character3 (constant
->character3
);
4043 *size
= ffetarget_length_character3 (constant
->character3
);
4047 #if FFETARGET_okCHARACTER4
4048 case FFEINFO_kindtypeCHARACTER4
:
4049 *cptr
= ffetarget_text_character4 (constant
->character4
);
4050 *size
= ffetarget_length_character4 (constant
->character4
);
4054 #if FFETARGET_okCHARACTER5
4055 case FFEINFO_kindtypeCHARACTER5
:
4056 *cptr
= ffetarget_text_character5 (constant
->character5
);
4057 *size
= ffetarget_length_character5 (constant
->character5
);
4061 #if FFETARGET_okCHARACTER6
4062 case FFEINFO_kindtypeCHARACTER6
:
4063 *cptr
= ffetarget_text_character6 (constant
->character6
);
4064 *size
= ffetarget_length_character6 (constant
->character6
);
4068 #if FFETARGET_okCHARACTER7
4069 case FFEINFO_kindtypeCHARACTER7
:
4070 *cptr
= ffetarget_text_character7 (constant
->character7
);
4071 *size
= ffetarget_length_character7 (constant
->character7
);
4075 #if FFETARGET_okCHARACTER8
4076 case FFEINFO_kindtypeCHARACTER8
:
4077 *cptr
= ffetarget_text_character8 (constant
->character8
);
4078 *size
= ffetarget_length_character8 (constant
->character8
);
4083 assert ("bad CHARACTER ckindtype" == NULL
);
4089 assert ("bad cbasictype" == NULL
);
4094 /* ffebld_constantarray_put -- Put a value into an array of constants
4099 ffebld_constantarray_put (ffebldConstantArray array
, ffeinfoBasictype bt
,
4100 ffeinfoKindtype kt
, ffetargetOffset offset
, ffebldConstantUnion constant
)
4104 case FFEINFO_basictypeINTEGER
:
4107 #if FFETARGET_okINTEGER1
4108 case FFEINFO_kindtypeINTEGER1
:
4109 *(array
.integer1
+ offset
) = constant
.integer1
;
4113 #if FFETARGET_okINTEGER2
4114 case FFEINFO_kindtypeINTEGER2
:
4115 *(array
.integer2
+ offset
) = constant
.integer2
;
4119 #if FFETARGET_okINTEGER3
4120 case FFEINFO_kindtypeINTEGER3
:
4121 *(array
.integer3
+ offset
) = constant
.integer3
;
4125 #if FFETARGET_okINTEGER4
4126 case FFEINFO_kindtypeINTEGER4
:
4127 *(array
.integer4
+ offset
) = constant
.integer4
;
4131 #if FFETARGET_okINTEGER5
4132 case FFEINFO_kindtypeINTEGER5
:
4133 *(array
.integer5
+ offset
) = constant
.integer5
;
4137 #if FFETARGET_okINTEGER6
4138 case FFEINFO_kindtypeINTEGER6
:
4139 *(array
.integer6
+ offset
) = constant
.integer6
;
4143 #if FFETARGET_okINTEGER7
4144 case FFEINFO_kindtypeINTEGER7
:
4145 *(array
.integer7
+ offset
) = constant
.integer7
;
4149 #if FFETARGET_okINTEGER8
4150 case FFEINFO_kindtypeINTEGER8
:
4151 *(array
.integer8
+ offset
) = constant
.integer8
;
4156 assert ("bad INTEGER kindtype" == NULL
);
4161 case FFEINFO_basictypeLOGICAL
:
4164 #if FFETARGET_okLOGICAL1
4165 case FFEINFO_kindtypeLOGICAL1
:
4166 *(array
.logical1
+ offset
) = constant
.logical1
;
4170 #if FFETARGET_okLOGICAL2
4171 case FFEINFO_kindtypeLOGICAL2
:
4172 *(array
.logical2
+ offset
) = constant
.logical2
;
4176 #if FFETARGET_okLOGICAL3
4177 case FFEINFO_kindtypeLOGICAL3
:
4178 *(array
.logical3
+ offset
) = constant
.logical3
;
4182 #if FFETARGET_okLOGICAL4
4183 case FFEINFO_kindtypeLOGICAL4
:
4184 *(array
.logical4
+ offset
) = constant
.logical4
;
4188 #if FFETARGET_okLOGICAL5
4189 case FFEINFO_kindtypeLOGICAL5
:
4190 *(array
.logical5
+ offset
) = constant
.logical5
;
4194 #if FFETARGET_okLOGICAL6
4195 case FFEINFO_kindtypeLOGICAL6
:
4196 *(array
.logical6
+ offset
) = constant
.logical6
;
4200 #if FFETARGET_okLOGICAL7
4201 case FFEINFO_kindtypeLOGICAL7
:
4202 *(array
.logical7
+ offset
) = constant
.logical7
;
4206 #if FFETARGET_okLOGICAL8
4207 case FFEINFO_kindtypeLOGICAL8
:
4208 *(array
.logical8
+ offset
) = constant
.logical8
;
4213 assert ("bad LOGICAL kindtype" == NULL
);
4218 case FFEINFO_basictypeREAL
:
4221 #if FFETARGET_okREAL1
4222 case FFEINFO_kindtypeREAL1
:
4223 *(array
.real1
+ offset
) = constant
.real1
;
4227 #if FFETARGET_okREAL2
4228 case FFEINFO_kindtypeREAL2
:
4229 *(array
.real2
+ offset
) = constant
.real2
;
4233 #if FFETARGET_okREAL3
4234 case FFEINFO_kindtypeREAL3
:
4235 *(array
.real3
+ offset
) = constant
.real3
;
4239 #if FFETARGET_okREAL4
4240 case FFEINFO_kindtypeREAL4
:
4241 *(array
.real4
+ offset
) = constant
.real4
;
4245 #if FFETARGET_okREAL5
4246 case FFEINFO_kindtypeREAL5
:
4247 *(array
.real5
+ offset
) = constant
.real5
;
4251 #if FFETARGET_okREAL6
4252 case FFEINFO_kindtypeREAL6
:
4253 *(array
.real6
+ offset
) = constant
.real6
;
4257 #if FFETARGET_okREAL7
4258 case FFEINFO_kindtypeREAL7
:
4259 *(array
.real7
+ offset
) = constant
.real7
;
4263 #if FFETARGET_okREAL8
4264 case FFEINFO_kindtypeREAL8
:
4265 *(array
.real8
+ offset
) = constant
.real8
;
4270 assert ("bad REAL kindtype" == NULL
);
4275 case FFEINFO_basictypeCOMPLEX
:
4278 #if FFETARGET_okCOMPLEX1
4279 case FFEINFO_kindtypeREAL1
:
4280 *(array
.complex1
+ offset
) = constant
.complex1
;
4284 #if FFETARGET_okCOMPLEX2
4285 case FFEINFO_kindtypeREAL2
:
4286 *(array
.complex2
+ offset
) = constant
.complex2
;
4290 #if FFETARGET_okCOMPLEX3
4291 case FFEINFO_kindtypeREAL3
:
4292 *(array
.complex3
+ offset
) = constant
.complex3
;
4296 #if FFETARGET_okCOMPLEX4
4297 case FFEINFO_kindtypeREAL4
:
4298 *(array
.complex4
+ offset
) = constant
.complex4
;
4302 #if FFETARGET_okCOMPLEX5
4303 case FFEINFO_kindtypeREAL5
:
4304 *(array
.complex5
+ offset
) = constant
.complex5
;
4308 #if FFETARGET_okCOMPLEX6
4309 case FFEINFO_kindtypeREAL6
:
4310 *(array
.complex6
+ offset
) = constant
.complex6
;
4314 #if FFETARGET_okCOMPLEX7
4315 case FFEINFO_kindtypeREAL7
:
4316 *(array
.complex7
+ offset
) = constant
.complex7
;
4320 #if FFETARGET_okCOMPLEX8
4321 case FFEINFO_kindtypeREAL8
:
4322 *(array
.complex8
+ offset
) = constant
.complex8
;
4327 assert ("bad COMPLEX kindtype" == NULL
);
4332 case FFEINFO_basictypeCHARACTER
:
4335 #if FFETARGET_okCHARACTER1
4336 case FFEINFO_kindtypeCHARACTER1
:
4337 memcpy (array
.character1
+ offset
,
4338 ffetarget_text_character1 (constant
.character1
),
4339 ffetarget_length_character1 (constant
.character1
));
4343 #if FFETARGET_okCHARACTER2
4344 case FFEINFO_kindtypeCHARACTER2
:
4345 memcpy (array
.character2
+ offset
,
4346 ffetarget_text_character2 (constant
.character2
),
4347 ffetarget_length_character2 (constant
.character2
));
4351 #if FFETARGET_okCHARACTER3
4352 case FFEINFO_kindtypeCHARACTER3
:
4353 memcpy (array
.character3
+ offset
,
4354 ffetarget_text_character3 (constant
.character3
),
4355 ffetarget_length_character3 (constant
.character3
));
4359 #if FFETARGET_okCHARACTER4
4360 case FFEINFO_kindtypeCHARACTER4
:
4361 memcpy (array
.character4
+ offset
,
4362 ffetarget_text_character4 (constant
.character4
),
4363 ffetarget_length_character4 (constant
.character4
));
4367 #if FFETARGET_okCHARACTER5
4368 case FFEINFO_kindtypeCHARACTER5
:
4369 memcpy (array
.character5
+ offset
,
4370 ffetarget_text_character5 (constant
.character5
),
4371 ffetarget_length_character5 (constant
.character5
));
4375 #if FFETARGET_okCHARACTER6
4376 case FFEINFO_kindtypeCHARACTER6
:
4377 memcpy (array
.character6
+ offset
,
4378 ffetarget_text_character6 (constant
.character6
),
4379 ffetarget_length_character6 (constant
.character6
));
4383 #if FFETARGET_okCHARACTER7
4384 case FFEINFO_kindtypeCHARACTER7
:
4385 memcpy (array
.character7
+ offset
,
4386 ffetarget_text_character7 (constant
.character7
),
4387 ffetarget_length_character7 (constant
.character7
));
4391 #if FFETARGET_okCHARACTER8
4392 case FFEINFO_kindtypeCHARACTER8
:
4393 memcpy (array
.character8
+ offset
,
4394 ffetarget_text_character8 (constant
.character8
),
4395 ffetarget_length_character8 (constant
.character8
));
4400 assert ("bad CHARACTER kindtype" == NULL
);
4406 assert ("bad basictype" == NULL
);
4411 /* ffebld_constantunion_dump -- Dump a constant
4415 #if FFECOM_targetCURRENT == FFECOM_targetFFE
4417 ffebld_constantunion_dump (ffebldConstantUnion u
, ffeinfoBasictype bt
,
4422 case FFEINFO_basictypeINTEGER
:
4425 #if FFETARGET_okINTEGER1
4426 case FFEINFO_kindtypeINTEGER1
:
4427 ffetarget_print_integer1 (dmpout
, u
.integer1
);
4431 #if FFETARGET_okINTEGER2
4432 case FFEINFO_kindtypeINTEGER2
:
4433 ffetarget_print_integer2 (dmpout
, u
.integer2
);
4437 #if FFETARGET_okINTEGER3
4438 case FFEINFO_kindtypeINTEGER3
:
4439 ffetarget_print_integer3 (dmpout
, u
.integer3
);
4443 #if FFETARGET_okINTEGER4
4444 case FFEINFO_kindtypeINTEGER4
:
4445 ffetarget_print_integer4 (dmpout
, u
.integer4
);
4449 #if FFETARGET_okINTEGER5
4450 case FFEINFO_kindtypeINTEGER5
:
4451 ffetarget_print_integer5 (dmpout
, u
.integer5
);
4455 #if FFETARGET_okINTEGER6
4456 case FFEINFO_kindtypeINTEGER6
:
4457 ffetarget_print_integer6 (dmpout
, u
.integer6
);
4461 #if FFETARGET_okINTEGER7
4462 case FFEINFO_kindtypeINTEGER7
:
4463 ffetarget_print_integer7 (dmpout
, u
.integer7
);
4467 #if FFETARGET_okINTEGER8
4468 case FFEINFO_kindtypeINTEGER8
:
4469 ffetarget_print_integer8 (dmpout
, u
.integer8
);
4474 assert ("bad INTEGER kindtype" == NULL
);
4479 case FFEINFO_basictypeLOGICAL
:
4482 #if FFETARGET_okLOGICAL1
4483 case FFEINFO_kindtypeLOGICAL1
:
4484 ffetarget_print_logical1 (dmpout
, u
.logical1
);
4488 #if FFETARGET_okLOGICAL2
4489 case FFEINFO_kindtypeLOGICAL2
:
4490 ffetarget_print_logical2 (dmpout
, u
.logical2
);
4494 #if FFETARGET_okLOGICAL3
4495 case FFEINFO_kindtypeLOGICAL3
:
4496 ffetarget_print_logical3 (dmpout
, u
.logical3
);
4500 #if FFETARGET_okLOGICAL4
4501 case FFEINFO_kindtypeLOGICAL4
:
4502 ffetarget_print_logical4 (dmpout
, u
.logical4
);
4506 #if FFETARGET_okLOGICAL5
4507 case FFEINFO_kindtypeLOGICAL5
:
4508 ffetarget_print_logical5 (dmpout
, u
.logical5
);
4512 #if FFETARGET_okLOGICAL6
4513 case FFEINFO_kindtypeLOGICAL6
:
4514 ffetarget_print_logical6 (dmpout
, u
.logical6
);
4518 #if FFETARGET_okLOGICAL7
4519 case FFEINFO_kindtypeLOGICAL7
:
4520 ffetarget_print_logical7 (dmpout
, u
.logical7
);
4524 #if FFETARGET_okLOGICAL8
4525 case FFEINFO_kindtypeLOGICAL8
:
4526 ffetarget_print_logical8 (dmpout
, u
.logical8
);
4531 assert ("bad LOGICAL kindtype" == NULL
);
4536 case FFEINFO_basictypeREAL
:
4539 #if FFETARGET_okREAL1
4540 case FFEINFO_kindtypeREAL1
:
4541 ffetarget_print_real1 (dmpout
, u
.real1
);
4545 #if FFETARGET_okREAL2
4546 case FFEINFO_kindtypeREAL2
:
4547 ffetarget_print_real2 (dmpout
, u
.real2
);
4551 #if FFETARGET_okREAL3
4552 case FFEINFO_kindtypeREAL3
:
4553 ffetarget_print_real3 (dmpout
, u
.real3
);
4557 #if FFETARGET_okREAL4
4558 case FFEINFO_kindtypeREAL4
:
4559 ffetarget_print_real4 (dmpout
, u
.real4
);
4563 #if FFETARGET_okREAL5
4564 case FFEINFO_kindtypeREAL5
:
4565 ffetarget_print_real5 (dmpout
, u
.real5
);
4569 #if FFETARGET_okREAL6
4570 case FFEINFO_kindtypeREAL6
:
4571 ffetarget_print_real6 (dmpout
, u
.real6
);
4575 #if FFETARGET_okREAL7
4576 case FFEINFO_kindtypeREAL7
:
4577 ffetarget_print_real7 (dmpout
, u
.real7
);
4581 #if FFETARGET_okREAL8
4582 case FFEINFO_kindtypeREAL8
:
4583 ffetarget_print_real8 (dmpout
, u
.real8
);
4588 assert ("bad REAL kindtype" == NULL
);
4593 case FFEINFO_basictypeCOMPLEX
:
4596 #if FFETARGET_okCOMPLEX1
4597 case FFEINFO_kindtypeREAL1
:
4598 fprintf (dmpout
, "(");
4599 ffetarget_print_real1 (dmpout
, u
.complex1
.real
);
4600 fprintf (dmpout
, ",");
4601 ffetarget_print_real1 (dmpout
, u
.complex1
.imaginary
);
4602 fprintf (dmpout
, ")");
4606 #if FFETARGET_okCOMPLEX2
4607 case FFEINFO_kindtypeREAL2
:
4608 fprintf (dmpout
, "(");
4609 ffetarget_print_real2 (dmpout
, u
.complex2
.real
);
4610 fprintf (dmpout
, ",");
4611 ffetarget_print_real2 (dmpout
, u
.complex2
.imaginary
);
4612 fprintf (dmpout
, ")");
4616 #if FFETARGET_okCOMPLEX3
4617 case FFEINFO_kindtypeREAL3
:
4618 fprintf (dmpout
, "(");
4619 ffetarget_print_real3 (dmpout
, u
.complex3
.real
);
4620 fprintf (dmpout
, ",");
4621 ffetarget_print_real3 (dmpout
, u
.complex3
.imaginary
);
4622 fprintf (dmpout
, ")");
4626 #if FFETARGET_okCOMPLEX4
4627 case FFEINFO_kindtypeREAL4
:
4628 fprintf (dmpout
, "(");
4629 ffetarget_print_real4 (dmpout
, u
.complex4
.real
);
4630 fprintf (dmpout
, ",");
4631 ffetarget_print_real4 (dmpout
, u
.complex4
.imaginary
);
4632 fprintf (dmpout
, ")");
4636 #if FFETARGET_okCOMPLEX5
4637 case FFEINFO_kindtypeREAL5
:
4638 fprintf (dmpout
, "(");
4639 ffetarget_print_real5 (dmpout
, u
.complex5
.real
);
4640 fprintf (dmpout
, ",");
4641 ffetarget_print_real5 (dmpout
, u
.complex5
.imaginary
);
4642 fprintf (dmpout
, ")");
4646 #if FFETARGET_okCOMPLEX6
4647 case FFEINFO_kindtypeREAL6
:
4648 fprintf (dmpout
, "(");
4649 ffetarget_print_real6 (dmpout
, u
.complex6
.real
);
4650 fprintf (dmpout
, ",");
4651 ffetarget_print_real6 (dmpout
, u
.complex6
.imaginary
);
4652 fprintf (dmpout
, ")");
4656 #if FFETARGET_okCOMPLEX7
4657 case FFEINFO_kindtypeREAL7
:
4658 fprintf (dmpout
, "(");
4659 ffetarget_print_real7 (dmpout
, u
.complex7
.real
);
4660 fprintf (dmpout
, ",");
4661 ffetarget_print_real7 (dmpout
, u
.complex7
.imaginary
);
4662 fprintf (dmpout
, ")");
4666 #if FFETARGET_okCOMPLEX8
4667 case FFEINFO_kindtypeREAL8
:
4668 fprintf (dmpout
, "(");
4669 ffetarget_print_real8 (dmpout
, u
.complex8
.real
);
4670 fprintf (dmpout
, ",");
4671 ffetarget_print_real8 (dmpout
, u
.complex8
.imaginary
);
4672 fprintf (dmpout
, ")");
4677 assert ("bad COMPLEX kindtype" == NULL
);
4682 case FFEINFO_basictypeCHARACTER
:
4685 #if FFETARGET_okCHARACTER1
4686 case FFEINFO_kindtypeCHARACTER1
:
4687 ffetarget_print_character1 (dmpout
, u
.character1
);
4691 #if FFETARGET_okCHARACTER2
4692 case FFEINFO_kindtypeCHARACTER2
:
4693 ffetarget_print_character2 (dmpout
, u
.character2
);
4697 #if FFETARGET_okCHARACTER3
4698 case FFEINFO_kindtypeCHARACTER3
:
4699 ffetarget_print_character3 (dmpout
, u
.character3
);
4703 #if FFETARGET_okCHARACTER4
4704 case FFEINFO_kindtypeCHARACTER4
:
4705 ffetarget_print_character4 (dmpout
, u
.character4
);
4709 #if FFETARGET_okCHARACTER5
4710 case FFEINFO_kindtypeCHARACTER5
:
4711 ffetarget_print_character5 (dmpout
, u
.character5
);
4715 #if FFETARGET_okCHARACTER6
4716 case FFEINFO_kindtypeCHARACTER6
:
4717 ffetarget_print_character6 (dmpout
, u
.character6
);
4721 #if FFETARGET_okCHARACTER7
4722 case FFEINFO_kindtypeCHARACTER7
:
4723 ffetarget_print_character7 (dmpout
, u
.character7
);
4727 #if FFETARGET_okCHARACTER8
4728 case FFEINFO_kindtypeCHARACTER8
:
4729 ffetarget_print_character8 (dmpout
, u
.character8
);
4734 assert ("bad CHARACTER kindtype" == NULL
);
4740 assert ("bad basictype" == NULL
);
4746 /* ffebld_dump -- Dump expression tree in concise form
4751 #if FFECOM_targetCURRENT == FFECOM_targetFFE
4753 ffebld_dump (ffebld b
)
4760 fprintf (dmpout
, "(null)");
4764 switch (ffebld_op (b
))
4767 fputs ("[", dmpout
);
4770 ffebld_dump (ffebld_head (b
));
4771 if ((b
= ffebld_trail (b
)) != NULL
)
4772 fputs (",", dmpout
);
4774 fputs ("]", dmpout
);
4778 case FFEBLD_opBOUNDS
:
4779 case FFEBLD_opREPEAT
:
4780 case FFEBLD_opLABTER
:
4781 case FFEBLD_opLABTOK
:
4782 case FFEBLD_opIMPDO
:
4783 fputs (ffebld_op_string (ffebld_op (b
)), dmpout
);
4787 if (ffeinfo_size (ffebld_info (b
)) != FFETARGET_charactersizeNONE
)
4788 fprintf (dmpout
, "%s%d%s%s*%" ffetargetCharacterSize_f
"u",
4789 ffebld_op_string (ffebld_op (b
)),
4790 (int) ffeinfo_rank (ffebld_info (b
)),
4791 ffeinfo_basictype_string (ffeinfo_basictype (ffebld_info (b
))),
4792 ffeinfo_kindtype_string (ffeinfo_kindtype (ffebld_info (b
))),
4793 ffeinfo_size (ffebld_info (b
)));
4795 fprintf (dmpout
, "%s%d%s%s", ffebld_op_string (ffebld_op (b
)),
4796 (int) ffeinfo_rank (ffebld_info (b
)),
4797 ffeinfo_basictype_string (ffeinfo_basictype (ffebld_info (b
))),
4798 ffeinfo_kindtype_string (ffeinfo_kindtype (ffebld_info (b
))));
4799 if ((k
= ffeinfo_kind (ffebld_info (b
))) != FFEINFO_kindNONE
)
4800 fprintf (dmpout
, "/%s", ffeinfo_kind_string (k
));
4801 if ((w
= ffeinfo_where (ffebld_info (b
))) != FFEINFO_whereNONE
)
4802 fprintf (dmpout
, "@%s", ffeinfo_where_string (w
));
4806 switch (ffebld_arity (b
))
4809 fputs ("(", dmpout
);
4810 ffebld_dump (ffebld_left (b
));
4811 fputs (",", dmpout
);
4812 ffebld_dump (ffebld_right (b
));
4813 fputs (")", dmpout
);
4817 fputs ("(", dmpout
);
4818 ffebld_dump (ffebld_left (b
));
4819 fputs (")", dmpout
);
4823 switch (ffebld_op (b
))
4825 case FFEBLD_opCONTER
:
4826 fprintf (dmpout
, "<");
4827 ffebld_constant_dump (b
->u
.conter
.expr
);
4828 fprintf (dmpout
, ">");
4831 case FFEBLD_opACCTER
:
4832 fprintf (dmpout
, "<");
4833 ffebld_constantarray_dump (b
->u
.accter
.array
,
4834 ffeinfo_basictype (ffebld_info (b
)),
4835 ffeinfo_kindtype (ffebld_info (b
)),
4836 ffebit_size (b
->u
.accter
.bits
), b
->u
.accter
.bits
);
4837 fprintf (dmpout
, ">");
4840 case FFEBLD_opARRTER
:
4841 fprintf (dmpout
, "<");
4842 ffebld_constantarray_dump (b
->u
.arrter
.array
,
4843 ffeinfo_basictype (ffebld_info (b
)),
4844 ffeinfo_kindtype (ffebld_info (b
)),
4845 b
->u
.arrter
.size
, NULL
);
4846 fprintf (dmpout
, ">");
4849 case FFEBLD_opLABTER
:
4850 if (b
->u
.labter
== NULL
)
4851 fprintf (dmpout
, "<>");
4853 fprintf (dmpout
, "<%" ffelabValue_f
"u>", ffelab_value (b
->u
.labter
));
4856 case FFEBLD_opLABTOK
:
4857 fprintf (dmpout
, "<%s>", ffelex_token_text (b
->u
.labtok
));
4860 case FFEBLD_opSYMTER
:
4861 fprintf (dmpout
, "<");
4862 ffesymbol_dump (b
->u
.symter
.symbol
);
4863 if ((b
->u
.symter
.generic
!= FFEINTRIN_genNONE
)
4864 || (b
->u
.symter
.specific
!= FFEINTRIN_specNONE
))
4865 fprintf (dmpout
, "{%s:%s:%s}",
4866 ffeintrin_name_generic (b
->u
.symter
.generic
),
4867 ffeintrin_name_specific (b
->u
.symter
.specific
),
4868 ffeintrin_name_implementation (b
->u
.symter
.implementation
));
4869 if (b
->u
.symter
.do_iter
)
4870 fprintf (dmpout
, "{/do-iter}");
4871 fprintf (dmpout
, ">");
4881 /* ffebld_dump_prefix -- Dump the prefix for a constant of a given type
4883 ffebld_dump_prefix(dmpout,FFEINFO_basictypeINTEGER,
4884 FFEINFO_kindtypeINTEGER1); */
4886 #if FFECOM_targetCURRENT == FFECOM_targetFFE
4888 ffebld_dump_prefix (FILE *out
, ffeinfoBasictype bt
, ffeinfoKindtype kt
)
4892 case FFEINFO_basictypeINTEGER
:
4895 #if FFETARGET_okINTEGER1
4896 case FFEINFO_kindtypeINTEGER1
:
4897 fprintf (out
, "I" STRX (FFETARGET_kindINTEGER1
) "/");
4901 #if FFETARGET_okINTEGER2
4902 case FFEINFO_kindtypeINTEGER2
:
4903 fprintf (out
, "I" STRX (FFETARGET_kindINTEGER2
) "/");
4907 #if FFETARGET_okINTEGER3
4908 case FFEINFO_kindtypeINTEGER3
:
4909 fprintf (out
, "I" STRX (FFETARGET_kindINTEGER3
) "/");
4913 #if FFETARGET_okINTEGER4
4914 case FFEINFO_kindtypeINTEGER4
:
4915 fprintf (out
, "I" STRX (FFETARGET_kindINTEGER4
) "/");
4919 #if FFETARGET_okINTEGER5
4920 case FFEINFO_kindtypeINTEGER5
:
4921 fprintf (out
, "I" STRX (FFETARGET_kindINTEGER5
) "/");
4925 #if FFETARGET_okINTEGER6
4926 case FFEINFO_kindtypeINTEGER6
:
4927 fprintf (out
, "I" STRX (FFETARGET_kindINTEGER6
) "/");
4931 #if FFETARGET_okINTEGER7
4932 case FFEINFO_kindtypeINTEGER7
:
4933 fprintf (out
, "I" STRX (FFETARGET_kindINTEGER7
) "/");
4937 #if FFETARGET_okINTEGER8
4938 case FFEINFO_kindtypeINTEGER8
:
4939 fprintf (out
, "I" STRX (FFETARGET_kindINTEGER8
) "/");
4944 assert ("bad INTEGER kindtype" == NULL
);
4949 case FFEINFO_basictypeLOGICAL
:
4952 #if FFETARGET_okLOGICAL1
4953 case FFEINFO_kindtypeLOGICAL1
:
4954 fprintf (out
, "L" STRX (FFETARGET_kindLOGICAL1
) "/");
4958 #if FFETARGET_okLOGICAL2
4959 case FFEINFO_kindtypeLOGICAL2
:
4960 fprintf (out
, "L" STRX (FFETARGET_kindLOGICAL2
) "/");
4964 #if FFETARGET_okLOGICAL3
4965 case FFEINFO_kindtypeLOGICAL3
:
4966 fprintf (out
, "L" STRX (FFETARGET_kindLOGICAL3
) "/");
4970 #if FFETARGET_okLOGICAL4
4971 case FFEINFO_kindtypeLOGICAL4
:
4972 fprintf (out
, "L" STRX (FFETARGET_kindLOGICAL4
) "/");
4976 #if FFETARGET_okLOGICAL5
4977 case FFEINFO_kindtypeLOGICAL5
:
4978 fprintf (out
, "L" STRX (FFETARGET_kindLOGICAL5
) "/");
4982 #if FFETARGET_okLOGICAL6
4983 case FFEINFO_kindtypeLOGICAL6
:
4984 fprintf (out
, "L" STRX (FFETARGET_kindLOGICAL6
) "/");
4988 #if FFETARGET_okLOGICAL7
4989 case FFEINFO_kindtypeLOGICAL7
:
4990 fprintf (out
, "L" STRX (FFETARGET_kindLOGICAL7
) "/");
4994 #if FFETARGET_okLOGICAL8
4995 case FFEINFO_kindtypeLOGICAL8
:
4996 fprintf (out
, "L" STRX (FFETARGET_kindLOGICAL8
) "/");
5001 assert ("bad LOGICAL kindtype" == NULL
);
5006 case FFEINFO_basictypeREAL
:
5009 #if FFETARGET_okREAL1
5010 case FFEINFO_kindtypeREAL1
:
5011 fprintf (out
, "R" STRX (FFETARGET_kindREAL1
) "/");
5015 #if FFETARGET_okREAL2
5016 case FFEINFO_kindtypeREAL2
:
5017 fprintf (out
, "R" STRX (FFETARGET_kindREAL2
) "/");
5021 #if FFETARGET_okREAL3
5022 case FFEINFO_kindtypeREAL3
:
5023 fprintf (out
, "R" STRX (FFETARGET_kindREAL3
) "/");
5027 #if FFETARGET_okREAL4
5028 case FFEINFO_kindtypeREAL4
:
5029 fprintf (out
, "R" STRX (FFETARGET_kindREAL4
) "/");
5033 #if FFETARGET_okREAL5
5034 case FFEINFO_kindtypeREAL5
:
5035 fprintf (out
, "R" STRX (FFETARGET_kindREAL5
) "/");
5039 #if FFETARGET_okREAL6
5040 case FFEINFO_kindtypeREAL6
:
5041 fprintf (out
, "R" STRX (FFETARGET_kindREAL6
) "/");
5045 #if FFETARGET_okREAL7
5046 case FFEINFO_kindtypeREAL7
:
5047 fprintf (out
, "R" STRX (FFETARGET_kindREAL7
) "/");
5051 #if FFETARGET_okREAL8
5052 case FFEINFO_kindtypeREAL8
:
5053 fprintf (out
, "R" STRX (FFETARGET_kindREAL8
) "/");
5058 assert ("bad REAL kindtype" == NULL
);
5063 case FFEINFO_basictypeCOMPLEX
:
5066 #if FFETARGET_okCOMPLEX1
5067 case FFEINFO_kindtypeREAL1
:
5068 fprintf (out
, "C" STRX (FFETARGET_kindCOMPLEX1
) "/");
5072 #if FFETARGET_okCOMPLEX2
5073 case FFEINFO_kindtypeREAL2
:
5074 fprintf (out
, "C" STRX (FFETARGET_kindCOMPLEX2
) "/");
5078 #if FFETARGET_okCOMPLEX3
5079 case FFEINFO_kindtypeREAL3
:
5080 fprintf (out
, "C" STRX (FFETARGET_kindCOMPLEX3
) "/");
5084 #if FFETARGET_okCOMPLEX4
5085 case FFEINFO_kindtypeREAL4
:
5086 fprintf (out
, "C" STRX (FFETARGET_kindCOMPLEX4
) "/");
5090 #if FFETARGET_okCOMPLEX5
5091 case FFEINFO_kindtypeREAL5
:
5092 fprintf (out
, "C" STRX (FFETARGET_kindCOMPLEX5
) "/");
5096 #if FFETARGET_okCOMPLEX6
5097 case FFEINFO_kindtypeREAL6
:
5098 fprintf (out
, "C" STRX (FFETARGET_kindCOMPLEX6
) "/");
5102 #if FFETARGET_okCOMPLEX7
5103 case FFEINFO_kindtypeREAL7
:
5104 fprintf (out
, "C" STRX (FFETARGET_kindCOMPLEX7
) "/");
5108 #if FFETARGET_okCOMPLEX8
5109 case FFEINFO_kindtypeREAL8
:
5110 fprintf (out
, "C" STRX (FFETARGET_kindCOMPLEX8
) "/");
5115 assert ("bad COMPLEX kindtype" == NULL
);
5120 case FFEINFO_basictypeCHARACTER
:
5123 #if FFETARGET_okCHARACTER1
5124 case FFEINFO_kindtypeCHARACTER1
:
5125 fprintf (out
, "A" STRX (FFETARGET_kindCHARACTER1
) "/");
5129 #if FFETARGET_okCHARACTER2
5130 case FFEINFO_kindtypeCHARACTER2
:
5131 fprintf (out
, "A" STRX (FFETARGET_kindCHARACTER2
) "/");
5135 #if FFETARGET_okCHARACTER3
5136 case FFEINFO_kindtypeCHARACTER3
:
5137 fprintf (out
, "A" STRX (FFETARGET_kindCHARACTER3
) "/");
5141 #if FFETARGET_okCHARACTER4
5142 case FFEINFO_kindtypeCHARACTER4
:
5143 fprintf (out
, "A" STRX (FFETARGET_kindCHARACTER4
) "/");
5147 #if FFETARGET_okCHARACTER5
5148 case FFEINFO_kindtypeCHARACTER5
:
5149 fprintf (out
, "A" STRX (FFETARGET_kindCHARACTER5
) "/");
5153 #if FFETARGET_okCHARACTER6
5154 case FFEINFO_kindtypeCHARACTER6
:
5155 fprintf (out
, "A" STRX (FFETARGET_kindCHARACTER6
) "/");
5159 #if FFETARGET_okCHARACTER7
5160 case FFEINFO_kindtypeCHARACTER7
:
5161 fprintf (out
, "A" STRX (FFETARGET_kindCHARACTER7
) "/");
5165 #if FFETARGET_okCHARACTER8
5166 case FFEINFO_kindtypeCHARACTER8
:
5167 fprintf (out
, "A" STRX (FFETARGET_kindCHARACTER8
) "/");
5172 assert ("bad CHARACTER kindtype" == NULL
);
5178 assert ("bad basictype" == NULL
);
5179 fprintf (out
, "?/?");
5185 /* ffebld_init_0 -- Initialize the module
5192 assert (FFEBLD_op
== ARRAY_SIZE (ffebld_op_string_
));
5193 assert (FFEBLD_op
== ARRAY_SIZE (ffebld_arity_op_
));
5196 /* ffebld_init_1 -- Initialize the module for a file
5203 #if FFEBLD_whereconstCURRENT_ == FFEBLD_whereconstFILE_
5206 #if FFETARGET_okCHARACTER1
5207 ffebld_constant_character1_
= NULL
;
5209 #if FFETARGET_okCHARACTER2
5210 ffebld_constant_character2_
= NULL
;
5212 #if FFETARGET_okCHARACTER3
5213 ffebld_constant_character3_
= NULL
;
5215 #if FFETARGET_okCHARACTER4
5216 ffebld_constant_character4_
= NULL
;
5218 #if FFETARGET_okCHARACTER5
5219 ffebld_constant_character5_
= NULL
;
5221 #if FFETARGET_okCHARACTER6
5222 ffebld_constant_character6_
= NULL
;
5224 #if FFETARGET_okCHARACTER7
5225 ffebld_constant_character7_
= NULL
;
5227 #if FFETARGET_okCHARACTER8
5228 ffebld_constant_character8_
= NULL
;
5230 #if FFETARGET_okCOMPLEX1
5231 ffebld_constant_complex1_
= NULL
;
5233 #if FFETARGET_okCOMPLEX2
5234 ffebld_constant_complex2_
= NULL
;
5236 #if FFETARGET_okCOMPLEX3
5237 ffebld_constant_complex3_
= NULL
;
5239 #if FFETARGET_okCOMPLEX4
5240 ffebld_constant_complex4_
= NULL
;
5242 #if FFETARGET_okCOMPLEX5
5243 ffebld_constant_complex5_
= NULL
;
5245 #if FFETARGET_okCOMPLEX6
5246 ffebld_constant_complex6_
= NULL
;
5248 #if FFETARGET_okCOMPLEX7
5249 ffebld_constant_complex7_
= NULL
;
5251 #if FFETARGET_okCOMPLEX8
5252 ffebld_constant_complex8_
= NULL
;
5254 #if FFETARGET_okINTEGER1
5255 ffebld_constant_integer1_
= NULL
;
5257 #if FFETARGET_okINTEGER2
5258 ffebld_constant_integer2_
= NULL
;
5260 #if FFETARGET_okINTEGER3
5261 ffebld_constant_integer3_
= NULL
;
5263 #if FFETARGET_okINTEGER4
5264 ffebld_constant_integer4_
= NULL
;
5266 #if FFETARGET_okINTEGER5
5267 ffebld_constant_integer5_
= NULL
;
5269 #if FFETARGET_okINTEGER6
5270 ffebld_constant_integer6_
= NULL
;
5272 #if FFETARGET_okINTEGER7
5273 ffebld_constant_integer7_
= NULL
;
5275 #if FFETARGET_okINTEGER8
5276 ffebld_constant_integer8_
= NULL
;
5278 #if FFETARGET_okLOGICAL1
5279 ffebld_constant_logical1_
= NULL
;
5281 #if FFETARGET_okLOGICAL2
5282 ffebld_constant_logical2_
= NULL
;
5284 #if FFETARGET_okLOGICAL3
5285 ffebld_constant_logical3_
= NULL
;
5287 #if FFETARGET_okLOGICAL4
5288 ffebld_constant_logical4_
= NULL
;
5290 #if FFETARGET_okLOGICAL5
5291 ffebld_constant_logical5_
= NULL
;
5293 #if FFETARGET_okLOGICAL6
5294 ffebld_constant_logical6_
= NULL
;
5296 #if FFETARGET_okLOGICAL7
5297 ffebld_constant_logical7_
= NULL
;
5299 #if FFETARGET_okLOGICAL8
5300 ffebld_constant_logical8_
= NULL
;
5302 #if FFETARGET_okREAL1
5303 ffebld_constant_real1_
= NULL
;
5305 #if FFETARGET_okREAL2
5306 ffebld_constant_real2_
= NULL
;
5308 #if FFETARGET_okREAL3
5309 ffebld_constant_real3_
= NULL
;
5311 #if FFETARGET_okREAL4
5312 ffebld_constant_real4_
= NULL
;
5314 #if FFETARGET_okREAL5
5315 ffebld_constant_real5_
= NULL
;
5317 #if FFETARGET_okREAL6
5318 ffebld_constant_real6_
= NULL
;
5320 #if FFETARGET_okREAL7
5321 ffebld_constant_real7_
= NULL
;
5323 #if FFETARGET_okREAL8
5324 ffebld_constant_real8_
= NULL
;
5326 ffebld_constant_hollerith_
= NULL
;
5327 for (i
= FFEBLD_constTYPELESS_FIRST
; i
<= FFEBLD_constTYPELESS_LAST
; ++i
)
5328 ffebld_constant_typeless_
[i
- FFEBLD_constTYPELESS_FIRST
] = NULL
;
5332 /* ffebld_init_2 -- Initialize the module
5339 #if FFEBLD_whereconstCURRENT_ == FFEBLD_whereconstPROGUNIT_
5343 ffebld_pool_stack_
.next
= NULL
;
5344 ffebld_pool_stack_
.pool
= ffe_pool_program_unit ();
5345 #if FFEBLD_whereconstCURRENT_ == FFEBLD_whereconstPROGUNIT_
5346 #if FFETARGET_okCHARACTER1
5347 ffebld_constant_character1_
= NULL
;
5349 #if FFETARGET_okCHARACTER2
5350 ffebld_constant_character2_
= NULL
;
5352 #if FFETARGET_okCHARACTER3
5353 ffebld_constant_character3_
= NULL
;
5355 #if FFETARGET_okCHARACTER4
5356 ffebld_constant_character4_
= NULL
;
5358 #if FFETARGET_okCHARACTER5
5359 ffebld_constant_character5_
= NULL
;
5361 #if FFETARGET_okCHARACTER6
5362 ffebld_constant_character6_
= NULL
;
5364 #if FFETARGET_okCHARACTER7
5365 ffebld_constant_character7_
= NULL
;
5367 #if FFETARGET_okCHARACTER8
5368 ffebld_constant_character8_
= NULL
;
5370 #if FFETARGET_okCOMPLEX1
5371 ffebld_constant_complex1_
= NULL
;
5373 #if FFETARGET_okCOMPLEX2
5374 ffebld_constant_complex2_
= NULL
;
5376 #if FFETARGET_okCOMPLEX3
5377 ffebld_constant_complex3_
= NULL
;
5379 #if FFETARGET_okCOMPLEX4
5380 ffebld_constant_complex4_
= NULL
;
5382 #if FFETARGET_okCOMPLEX5
5383 ffebld_constant_complex5_
= NULL
;
5385 #if FFETARGET_okCOMPLEX6
5386 ffebld_constant_complex6_
= NULL
;
5388 #if FFETARGET_okCOMPLEX7
5389 ffebld_constant_complex7_
= NULL
;
5391 #if FFETARGET_okCOMPLEX8
5392 ffebld_constant_complex8_
= NULL
;
5394 #if FFETARGET_okINTEGER1
5395 ffebld_constant_integer1_
= NULL
;
5397 #if FFETARGET_okINTEGER2
5398 ffebld_constant_integer2_
= NULL
;
5400 #if FFETARGET_okINTEGER3
5401 ffebld_constant_integer3_
= NULL
;
5403 #if FFETARGET_okINTEGER4
5404 ffebld_constant_integer4_
= NULL
;
5406 #if FFETARGET_okINTEGER5
5407 ffebld_constant_integer5_
= NULL
;
5409 #if FFETARGET_okINTEGER6
5410 ffebld_constant_integer6_
= NULL
;
5412 #if FFETARGET_okINTEGER7
5413 ffebld_constant_integer7_
= NULL
;
5415 #if FFETARGET_okINTEGER8
5416 ffebld_constant_integer8_
= NULL
;
5418 #if FFETARGET_okLOGICAL1
5419 ffebld_constant_logical1_
= NULL
;
5421 #if FFETARGET_okLOGICAL2
5422 ffebld_constant_logical2_
= NULL
;
5424 #if FFETARGET_okLOGICAL3
5425 ffebld_constant_logical3_
= NULL
;
5427 #if FFETARGET_okLOGICAL4
5428 ffebld_constant_logical4_
= NULL
;
5430 #if FFETARGET_okLOGICAL5
5431 ffebld_constant_logical5_
= NULL
;
5433 #if FFETARGET_okLOGICAL6
5434 ffebld_constant_logical6_
= NULL
;
5436 #if FFETARGET_okLOGICAL7
5437 ffebld_constant_logical7_
= NULL
;
5439 #if FFETARGET_okLOGICAL8
5440 ffebld_constant_logical8_
= NULL
;
5442 #if FFETARGET_okREAL1
5443 ffebld_constant_real1_
= NULL
;
5445 #if FFETARGET_okREAL2
5446 ffebld_constant_real2_
= NULL
;
5448 #if FFETARGET_okREAL3
5449 ffebld_constant_real3_
= NULL
;
5451 #if FFETARGET_okREAL4
5452 ffebld_constant_real4_
= NULL
;
5454 #if FFETARGET_okREAL5
5455 ffebld_constant_real5_
= NULL
;
5457 #if FFETARGET_okREAL6
5458 ffebld_constant_real6_
= NULL
;
5460 #if FFETARGET_okREAL7
5461 ffebld_constant_real7_
= NULL
;
5463 #if FFETARGET_okREAL8
5464 ffebld_constant_real8_
= NULL
;
5466 ffebld_constant_hollerith_
= NULL
;
5467 for (i
= FFEBLD_constTYPELESS_FIRST
; i
<= FFEBLD_constTYPELESS_LAST
; ++i
)
5468 ffebld_constant_typeless_
[i
- FFEBLD_constTYPELESS_FIRST
] = NULL
;
5472 /* ffebld_list_length -- Return # of opITEMs in list
5474 ffebld list; // Must be NULL or opITEM
5475 ffebldListLength length;
5476 length = ffebld_list_length(list);
5478 Returns 0 if list is NULL, 1 if it's ffebld_trail is NULL, and so on. */
5481 ffebld_list_length (ffebld list
)
5483 ffebldListLength length
;
5485 for (length
= 0; list
!= NULL
; ++length
, list
= ffebld_trail (list
))
5491 /* ffebld_new_accter -- Create an ffebld object that is an array
5494 ffebldConstantArray a;
5496 x = ffebld_new_accter(a,b); */
5499 ffebld_new_accter (ffebldConstantArray a
, ffebit b
)
5507 x
->op
= FFEBLD_opACCTER
;
5508 x
->u
.accter
.array
= a
;
5509 x
->u
.accter
.bits
= b
;
5510 x
->u
.accter
.pad
= 0;
5514 /* ffebld_new_arrter -- Create an ffebld object that is an array
5517 ffebldConstantArray a;
5518 ffetargetOffset size;
5519 x = ffebld_new_arrter(a,size); */
5522 ffebld_new_arrter (ffebldConstantArray a
, ffetargetOffset size
)
5530 x
->op
= FFEBLD_opARRTER
;
5531 x
->u
.arrter
.array
= a
;
5532 x
->u
.arrter
.size
= size
;
5533 x
->u
.arrter
.pad
= 0;
5537 /* ffebld_new_conter_with_orig -- Create an ffebld object that is a constant
5541 x = ffebld_new_conter_with_orig(c,NULL); */
5544 ffebld_new_conter_with_orig (ffebldConstant c
, ffebld o
)
5552 x
->op
= FFEBLD_opCONTER
;
5553 x
->u
.conter
.expr
= c
;
5554 x
->u
.conter
.orig
= o
;
5555 x
->u
.conter
.pad
= 0;
5559 /* ffebld_new_item -- Create an ffebld item object
5562 x = ffebld_new_item(y,z); */
5565 ffebld_new_item (ffebld head
, ffebld trail
)
5573 x
->op
= FFEBLD_opITEM
;
5574 x
->u
.item
.head
= head
;
5575 x
->u
.item
.trail
= trail
;
5576 #ifdef FFECOM_itemHOOK
5577 x
->u
.item
.hook
= FFECOM_itemNULL
;
5582 /* ffebld_new_labter -- Create an ffebld object that is a label
5586 x = ffebld_new_labter(c); */
5589 ffebld_new_labter (ffelab l
)
5597 x
->op
= FFEBLD_opLABTER
;
5602 /* ffebld_new_labtok -- Create object that is a label's NUMBER token
5606 x = ffebld_new_labter(c);
5608 Like the other ffebld_new_ functions, the
5609 supplied argument is stored exactly as is: ffelex_token_use is NOT
5610 called, so the token is "consumed", if one is indeed supplied (it may
5614 ffebld_new_labtok (ffelexToken t
)
5622 x
->op
= FFEBLD_opLABTOK
;
5627 /* ffebld_new_none -- Create an ffebld object with no arguments
5630 x = ffebld_new_none(FFEBLD_opWHATEVER); */
5633 ffebld_new_none (ffebldOp o
)
5645 /* ffebld_new_one -- Create an ffebld object with one argument
5648 x = ffebld_new_one(FFEBLD_opWHATEVER,y); */
5651 ffebld_new_one (ffebldOp o
, ffebld left
)
5660 x
->u
.nonter
.left
= left
;
5661 #ifdef FFECOM_nonterHOOK
5662 x
->u
.nonter
.hook
= FFECOM_nonterNULL
;
5667 /* ffebld_new_symter -- Create an ffebld object that is a symbol
5671 ffeintrinGen gen; // Generic intrinsic id, if any
5672 ffeintrinSpec spec; // Specific intrinsic id, if any
5673 ffeintrinImp imp; // Implementation intrinsic id, if any
5674 x = ffebld_new_symter (s, gen, spec, imp); */
5677 ffebld_new_symter (ffesymbol s
, ffeintrinGen gen
, ffeintrinSpec spec
,
5686 x
->op
= FFEBLD_opSYMTER
;
5687 x
->u
.symter
.symbol
= s
;
5688 x
->u
.symter
.generic
= gen
;
5689 x
->u
.symter
.specific
= spec
;
5690 x
->u
.symter
.implementation
= imp
;
5691 x
->u
.symter
.do_iter
= FALSE
;
5695 /* ffebld_new_two -- Create an ffebld object with two arguments
5698 x = ffebld_new_two(FFEBLD_opWHATEVER,y,z); */
5701 ffebld_new_two (ffebldOp o
, ffebld left
, ffebld right
)
5710 x
->u
.nonter
.left
= left
;
5711 x
->u
.nonter
.right
= right
;
5712 #ifdef FFECOM_nonterHOOK
5713 x
->u
.nonter
.hook
= FFECOM_nonterNULL
;
5718 /* ffebld_pool_pop -- Pop ffebld's pool stack
5720 ffebld_pool_pop(); */
5725 ffebldPoolstack_ ps
;
5727 assert (ffebld_pool_stack_
.next
!= NULL
);
5728 ps
= ffebld_pool_stack_
.next
;
5729 ffebld_pool_stack_
.next
= ps
->next
;
5730 ffebld_pool_stack_
.pool
= ps
->pool
;
5731 malloc_kill_ks (malloc_pool_image (), ps
, sizeof (*ps
));
5734 /* ffebld_pool_push -- Push ffebld's pool stack
5736 ffebld_pool_push(); */
5739 ffebld_pool_push (mallocPool pool
)
5741 ffebldPoolstack_ ps
;
5743 ps
= malloc_new_ks (malloc_pool_image (), "Pool stack", sizeof (*ps
));
5744 ps
->next
= ffebld_pool_stack_
.next
;
5745 ps
->pool
= ffebld_pool_stack_
.pool
;
5746 ffebld_pool_stack_
.next
= ps
;
5747 ffebld_pool_stack_
.pool
= pool
;
5750 /* ffebld_op_string -- Return short string describing op
5753 ffebld_op_string(o);
5755 Returns a short string (uppercase) containing the name of the op. */
5758 ffebld_op_string (ffebldOp o
)
5760 if (o
>= ARRAY_SIZE (ffebld_op_string_
))
5762 return ffebld_op_string_
[o
];
5765 /* ffebld_size_max -- Return maximum possible size of CHARACTER-type expr
5767 ffetargetCharacterSize sz;
5769 sz = ffebld_size_max (b);
5771 Like ffebld_size_known, but if that would return NONE and the expression
5772 is opSUBSTR, opCONVERT, opPAREN, or opCONCATENATE, returns ffebld_size_max
5773 of the subexpression(s). */
5775 ffetargetCharacterSize
5776 ffebld_size_max (ffebld b
)
5778 ffetargetCharacterSize sz
;
5780 recurse
: /* :::::::::::::::::::: */
5782 sz
= ffebld_size_known (b
);
5784 if (sz
!= FFETARGET_charactersizeNONE
)
5787 switch (ffebld_op (b
))
5789 case FFEBLD_opSUBSTR
:
5790 case FFEBLD_opCONVERT
:
5791 case FFEBLD_opPAREN
:
5792 b
= ffebld_left (b
);
5793 goto recurse
; /* :::::::::::::::::::: */
5795 case FFEBLD_opCONCATENATE
:
5796 sz
= ffebld_size_max (ffebld_left (b
))
5797 + ffebld_size_max (ffebld_right (b
));