Commit e15fe528 authored by Matthias Braun's avatar Matthias Braun
Browse files

adapt generators to new header style

[r13565]
parent 4f403660
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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);
......
......@@ -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"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment