adapt generators to new header style
authorMatthias Braun <matze@braunis.de>
Mon, 30 Apr 2007 14:02:47 +0000 (14:02 +0000)
committerMatthias Braun <matze@braunis.de>
Mon, 30 Apr 2007 14:02:47 +0000 (14:02 +0000)
[r13565]

ir/be/scripts/generate_emitter.pl
ir/be/scripts/generate_emitter_new.pl
ir/be/scripts/generate_machine.pl
ir/be/scripts/generate_new_opcodes.pl
ir/be/scripts/generate_regalloc_if.pl

index c1c3638..4720526 100755 (executable)
@@ -176,23 +176,23 @@ my $creation_time = localtime(time());
 my $tmp = uc($arch);
 
 print OUT<<EOF;
-#ifndef _GEN_$tmp\_EMITTER_H_
-#define _GEN_$tmp\_EMITTER_H_
-
 /**
- * Function prototypes for the emitter functions.
- * DO NOT EDIT THIS FILE, your changes will be lost.
- * Edit $specfile instead.
- * created by: $0 $specfile $target_dir
- * date:       $creation_time
+ * \@file
+ * \@brief Function prototypes for the emitter functions.
+ * \@note  DO NOT EDIT THIS FILE, your changes will be lost.
+ *        Edit $specfile instead.
+ *        created by: $0 $specfile $target_dir
+ * \@date  $creation_time
  */
+#ifndef FIRM_BE_${tmp}_GEN_${tmp}_EMITTER_H
+#define FIRM_BE_${tmp}_GEN_${tmp}_EMITTER_H
 
 #include "irnode.h"
 #include "$arch\_emitter.h"
 
 void $arch\_register_spec_emitters(void);
 
-#endif /* _GEN_$tmp\_EMITTER_H_ */
+#endif
 
 EOF
 
@@ -204,11 +204,12 @@ $creation_time = localtime(time());
 
 print OUT<<EOF;
 /**
- * Generated functions to emit code for assembler ir nodes.
- * DO NOT EDIT THIS FILE, your changes will be lost.
- * Edit $specfile instead.
- * created by: $0 $specfile $target_dir
- * date:       $creation_time
+ * \@file
+ * \@brief  Generated functions to emit code for assembler ir nodes.
+ * \@note   DO NOT EDIT THIS FILE, your changes will be lost.
+ *         Edit $specfile instead.
+ *         created by: $0 $specfile $target_dir
+ * \@date   $creation_time
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 6da5c96..b6c1d56 100755 (executable)
@@ -115,23 +115,23 @@ my $creation_time = localtime(time());
 my $tmp = uc($arch);
 
 print OUT<<EOF;
-#ifndef _GEN_$tmp\_EMITTER_H_
-#define _GEN_$tmp\_EMITTER_H_
-
 /**
- * Function prototypes for the emitter functions.
- * DO NOT EDIT THIS FILE, your changes will be lost.
- * Edit $specfile instead.
- * created by: $0 $specfile $target_dir
- * date:       $creation_time
+ * \@file
+ * \@brief Function prototypes for the emitter functions.
+ * \@note  DO NOT EDIT THIS FILE, your changes will be lost.
+ *        Edit $specfile instead.
+ *        created by: $0 $specfile $target_dir
+ * \@date  $creation_time
  */
+#ifndef FIRM_BE_${tmp}_GEN_${tmp}_EMITTER_H
+#define FIRM_BE_${tmp}_GEN_${tmp}_EMITTER_H
 
 #include "irnode.h"
 #include "${arch}_emitter.h"
 
 void ${arch}_register_spec_emitters(void);
 
-#endif /* _GEN_$tmp\_EMITTER_H_ */
+#endif
 
 EOF
 
@@ -143,11 +143,12 @@ $creation_time = localtime(time());
 
 print OUT<<EOF;
 /**
- * Generated functions to emit code for assembler ir nodes.
- * DO NOT EDIT THIS FILE, your changes will be lost.
- * Edit $specfile instead.
- * created by: $0 $specfile $target_dir
- * date:       $creation_time
+ * \@file
+ * \@brief     Generated functions to emit code for assembler ir nodes.
+ * \@note      DO NOT EDIT THIS FILE, your changes will be lost.
+ *            Edit $specfile instead.
+ *            created by: $0 $specfile $target_dir
+ * \@date      $creation_time
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index be165a1..f8f4ea0 100755 (executable)
@@ -103,16 +103,16 @@ open(OUT, ">$target_h") || die("Could not open $target_h, reason: $!\n");
 my $creation_time = localtime(time());
 
 print OUT<<EOF;
-#ifndef _GEN_$tmp\_MACHINE_H_
-#define _GEN_$tmp\_MACHINE_H_
-
 /**
- * Function prototypes for the machine description.
- * DO NOT EDIT THIS FILE, your changes will be lost.
- * Edit $specfile instead.
- * created by: $0 $specfile $target_dir
- * date:       $creation_time
+ * \@file
+ * \@brief     Function prototypes for the machine description.
+ * \@note      DO NOT EDIT THIS FILE, your changes will be lost.
+ *            Edit $specfile instead.
+ *            created by: $0 $specfile $target_dir
+ * \@date      $creation_time
  */
+#ifndef FIRM_BE_${tmp}_GEN_${tmp}_MACHINE_H
+#define FIRM_BE_${tmp}_GEN_${tmp}_MACHINE_H
 
 #include "../bemachine.h"
 
@@ -129,7 +129,7 @@ print OUT @obst_unit_defs;
 
 print OUT<<EOF;
 
-#endif /* _GEN_$tmp\_MACHINE_H_ */
+#endif
 
 EOF
 
