* PURPOSE.
*/
-/* TEMPLATE emitter */
-/* $Id$ */
+/**
+ * @file
+ * @brief emit assembler for a backend graph
+ * @version $Id$
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
* PURPOSE.
*/
-#ifndef _TEMPLATE_EMITTER_H_
-#define _TEMPLATE_EMITTER_H_
+/**
+ * @file
+ * @brief declarations for emit functions
+ * @version $Id$
+ */
+#ifndef FIRM_BE_TEMPLATE_TEMPLATE_EMITTER_H
+#define FIRM_BE_TEMPLATE_TEMPLATE_EMITTER_H
#include "irargs_t.h" // this also inlucdes <libcore/lc_print.h>
#include "irnode.h"
void TEMPLATE_gen_routine(const TEMPLATE_code_gen_t *cg, ir_graph *irg);
-#endif /* _TEMPLATE_EMITTER_H_ */
+#endif
* PURPOSE.
*/
-#ifndef _TEMPLATE_MAP_REGS_H_
-#define _TEMPLATE_MAP_REGS_H_
+/**
+ * @file
+ * @brief declarations for the register allocation interface
+ * @version $Id$
+ */
+#ifndef FIRM_BE_TEMPLATE_TEMPLATE_MAP_REGS_H
+#define FIRM_BE_TEMPLATE_TEMPLATE_MAP_REGS_H
#include "irnode.h"
#include "set.h"
long TEMPLATE_translate_proj_pos(const ir_node *proj);
-#endif /* _TEMPLATE_MAP_REGS_H_ */
+#endif
*/
/**
- * This file implements the creation of the achitecture specific firm opcodes
- * and the coresponding node constructors for the TEMPLATE assembler irg.
- * $Id$
+ * @file
+ * @brief This file implements the creation of the achitecture specific firm
+ * opcodes and the coresponding node constructors for the TEMPLATE
+ * assembler irg.
+ * @version $Id$
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
* PURPOSE.
*/
-#ifndef _TEMPLATE_NEW_NODES_H_
-#define _TEMPLATE_NEW_NODES_H_
-
/**
- * Function prototypes for the assembler ir node constructors.
- * $Id$
+ * @file
+ * @brief Function prototypes for the assembler ir node constructors.
+ * @version $Id$
*/
+#ifndef FIRM_BE_TEMPALTE_TEMPLATE_NEW_NODES_H
+#define FIRM_BE_TEMPLATE_TEMPLATE_NEW_NODES_H
#include "TEMPLATE_nodes_attr.h"
/* Include the generated headers */
#include "gen_TEMPLATE_new_nodes.h"
-#endif /* _TEMPLATE_NEW_NODES_H_ */
+#endif
* PURPOSE.
*/
-#ifndef _TEMPLATE_NODES_ATTR_H_
-#define _TEMPLATE_NODES_ATTR_H_
+/**
+ * @file
+ * @brief attributes attached to all TEMPLATE nodes
+ * @version $Id$
+ */
+#ifndef FIRM_BE_TEMPLATE_TEMPLATE_NODES_ATTR_H
+#define FIRM_BE_TEMPLATE_TEMPLATE_NODES_ATTR_H
#include "../bearch_t.h"
-typedef struct _TEMPLATE_attr_t {
+typedef struct TEMPLATE_attr_t TEMPLATE_attr_t;
+
+struct TEMPLATE_attr_t
+{
arch_irn_flags_t flags; /**< indicating if spillable, rematerializeable ... etc. */
int n_res; /**< number of results for this node */
/* must be last, dynamically allocated */
const arch_register_t *slots[1]; /**< register slots for assigned registers */
-} TEMPLATE_attr_t;
+};
-#endif /* _TEMPLATE_NODES_ATTR_H_ */
+#endif
* PURPOSE.
*/
-/* The codegenrator (transform FIRM into TEMPLATE FIRM */
-/* $Id$ */
+/**
+ * @file
+ * @brief code selection (transform FIRM into TEMPLATE FIRM)
+ * @version $Id$
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
* PURPOSE.
*/
-#ifndef _TEMPLATE_TRANSFORM_H_
-#define _TEMPLATE_TRANSFORM_H_
+/**
+ * @file
+ * @brief declaration for the transform function (code selection)
+ * @version $Id$
+ */
+#ifndef FIRM_BE_TEMPLATE_TEMPLATE_TRANSFORM_H
+#define FIRM_BE_TEMPLATE_TEMPLATE_TRANSFORM_H
void TEMPLATE_transform_node(ir_node *node, void *env);
-#endif /* _TEMPLATE_TRANSFORM_H_ */
+#endif
* PURPOSE.
*/
-/* The main TEMPLATE backend driver file. */
-/* $Id$ */
+/**
+ * @file
+ * @brief The main TEMPLATE backend driver file.
+ * @version $Id$
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
-
-#ifndef _BEARCH_TEMPLATE_H_
-#define _BEARCH_TEMPLATE_H_
+#ifndef FIRM_BE_TEMPLATE_BEARCH_TEMPLATE_H
+#define FIRM_BE_TEMPLATE_BEARCH_TEMPLATE_H
#include "../bearch_t.h"
extern const arch_isa_if_t TEMPLATE_isa_if;
-#endif /* _BEARCH_TEMPLATE_H_ */
+#endif
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
-
-#ifndef _BEARCH_TEMPLATE_T_H_
-#define _BEARCH_TEMPLATE_T_H_
+#ifndef FIRM_BE_IA32_BEARCH_TEMPLATE_T_H
+#define FIRM_BE_IA32_BEARCH_TEMPLATE_T_H
#include "debug.h"
#include "bearch_TEMPLATE.h"
#include "../beemitter.h"
#include "set.h"
-typedef struct _TEMPLATE_isa_t TEMPLATE_isa_t;
+typedef struct TEMPLATE_isa_t TEMPLATE_isa_t;
+typedef struct TEMPLATE_code_gen_t TEMPLATE_code_gen_t;
+typedef struct TEMPLATE_irn_ops_t TEMPLATE_irn_ops_t;
+typedef struct TEMPLATE_transform_env_t TEMPLATE_transform_env_t;
-typedef struct _TEMPLATE_code_gen_t {
+struct TEMPLATE_code_gen_t {
const arch_code_generator_if_t *impl; /**< implementation */
ir_graph *irg; /**< current irg */
const arch_env_t *arch_env; /**< the arch env */
TEMPLATE_isa_t *isa; /**< the isa instance */
const be_irg_t *birg; /**< The be-irg (contains additional information about the irg) */
DEBUG_ONLY(firm_dbg_module_t *mod;) /**< debugging module */
-} TEMPLATE_code_gen_t;
+};
-struct _TEMPLATE_isa_t {
+struct TEMPLATE_isa_t {
arch_isa_t arch_isa; /**< must be derived from arch_isa */
be_emit_env_t emit; /**< emit datastructure */
};
-
-typedef struct _TEMPLATE_irn_ops_t {
+struct TEMPLATE_irn_ops_t {
const arch_irn_ops_if_t *impl;
TEMPLATE_code_gen_t *cg;
-} TEMPLATE_irn_ops_t;
-
+};
-/* this is a struct to minimize the number of parameters
- for transformation walker */
-typedef struct _TEMPLATE_transform_env_t {
+/**
+ * this is a struct to minimize the number of parameters
+ * for transformation walker
+ */
+struct TEMPLATE_transform_env_t {
dbg_info *dbg; /**< The node debug info */
ir_graph *irg; /**< The irg, the node should be created in */
ir_node *block; /**< The block, the node should belong to */
ir_node *irn; /**< The irn, to be transformed */
ir_mode *mode; /**< The mode of the irn */
DEBUG_ONLY(firm_dbg_module_t *mod;) /**< The firm debugger */
-} TEMPLATE_transform_env_t;
-
+};
-#endif /* _BEARCH_TEMPLATE_T_H_ */
+#endif