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
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"
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
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"
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"
print OUT<<EOF;
-#endif /* _GEN_$tmp\_MACHINE_H_ */
+#endif
EOF
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"
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";
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);
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"
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
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"
print OUT @obst_header_all, "\n";
-print OUT "\n#endif /* _GEN_$tmp\_REGALLOC_IF_H_ */\n";
+print OUT "\n#endif\n";
close(OUT);
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"