@@ -141,11 +141,12 @@ $creation_time = localtime(time());
 
 print OUT<<EOF;
 /**
- * Generated functions for machine description interface.
- * DO NOT EDIT THIS FILE, your changes will be lost.
- * Edit $specfile instead.
- * created by: $0 $specfile $target_dir
- * date:       $creation_time
+ * \@file
+ * \@brief     Generated functions for machine description interface.
+ * \@note      DO NOT EDIT THIS FILE, your changes will be lost.
+ *            Edit $specfile instead.
+ *            created by: $0 $specfile $target_dir
+ * \@date      $creation_time
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 80a9baa..4faf79b 100755 (executable)
@@ -524,8 +524,23 @@ close(OUT);
 
 open(OUT, ">$target_h") || die("Could not open $target_h, reason: $!\n");
 
-print OUT "#ifndef __GEN_$arch\_NEW_NODES_H__\n";
-print OUT "#define __GEN_$arch\_NEW_NODES_H__\n\n";
+my $creation_time = localtime(time());
+my $tmp = uc($arch);
+
+print OUT<<EOF;
+/**
+ * \@file
+ * \@brief Function prototypes for the new opcode functions.
+ * \@note  DO NOT EDIT THIS FILE, your changes will be lost.
+ *        Edit $specfile instead.
+ *        created by: $0 $specfile $target_dir
+ * \@date  $creation_time
+ */
+#ifndef FIRM_BE_${tmp}_GEN_${tmp}_NEW_NODES_H
+#define FIRM_BE_${tmp}_GEN_${tmp}_NEW_NODES_H
+
+EOF
+
 print OUT @obst_enum_op;
 print OUT "int is_$arch\_irn(const ir_node *node);\n\n";
 print OUT "int get_$arch\_opcode_first(void);\n";
@@ -533,7 +548,10 @@ print OUT "int get_$arch\_opcode_last(void);\n";
 print OUT "int get_$arch\_irn_opcode(const ir_node *node);\n";
 print OUT @obst_header;
 print OUT @obst_proj;
-print OUT "\n#endif /* __GEN_$arch\_NEW_NODES_H__ */\n";
+
+print OUT <<EOF;
+#endif
+EOF
 
 close(OUT);
 
index 6043999..d06f8cf 100755 (executable)
@@ -226,15 +226,15 @@ $tmp = uc($arch);
 
 print OUT<<EOF;
 /**
- * Generated register classes from spec.
- *
- * DO NOT EDIT THIS FILE, your changes will be lost.
- * Edit $specfile instead.
- * created by: $0 $specfile $target_dir
- * date:       $creation_time
+ * \@file
+ * \@brief    Generated register classes from spec.
+ * \@note     DO NOT EDIT THIS FILE, your changes will be lost.
+ *           Edit $specfile instead.
+ *           created by: $0 $specfile $target_dir
+ * \$date     $creation_time
  */
-#ifndef _GEN_${tmp}_REGALLOC_IF_T_H_
-#define _GEN_${tmp}_REGALLOC_IF_T_H_
+#ifndef FIRM_BE_${tmp}_GEN_${tmp}_REGALLOC_IF_T_H
+#define FIRM_BE_${tmp}_GEN_${tmp}_REGALLOC_IF_T_H
 
 #include "gen_${arch}_regalloc_if.h"
 
@@ -242,8 +242,7 @@ EOF
 
 print OUT @obst_header_t;
 
-print OUT "\n#endif /* _GEN_$tmp\_REGALLOC_IF_T_H_ */\n";
-
+print OUT "\n#endif\n";
 
 
 # generate header (external usage) file
@@ -253,15 +252,15 @@ $creation_time = localtime(time());
 
 print OUT<<EOF;
 /**
- * Contains additional external requirements defs for external includes.
- *
- * DO NOT EDIT THIS FILE, your changes will be lost.
- * Edit $specfile instead.
- * created by: $0 $specfile $target_dir
- * date:       $creation_time
+ * \@file
+ * \@brief Contains additional external requirements defs for external includes.
+ * \@note   DO NOT EDIT THIS FILE, your changes will be lost.
+ *         Edit $specfile instead.
+ *         created by: $0 $specfile $target_dir
+ * \@date   $creation_time
  */
-#ifndef _GEN_${tmp}_REGALLOC_IF_H_
-#define _GEN_${tmp}_REGALLOC_IF_H_
+#ifndef FIRM_BE_${tmp}_GEN_${tmp}_REGALLOC_IF_H
+#define FIRM_BE_${tmp}_GEN_${tmp}_REGALLOC_IF_H
 
 #include "../bearch.h"
 #include "${arch}_nodes_attr.h"
@@ -280,7 +279,7 @@ print OUT "void ".$arch."_register_init(void *isa_ptr);\n\n";
 
 print OUT @obst_header_all, "\n";
 
-print OUT "\n#endif /* _GEN_$tmp\_REGALLOC_IF_H_ */\n";
+print OUT "\n#endif\n";
 
 close(OUT);
 
@@ -293,14 +292,14 @@ $creation_time = localtime(time());
 
 print OUT<<EOF;
 /**
- * The generated interface for the register allocator.
- * Contains register classes and types and register constraints
- * for all nodes where constraints were given in spec.
- *
- * DO NOT EDIT THIS FILE, your changes will be lost.
- * Edit $specfile instead.
- * created by: $0 $specfile $target_dir
- * date:       $creation_time
+ * \@file
+ * \@brief  The generated interface for the register allocator.
+ *          Contains register classes and types and register constraints
+ *          for all nodes where constraints were given in spec.
+ * \@note    DO NOT EDIT THIS FILE, your changes will be lost.
+ *          Edit $specfile instead.
+ *          created by: $0 $specfile $target_dir
+ * \$date    $creation_time
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"