OSDN Git Service

Add PowerPC target attribute/pragma support
[pf3gnuchains/gcc-fork.git] / gcc / optc-gen.awk
1 #  Copyright (C) 2003, 2004, 2007, 2008, 2009, 2010
2 #  Free Software Foundation, Inc.
3 #  Contributed by Kelley Cook, June 2004.
4 #  Original code from Neil Booth, May 2003.
5 #
6 # This program is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by the
8 # Free Software Foundation; either version 3, or (at your option) any
9 # later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program; see the file COPYING3.  If not see
18 # <http://www.gnu.org/licenses/>.
19
20 # This Awk script reads in the option records generated from 
21 # opt-gather.awk, combines the flags of duplicate options and generates a
22 # C file.
23 #
24 # This program uses functions from opt-functions.awk
25 #
26 # Usage: awk -f opt-functions.awk -f optc-gen.awk \
27 #            [-v header_name=header.h] < inputfile > options.c
28
29 BEGIN {
30         n_opts = 0
31         n_langs = 0
32         n_target_save = 0
33         n_extra_vars = 0
34         n_extra_target_vars = 0
35         n_extra_c_includes = 0
36         n_extra_h_includes = 0
37         quote = "\042"
38         comma = ","
39         FS=SUBSEP
40         # Default the name of header created from opth-gen.awk to options.h
41         if (header_name == "") header_name="options.h"
42 }
43
44 # Collect the text and flags of each option into an array
45         {
46                 if ($1 == "Language") {
47                         langs[n_langs] = $2
48                         n_langs++;
49                 }
50                 else if ($1 == "TargetSave") {
51                         # Make sure the declarations are put in source order
52                         target_save_decl[n_target_save] = $2
53                         n_target_save++
54                 }
55                 else if ($1 == "Variable") {
56                         extra_vars[n_extra_vars] = $2
57                         n_extra_vars++
58                 }
59                 else if ($1 == "TargetVariable") {
60                         # Combination of TargetSave and Variable
61                         extra_vars[n_extra_vars] = $2
62                         n_extra_vars++
63
64                         var = $2
65                         sub(" *=.*", "", var)
66                         orig_var = var
67                         name = var
68                         type = var
69                         sub("^.*[ *]", "", name)
70                         sub(" *" name "$", "", type)
71                         target_save_decl[n_target_save] = type " x_" name
72                         n_target_save++
73
74                         extra_target_vars[n_extra_target_vars] = name
75                         n_extra_target_vars++;
76                 }
77                 else if ($1 == "HeaderInclude") {
78                         extra_h_includes[n_extra_h_includes++] = $2;
79                 }
80                 else if ($1 == "SourceInclude")  {
81                         extra_c_includes[n_extra_c_includes++] = $2;
82                 }
83                 else {
84                         name = opt_args("Mask", $1)
85                         if (name == "") {
86                                 opts[n_opts]  = $1
87                                 flags[n_opts] = $2
88                                 help[n_opts]  = $3
89                                 for (i = 4; i <= NF; i++)
90                                         help[n_opts] = help[n_opts] " " $i
91                                 n_opts++;
92                         }
93                 }
94         }
95
96 # Dump that array of options into a C file.
97 END {
98 print "/* This file is auto-generated by optc-gen.awk.  */"
99 print ""
100 n_headers = split(header_name, headers, " ")
101 for (i = 1; i <= n_headers; i++)
102         print "#include " quote headers[i] quote
103 print "#include " quote "opts.h" quote
104 print "#include " quote "intl.h" quote
105 print ""
106 print "#ifndef GCC_DRIVER"
107 print "#include " quote "flags.h" quote
108 print "#include " quote "target.h" quote
109 print "#endif /* GCC_DRIVER */"
110 print ""
111
112 if (n_extra_c_includes > 0) {
113         for (i = 0; i < n_extra_c_includes; i++) {
114                 print "#include " quote extra_c_includes[i] quote
115         }
116         print ""
117 }
118
119 have_save = 0;
120 if (n_extra_target_vars)
121         have_save = 1
122
123 print "const struct gcc_options global_options_init =\n{"
124 for (i = 0; i < n_extra_vars; i++) {
125         var = extra_vars[i]
126         init = extra_vars[i]
127         if (var ~ "=" ) {
128                 sub(".*= *", "", init)
129                 sub(" *=.*", "", var)
130                 sub("^.*[ *]", "", var)
131                 sub("\\[.*\\]$", "", var)
132         } else {
133                 init = "0"
134         }
135         var_seen[var] = 1
136         print "  " init ", /* " var " */"
137 }
138 for (i = 0; i < n_opts; i++) {
139         if (flag_set_p("Save", flags[i]))
140                 have_save = 1;
141
142         name = var_name(flags[i]);
143         if (name == "")
144                 continue;
145
146         init = opt_args("Init", flags[i])
147         if (init != "") {
148                 if (name in var_init && var_init[name] != init)
149                         print "#error multiple initializers for " name
150                 var_init[name] = init
151         }
152 }
153 for (i = 0; i < n_opts; i++) {
154         name = var_name(flags[i]);
155         if (name == "")
156                 continue;
157
158         if (name in var_seen)
159                 continue;
160
161         if (name in var_init)
162                 init = var_init[name]
163         else
164                 init = "0"
165
166         print "  " init ", /* " name " */"
167
168         var_seen[name] = 1;
169 }
170 for (i = 0; i < n_opts; i++) {
171         name = static_var(opts[i], flags[i]);
172         if (name != "") {
173                 print "  0, /* " name " (private state) */"
174                 print "#undef x_" name
175         }
176 }
177 print "};"
178 print ""
179 print "struct gcc_options global_options;"
180 print "struct gcc_options global_options_set;"
181 print ""
182
183 print "const char * const lang_names[] =\n{"
184 for (i = 0; i < n_langs; i++) {
185         macros[i] = "CL_" langs[i]
186         gsub( "[^" alnum "_]", "X", macros[i] )
187         s = substr("         ", length (macros[i]))
188         print "  " quote langs[i] quote ","
189     }
190
191 print "  0\n};\n"
192 print "const unsigned int cl_options_count = N_OPTS;\n"
193 print "const unsigned int cl_lang_count = " n_langs ";\n"
194
195 print "const struct cl_option cl_options[] =\n{"
196
197 j = 0
198 for (i = 0; i < n_opts; i++) {
199         back_chain[i] = "N_OPTS";
200         indices[opts[i]] = j;
201         # Combine the flags of identical switches.  Switches
202         # appear many times if they are handled by many front
203         # ends, for example.
204         while( i + 1 != n_opts && opts[i] == opts[i + 1] ) {
205                 flags[i + 1] = flags[i] " " flags[i + 1];
206                 if (help[i + 1] == "")
207                         help[i + 1] = help[i]
208                 else if (help[i] != "" && help[i + 1] != help[i])
209                         print "warning: multiple different help strings for " \
210                                 opts[i] ":\n\t" help[i] "\n\t" help[i + 1] \
211                                 | "cat 1>&2"
212                 i++;
213                 back_chain[i] = "N_OPTS";
214                 indices[opts[i]] = j;
215         }
216         j++;
217 }
218
219 for (i = 0; i < n_opts; i++) {
220         # With identical flags, pick only the last one.  The
221         # earlier loop ensured that it has all flags merged,
222         # and a nonempty help text if one of the texts was nonempty.
223         while( i + 1 != n_opts && opts[i] == opts[i + 1] ) {
224                 i++;
225         }
226
227         len = length (opts[i]);
228         enum = opt_enum(opts[i])
229
230         # If this switch takes joined arguments, back-chain all
231         # subsequent switches to it for which it is a prefix.  If
232         # a later switch S is a longer prefix of a switch T, T
233         # will be back-chained to S in a later iteration of this
234         # for() loop, which is what we want.
235         if (flag_set_p("Joined.*", flags[i])) {
236                 for (j = i + 1; j < n_opts; j++) {
237                         if (substr (opts[j], 1, len) != opts[i])
238                                 break;
239                         back_chain[j] = enum;
240                 }
241         }
242
243         s = substr("                                  ", length (opts[i]))
244         if (i + 1 == n_opts)
245                 comma = ""
246
247         if (help[i] == "")
248                 hlp = "0"
249         else
250                 hlp = quote help[i] quote;
251
252         missing_arg_error = opt_args("MissingArgError", flags[i])
253         if (missing_arg_error == "")
254                 missing_arg_error = "0"
255         else
256                 missing_arg_error = quote missing_arg_error quote
257
258
259         warn_message = opt_args("Warn", flags[i])
260         if (warn_message == "")
261                 warn_message = "0"
262         else
263                 warn_message = quote warn_message quote
264
265         alias_arg = opt_args("Alias", flags[i])
266         if (alias_arg == "") {
267                 if (flag_set_p("Ignore", flags[i]))
268                         alias_data = "NULL, NULL, OPT_SPECIAL_ignore"
269                 else
270                         alias_data = "NULL, NULL, N_OPTS"
271         } else {
272                 alias_opt = nth_arg(0, alias_arg)
273                 alias_posarg = nth_arg(1, alias_arg)
274                 alias_negarg = nth_arg(2, alias_arg)
275
276                 if (var_ref(opts[i], flags[i]) != "-1")
277                         print "#error Alias setting variable"
278
279                 if (alias_posarg != "" && alias_negarg == "") {
280                         if (!flag_set_p("RejectNegative", flags[i]) \
281                             && opts[i] ~ "^[Wfm]")
282                                 print "#error Alias with single argument " \
283                                         "allowing negative form"
284                 }
285
286                 alias_opt = opt_enum(alias_opt)
287                 if (alias_posarg == "")
288                         alias_posarg = "NULL"
289                 else
290                         alias_posarg = quote alias_posarg quote
291                 if (alias_negarg == "")
292                         alias_negarg = "NULL"
293                 else
294                         alias_negarg = quote alias_negarg quote
295                 alias_data = alias_posarg ", " alias_negarg ", " alias_opt
296         }
297
298         neg = opt_args("Negative", flags[i]);
299         if (neg != "")
300                 idx = indices[neg]
301         else {
302                 if (flag_set_p("RejectNegative", flags[i]))
303                         idx = -1;
304                 else {
305                         if (opts[i] ~ "^[Wfm]")
306                                 idx = indices[opts[i]];
307                         else
308                                 idx = -1;
309                 }
310         }
311         # Split the printf after %u to work around an ia64-hp-hpux11.23
312         # awk bug.
313         printf("  { %c-%s%c,\n    %s,\n    %s,\n    %s,\n    %s, %s, %u,",
314                quote, opts[i], quote, hlp, missing_arg_error, warn_message,
315                alias_data, back_chain[i], len)
316         printf(" %d,\n", idx)
317         condition = opt_args("Condition", flags[i])
318         cl_flags = switch_flags(flags[i])
319         if (condition != "")
320                 printf("#if %s\n" \
321                        "    %s,\n" \
322                        "#else\n" \
323                        "    CL_DISABLED,\n" \
324                        "#endif\n",
325                        condition, cl_flags, cl_flags)
326         else
327                 printf("    %s,\n", cl_flags)
328         printf("    %s, %s }%s\n", var_ref(opts[i], flags[i]),
329                var_set(flags[i]), comma)
330 }
331
332 print "};"
333
334 print "";
335 print "#if !defined(GCC_DRIVER) && !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS)"
336 print "";
337 print "/* Save optimization variables into a structure.  */"
338 print "void";
339 print "cl_optimization_save (struct cl_optimization *ptr, struct gcc_options *opts)";
340 print "{";
341
342 n_opt_char = 2;
343 n_opt_short = 0;
344 n_opt_int = 0;
345 n_opt_enum = 1;
346 n_opt_other = 0;
347 var_opt_char[0] = "optimize";
348 var_opt_char[1] = "optimize_size";
349 var_opt_range["optimize"] = "0, 255";
350 var_opt_range["optimize_size"] = "0, 255";
351 var_opt_enum[0] = "flag_fp_contract_mode";
352
353 # Sort by size to mimic how the structure is laid out to be friendlier to the
354 # cache.
355
356 for (i = 0; i < n_opts; i++) {
357         if (flag_set_p("Optimization", flags[i])) {
358                 name = var_name(flags[i])
359                 if(name == "")
360                         continue;
361
362                 if(name in var_opt_seen)
363                         continue;
364
365                 var_opt_seen[name]++;
366                 otype = var_type_struct(flags[i]);
367                 if (otype ~ "^((un)?signed +)?int *$")
368                         var_opt_int[n_opt_int++] = name;
369
370                 else if (otype ~ "^((un)?signed +)?short *$")
371                         var_opt_short[n_opt_short++] = name;
372
373                 else if (otype ~ ("^enum +[_" alnum "]+ *"))
374                         var_opt_enum[n_opt_enum++] = name;
375
376                 else if (otype ~ "^((un)?signed +)?char *$") {
377                         var_opt_char[n_opt_char++] = name;
378                         if (otype ~ "^unsigned +char *$")
379                                 var_opt_range[name] = "0, 255"
380                         else if (otype ~ "^signed +char *$")
381                                 var_opt_range[name] = "-128, 127"
382                 }
383                 else
384                         var_opt_other[n_opt_other++] = name;
385         }
386 }
387
388 for (i = 0; i < n_opt_char; i++) {
389         name = var_opt_char[i];
390         if (var_opt_range[name] != "")
391                 print "  gcc_assert (IN_RANGE (opts->x_" name ", " var_opt_range[name] "));";
392 }
393
394 print "";
395 for (i = 0; i < n_opt_other; i++) {
396         print "  ptr->x_" var_opt_other[i] " = opts->x_" var_opt_other[i] ";";
397 }
398
399 for (i = 0; i < n_opt_int; i++) {
400         print "  ptr->x_" var_opt_int[i] " = opts->x_" var_opt_int[i] ";";
401 }
402
403 for (i = 0; i < n_opt_enum; i++) {
404         print "  ptr->x_" var_opt_enum[i] " = opts->x_" var_opt_enum[i] ";";
405 }
406
407 for (i = 0; i < n_opt_short; i++) {
408         print "  ptr->x_" var_opt_short[i] " = opts->x_" var_opt_short[i] ";";
409 }
410
411 for (i = 0; i < n_opt_char; i++) {
412         print "  ptr->x_" var_opt_char[i] " = opts->x_" var_opt_char[i] ";";
413 }
414
415 print "}";
416
417 print "";
418 print "/* Restore optimization options from a structure.  */";
419 print "void";
420 print "cl_optimization_restore (struct gcc_options *opts, struct cl_optimization *ptr)";
421 print "{";
422
423 for (i = 0; i < n_opt_other; i++) {
424         print "  opts->x_" var_opt_other[i] " = ptr->x_" var_opt_other[i] ";";
425 }
426
427 for (i = 0; i < n_opt_int; i++) {
428         print "  opts->x_" var_opt_int[i] " = ptr->x_" var_opt_int[i] ";";
429 }
430
431 for (i = 0; i < n_opt_enum; i++) {
432         print "  opts->x_" var_opt_enum[i] " = ptr->x_" var_opt_enum[i] ";";
433 }
434
435 for (i = 0; i < n_opt_short; i++) {
436         print "  opts->x_" var_opt_short[i] " = ptr->x_" var_opt_short[i] ";";
437 }
438
439 for (i = 0; i < n_opt_char; i++) {
440         print "  opts->x_" var_opt_char[i] " = ptr->x_" var_opt_char[i] ";";
441 }
442
443 print "  targetm.override_options_after_change ();";
444 print "}";
445
446 print "";
447 print "/* Print optimization options from a structure.  */";
448 print "void";
449 print "cl_optimization_print (FILE *file,";
450 print "                       int indent_to,";
451 print "                       struct cl_optimization *ptr)";
452 print "{";
453
454 print "  fputs (\"\\n\", file);";
455 for (i = 0; i < n_opt_other; i++) {
456         print "  if (ptr->x_" var_opt_other[i] ")";
457         print "    fprintf (file, \"%*s%s (%#lx)\\n\",";
458         print "             indent_to, \"\",";
459         print "             \"" var_opt_other[i] "\",";
460         print "             (unsigned long)ptr->x_" var_opt_other[i] ");";
461         print "";
462 }
463
464 for (i = 0; i < n_opt_int; i++) {
465         print "  if (ptr->x_" var_opt_int[i] ")";
466         print "    fprintf (file, \"%*s%s (%#x)\\n\",";
467         print "             indent_to, \"\",";
468         print "             \"" var_opt_int[i] "\",";
469         print "             ptr->x_" var_opt_int[i] ");";
470         print "";
471 }
472
473 for (i = 0; i < n_opt_enum; i++) {
474         print "  fprintf (file, \"%*s%s (%#x)\\n\",";
475         print "           indent_to, \"\",";
476         print "           \"" var_opt_enum[i] "\",";
477         print "           (int) ptr->x_" var_opt_enum[i] ");";
478         print "";
479 }
480
481 for (i = 0; i < n_opt_short; i++) {
482         print "  if (ptr->x_" var_opt_short[i] ")";
483         print "    fprintf (file, \"%*s%s (%#x)\\n\",";
484         print "             indent_to, \"\",";
485         print "             \"" var_opt_short[i] "\",";
486         print "             ptr->x_" var_opt_short[i] ");";
487         print "";
488 }
489
490 for (i = 0; i < n_opt_char; i++) {
491         print "  if (ptr->x_" var_opt_char[i] ")";
492         print "    fprintf (file, \"%*s%s (%#x)\\n\",";
493         print "             indent_to, \"\",";
494         print "             \"" var_opt_char[i] "\",";
495         print "             ptr->x_" var_opt_char[i] ");";
496         print "";
497 }
498
499 print "}";
500
501 print "";
502 print "/* Save selected option variables into a structure.  */"
503 print "void";
504 print "cl_target_option_save (struct cl_target_option *ptr, struct gcc_options *opts)";
505 print "{";
506
507 n_target_char = 0;
508 n_target_short = 0;
509 n_target_int = 0;
510 n_target_enum = 0;
511 n_target_other = 0;
512
513 if (have_save) {
514         for (i = 0; i < n_opts; i++) {
515                 if (flag_set_p("Save", flags[i])) {
516                         name = var_name(flags[i])
517                         if(name == "")
518                                 name = "target_flags";
519
520                         if(name in var_save_seen)
521                                 continue;
522
523                         var_save_seen[name]++;
524                         otype = var_type_struct(flags[i])
525                         if (otype ~ "^((un)?signed +)?int *$")
526                                 var_target_int[n_target_int++] = name;
527
528                         else if (otype ~ "^((un)?signed +)?short *$")
529                                 var_target_short[n_target_short++] = name;
530
531                         else if (otype ~ ("^enum +[_" alnum "]+ *$"))
532                                 var_target_enum[n_target_enum++] = name;
533
534                         else if (otype ~ "^((un)?signed +)?char *$") {
535                                 var_target_char[n_target_char++] = name;
536                                 if (otype ~ "^unsigned +char *$")
537                                         var_target_range[name] = "0, 255"
538                                 else if (otype ~ "^signed +char *$")
539                                         var_target_range[name] = "-128, 127"
540                         }
541                         else
542                                 var_target_other[n_target_other++] = name;
543                 }
544         }
545 } else {
546         var_target_int[n_target_int++] = "target_flags";
547 }
548
549 have_assert = 0;
550 for (i = 0; i < n_target_char; i++) {
551         name = var_target_char[i];
552         if (var_target_range[name] != "") {
553                 have_assert = 1;
554                 print "  gcc_assert (IN_RANGE (opts->x_" name ", " var_target_range[name] "));";
555         }
556 }
557
558 if (have_assert)
559         print "";
560
561 print "  if (targetm.target_option.save)";
562 print "    targetm.target_option.save (ptr);";
563 print "";
564
565 for (i = 0; i < n_extra_target_vars; i++) {
566         print "  ptr->x_" extra_target_vars[i] " = opts->x_" extra_target_vars[i] ";";
567 }
568
569 for (i = 0; i < n_target_other; i++) {
570         print "  ptr->x_" var_target_other[i] " = opts->x_" var_target_other[i] ";";
571 }
572
573 for (i = 0; i < n_target_enum; i++) {
574         print "  ptr->x_" var_target_enum[i] " = opts->x_" var_target_enum[i] ";";
575 }
576
577 for (i = 0; i < n_target_int; i++) {
578         print "  ptr->x_" var_target_int[i] " = opts->x_" var_target_int[i] ";";
579 }
580
581 for (i = 0; i < n_target_short; i++) {
582         print "  ptr->x_" var_target_short[i] " = opts->x_" var_target_short[i] ";";
583 }
584
585 for (i = 0; i < n_target_char; i++) {
586         print "  ptr->x_" var_target_char[i] " = opts->x_" var_target_char[i] ";";
587 }
588
589 print "}";
590
591 print "";
592 print "/* Restore selected current options from a structure.  */";
593 print "void";
594 print "cl_target_option_restore (struct gcc_options *opts, struct cl_target_option *ptr)";
595 print "{";
596
597 for (i = 0; i < n_extra_target_vars; i++) {
598         print "  opts->x_" extra_target_vars[i] " = ptr->x_" extra_target_vars[i] ";";
599 }
600
601 for (i = 0; i < n_target_other; i++) {
602         print "  opts->x_" var_target_other[i] " = ptr->x_" var_target_other[i] ";";
603 }
604
605 for (i = 0; i < n_target_enum; i++) {
606         print "  opts->x_" var_target_enum[i] " = ptr->x_" var_target_enum[i] ";";
607 }
608
609 for (i = 0; i < n_target_int; i++) {
610         print "  opts->x_" var_target_int[i] " = ptr->x_" var_target_int[i] ";";
611 }
612
613 for (i = 0; i < n_target_short; i++) {
614         print "  opts->x_" var_target_short[i] " = ptr->x_" var_target_short[i] ";";
615 }
616
617 for (i = 0; i < n_target_char; i++) {
618         print "  opts->x_" var_target_char[i] " = ptr->x_" var_target_char[i] ";";
619 }
620
621 # This must occur after the normal variables in case the code depends on those
622 # variables.
623 print "";
624 print "  if (targetm.target_option.restore)";
625 print "    targetm.target_option.restore (ptr);";
626
627 print "}";
628
629 print "";
630 print "/* Print optimization options from a structure.  */";
631 print "void";
632 print "cl_target_option_print (FILE *file,";
633 print "                        int indent,";
634 print "                        struct cl_target_option *ptr)";
635 print "{";
636
637 print "  fputs (\"\\n\", file);";
638 for (i = 0; i < n_target_other; i++) {
639         print "  if (ptr->x_" var_target_other[i] ")";
640         print "    fprintf (file, \"%*s%s (%#lx)\\n\",";
641         print "             indent, \"\",";
642         print "             \"" var_target_other[i] "\",";
643         print "             (unsigned long)ptr->x_" var_target_other[i] ");";
644         print "";
645 }
646
647 for (i = 0; i < n_target_enum; i++) {
648         print "  if (ptr->x_" var_target_enum[i] ")";
649         print "    fprintf (file, \"%*s%s (%#x)\\n\",";
650         print "             indent, \"\",";
651         print "             \"" var_target_enum[i] "\",";
652         print "             ptr->x_" var_target_enum[i] ");";
653         print "";
654 }
655
656 for (i = 0; i < n_target_int; i++) {
657         print "  if (ptr->x_" var_target_int[i] ")";
658         print "    fprintf (file, \"%*s%s (%#x)\\n\",";
659         print "             indent, \"\",";
660         print "             \"" var_target_int[i] "\",";
661         print "             ptr->x_" var_target_int[i] ");";
662         print "";
663 }
664
665 for (i = 0; i < n_target_short; i++) {
666         print "  if (ptr->x_" var_target_short[i] ")";
667         print "    fprintf (file, \"%*s%s (%#x)\\n\",";
668         print "             indent, \"\",";
669         print "             \"" var_target_short[i] "\",";
670         print "             ptr->x_" var_target_short[i] ");";
671         print "";
672 }
673
674 for (i = 0; i < n_target_char; i++) {
675         print "  if (ptr->x_" var_target_char[i] ")";
676         print "    fprintf (file, \"%*s%s (%#x)\\n\",";
677         print "             indent, \"\",";
678         print "             \"" var_target_char[i] "\",";
679         print "             ptr->x_" var_target_char[i] ");";
680         print "";
681 }
682
683 print "";
684 print "  if (targetm.target_option.print)";
685 print "    targetm.target_option.print (file, indent, ptr);";
686
687 print "}";
688 print "#endif";
689
690 }