Commit 53e92032 authored by Matthias Braun's avatar Matthias Braun
Browse files

combine nodeops.h and opcodes.h to nodes.h

parent b4dbd5b7
......@@ -18,5 +18,4 @@ firm_revision.h
/win32/vc2010/firm.sdf
/win32/vc2010/firm.opensdf
/win32/vc2010/win32/
/include/libfirm/nodeops.h
/include/libfirm/opcodes.h
/include/libfirm/nodes.h
......@@ -111,12 +111,11 @@ $(foreach backend,$(backends),$(eval $(call backend_template,$(backend))))
# generators
IR_SPEC_GENERATED_FILES := \
include/libfirm/nodeops.h \
include/libfirm/opcodes.h \
ir/ir/gen_ir_cons.c.inl \
ir/ir/gen_irdump.c.inl \
ir/ir/gen_irnode.c.inl \
ir/ir/gen_irnode.h \
include/libfirm/nodes.h \
ir/ir/gen_ir_cons.c.inl \
ir/ir/gen_irdump.c.inl \
ir/ir/gen_irnode.c.inl \
ir/ir/gen_irnode.h \
ir/ir/gen_irop.c.inl
IR_SPEC_GENERATOR := scripts/gen_ir.py
IR_SPEC_GENERATOR_DEPS := $(IR_SPEC_GENERATOR) scripts/spec_util.py scripts/filters.py
......
......@@ -18,7 +18,7 @@
#include "irop.h"
#include "irmode.h"
#include "begin.h"
#include "nodeops.h"
#include "nodes.h"
/**
* @ingroup ir_graph
......
......@@ -16,7 +16,6 @@
#include "firm_types.h"
#include "ident.h"
#include "begin.h"
#include "opcodes.h"
/**
* @ingroup ir_node
......
......@@ -11,7 +11,6 @@
#define FIRM_IROPTIMIZE_H
#include "firm_types.h"
#include "nodeops.h"
#include "begin.h"
/**
......
......@@ -6,6 +6,39 @@
#include "begin.h"
/** The opcodes of the libFirm predefined operations.
* @ingroup ir_op
*/
typedef enum {{spec.name}}_opcode {
{%- for node in nodes %}
{{spec.name}}o_{{node.name}},
{%- endfor %}
{{spec.name}}o_First = {{spec.name}}o_{{nodes[0].name}},
{{spec.name}}o_Last = {{spec.name}}o_{{nodes[-1].name}},
{%- if spec.name == "ir" %}
beo_First,
/* backend specific nodes */
beo_Spill = beo_First,
beo_Reload,
beo_Perm,
beo_MemPerm,
beo_Copy,
beo_Keep,
beo_CopyKeep,
beo_Call,
beo_Return,
beo_AddSP,
beo_SubSP,
beo_IncSP,
beo_Start,
beo_FrameAddr,
/* last backend node number */
beo_Last = beo_FrameAddr,
{%- endif %}
{{spec.name}}o_MaxOpcode
} {{spec.name}}_opcode;
/**
* @addtogroup ir_node
* @{
......@@ -121,6 +154,13 @@ FIRM_API {{attr.type}} get_{{node.name}}_{{attr.name}}(const ir_node *node);
/** Sets {{attr.name}} attribute of {{node.name|a_an}} node. */
FIRM_API void set_{{node.name}}_{{attr.name}}(ir_node *node, {{attr.type}} {{attr.name}});
{% endfor -%}
/** {{node.name}} opcode */
FIRM_API ir_op *op_{{node.name}};
/** Returns opcode for {{node.name}} nodes. */
FIRM_API ir_op *get_op_{{node.name}}(void);
/** @} */
{% endfor -%}
......
{{warning}}
#ifndef FIRM_IR_OPCODES_H
#define FIRM_IR_OPCODES_H
/** The opcodes of the libFirm predefined operations.
* @ingroup ir_op
*/
typedef enum {{spec.name}}_opcode {
{%- for node in nodes %}
{{spec.name}}o_{{node.name}},
{%- endfor %}
{{spec.name}}o_First = {{spec.name}}o_{{nodes[0].name}},
{{spec.name}}o_Last = {{spec.name}}o_{{nodes[-1].name}},
{%- if spec.name == "ir" %}
beo_First,
/* backend specific nodes */
beo_Spill = beo_First,
beo_Reload,
beo_Perm,
beo_MemPerm,
beo_Copy,
beo_Keep,
beo_CopyKeep,
beo_Call,
beo_Return,
beo_AddSP,
beo_SubSP,
beo_IncSP,
beo_Start,
beo_FrameAddr,
/* last backend node number */
beo_Last = beo_FrameAddr,
{%- endif %}
{{spec.name}}o_MaxOpcode
} {{spec.name}}_opcode;
{% for node in nodes %}
/**
* @ingroup {{node.name}}
* {{node.name}} opcode
*/
FIRM_API ir_op *op_{{node.name}};
{%- endfor %}
{% for node in nodes %}
/**
* @ingroup {{node.name}}
* Returns opcode for {{node.name}} nodes.
*/
FIRM_API ir_op *get_op_{{node.name}}(void);
{%- endfor %}
#endif
Markdown is supported
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