Commit 1c5a82cb authored by Matthias Braun's avatar Matthias Braun
Browse files

automatically generated pn_ numbers from the spec file

[r27813]
parent 5098c6d0
......@@ -163,32 +163,6 @@ typedef union symconst_symbol {
ir_enum_const *enum_p; /**< The enumeration constant of a SymConst. */
} symconst_symbol;
/**
* Projection numbers for Cmp are defined several times.
* The bit patterns are used for various tests, so don't change.
* The "unordered" values are possible results of comparing
* floating point numbers.
* Note that the encoding is imported, so do NOT change the order.
*/
typedef enum {
pn_Cmp_False = 0, /**< false */
pn_Cmp_Eq = 1, /**< equal */
pn_Cmp_Lt = 2, /**< less */
pn_Cmp_Le = pn_Cmp_Eq|pn_Cmp_Lt, /**< less or equal */
pn_Cmp_Gt = 4, /**< greater */
pn_Cmp_Ge = pn_Cmp_Eq|pn_Cmp_Gt, /**< greater or equal */
pn_Cmp_Lg = pn_Cmp_Lt|pn_Cmp_Gt, /**< less or greater */
pn_Cmp_Leg = pn_Cmp_Lt|pn_Cmp_Eq|pn_Cmp_Gt, /**< less, equal or greater = ordered */
pn_Cmp_Uo = 8, /**< unordered */
pn_Cmp_Ue = pn_Cmp_Uo|pn_Cmp_Eq, /**< unordered or equal */
pn_Cmp_Ul = pn_Cmp_Uo|pn_Cmp_Lt, /**< unordered or less */
pn_Cmp_Ule = pn_Cmp_Uo|pn_Cmp_Eq|pn_Cmp_Lt, /**< unordered, less or equal */
pn_Cmp_Ug = pn_Cmp_Uo|pn_Cmp_Gt, /**< unordered or greater */
pn_Cmp_Uge = pn_Cmp_Uo|pn_Cmp_Eq|pn_Cmp_Gt, /**< unordered, greater or equal */
pn_Cmp_Ne = pn_Cmp_Uo|pn_Cmp_Lt|pn_Cmp_Gt, /**< unordered, less or greater = not equal */
pn_Cmp_True = 15 /**< true */
} pn_Cmp; /* Projection numbers for Cmp */
/** The allocation place. */
typedef enum {
stack_alloc, /**< Alloc allocates the object on the stack. */
......
......@@ -1123,6 +1123,7 @@
#include "firm_types.h"
#include "begin.h"
#include "irnode.h"
/**
* constrained flags for memory operations.
......
......@@ -67,6 +67,9 @@ enum pn_generic {
pn_Generic_other = 3 /**< First free projection number */
};
/* include projnumber enums generated by specification */
#include "projnumbers.h"
/**
* Checks whether a pointer points to a ir node.
*
......@@ -273,19 +276,6 @@ FIRM_API void set_nodes_block (ir_node *node, ir_node *block);
* get_irn_MacroBlock(). */
FIRM_API ir_node *get_nodes_MacroBlock(const ir_node *node);
/**
* Projection numbers for result of Start node: use for Proj nodes!
*/
typedef enum {
pn_Start_X_initial_exec, /**< Projection on the initial control flow. */
pn_Start_M, /**< Projection on the initial memory. */
pn_Start_P_frame_base, /**< Projection on the frame base pointer. */
pn_Start_P_tls, /**< Projection on the pointer to the thread local store
segment containing _all_thread local variables. */
pn_Start_T_args, /**< Projection on all arguments. */
pn_Start_max /**< number of projections from a Start */
} pn_Start; /* Projection numbers for Start. */
/** Test whether arbitrary node is frame pointer.
*
* Test whether arbitrary node is frame pointer, i.e. Proj(pn_Start_P_frame_base)
......@@ -422,15 +412,6 @@ FIRM_API void set_Cond_selector(ir_node *node, ir_node *selector);
FIRM_API long get_Cond_default_proj(const ir_node *node);
FIRM_API void set_Cond_default_proj(ir_node *node, long defproj);
/**
* Projection numbers for conditions.
*/
typedef enum {
pn_Cond_false, /**< Control flow if operand is "false". */
pn_Cond_true, /**< Control flow if operand is "true". */
pn_Cond_max /**< number of projections from a Cond */
} pn_Cond; /* Projection numbers for Cond. */
FIRM_API ir_node *get_Return_mem(const ir_node *node);
FIRM_API void set_Return_mem(ir_node *node, ir_node *mem);
FIRM_API ir_node **get_Return_res_arr(ir_node *node);
......@@ -508,19 +489,6 @@ FIRM_API void set_Sel_index(ir_node *node, int pos, ir_node *index);
FIRM_API ir_entity *get_Sel_entity(const ir_node *node);
FIRM_API void set_Sel_entity (ir_node *node, ir_entity *ent);
/**
* Projection numbers for result of Call node: use for Proj nodes!
*/
typedef enum {
pn_Call_M = pn_Generic_M, /**< The memory result. */
pn_Call_X_regular = pn_Generic_X_regular, /**< The control flow result when no exception occurs. */
pn_Call_X_except = pn_Generic_X_except, /**< The control flow result branching to the exception handler. */
pn_Call_T_result = pn_Generic_other, /**< The tuple containing all (0, 1, 2, ...) results. */
pn_Call_P_value_res_base, /**< A pointer to the memory region containing copied results
passed by value (for compound result types). */
pn_Call_max /**< number of projections from a Call */
} pn_Call; /* Projection numbers for Call. */
/** Retrieve the memory input of a Call. */
FIRM_API ir_node *get_Call_mem(const ir_node *node);
/** Set the memory input of a Call. */
......@@ -578,15 +546,6 @@ FIRM_API ir_entity *get_Call_callee(const ir_node *node, int pos);
FIRM_API void set_Call_callee_arr(ir_node *node, const int n, ir_entity **arr);
FIRM_API void remove_Call_callee_arr(ir_node *node);
/**
* Projection numbers for result of Builtin node: use for Proj nodes!
*/
typedef enum {
pn_Builtin_M = pn_Generic_M, /**< The memory result. */
pn_Builtin_1_result = pn_Generic_other, /**< first result. */
pn_Builtin_max /**< number of projections from a Builtin */
} pn_Builtin; /* Projection numbers for Builtin. */
FIRM_API ir_node *get_Builtin_mem(const ir_node *node);
FIRM_API void set_Builtin_mem(ir_node *node, ir_node *mem);
FIRM_API ir_builtin_kind get_Builtin_kind(const ir_node *node);
......@@ -662,17 +621,6 @@ FIRM_API void set_Quot_mem(ir_node *node, ir_node *mem);
FIRM_API ir_mode *get_Quot_resmode(const ir_node *node);
FIRM_API void set_Quot_resmode(ir_node *node, ir_mode *mode);
/**
* Projection numbers for Quot: use for Proj nodes!
*/
typedef enum {
pn_Quot_M = pn_Generic_M, /**< Memory result. */
pn_Quot_X_regular = pn_Generic_X_regular, /**< Execution result if no exception occurred. */
pn_Quot_X_except = pn_Generic_X_except, /**< Execution result if exception occurred. */
pn_Quot_res = pn_Generic_other, /**< Result of computation. */
pn_Quot_max /**< number of projections from a Quot */
} pn_Quot; /* Projection numbers for Quot. */
FIRM_API ir_node *get_DivMod_left(const ir_node *node);
FIRM_API void set_DivMod_left(ir_node *node, ir_node *left);
FIRM_API ir_node *get_DivMod_right(const ir_node *node);
......@@ -682,18 +630,6 @@ FIRM_API void set_DivMod_mem(ir_node *node, ir_node *mem);
FIRM_API ir_mode *get_DivMod_resmode(const ir_node *node);
FIRM_API void set_DivMod_resmode(ir_node *node, ir_mode *mode);
/**
* Projection numbers for DivMod: use for Proj nodes!
*/
typedef enum {
pn_DivMod_M = pn_Generic_M, /**< Memory result. */
pn_DivMod_X_regular = pn_Generic_X_regular, /**< Execution result if no exception occurred. */
pn_DivMod_X_except = pn_Generic_X_except, /**< Execution result if exception occurred. */
pn_DivMod_res_div = pn_Generic_other, /**< Result of computation a / b. */
pn_DivMod_res_mod, /**< Result of computation a % b. */
pn_DivMod_max /**< number of projections from a DivMod */
} pn_DivMod; /* Projection numbers for DivMod. */
FIRM_API ir_node *get_Div_left(const ir_node *node);
FIRM_API void set_Div_left(ir_node *node, ir_node *left);
FIRM_API ir_node *get_Div_right(const ir_node *node);
......@@ -705,17 +641,6 @@ FIRM_API void set_Div_resmode(ir_node *node, ir_mode *mode);
FIRM_API int get_Div_no_remainder(const ir_node *node);
FIRM_API void set_Div_no_remainder(ir_node *node, int no_remainder);
/**
* Projection numbers for Div: use for Proj nodes!
*/
typedef enum {
pn_Div_M = pn_Generic_M, /**< Memory result. */
pn_Div_X_regular = pn_Generic_X_regular, /**< Execution result if no exception occurred. */
pn_Div_X_except = pn_Generic_X_except, /**< Execution result if exception occurred. */
pn_Div_res = pn_Generic_other, /**< Result of computation. */
pn_Div_max /**< number of projections from a Div */
} pn_Div; /* Projection numbers for Div. */
FIRM_API ir_node *get_Mod_left(const ir_node *node);
FIRM_API void set_Mod_left(ir_node *node, ir_node *left);
FIRM_API ir_node *get_Mod_right(const ir_node *node);
......@@ -725,17 +650,6 @@ FIRM_API void set_Mod_mem(ir_node *node, ir_node *mem);
FIRM_API ir_mode *get_Mod_resmode(const ir_node *node);
FIRM_API void set_Mod_resmode(ir_node *node, ir_mode *mode);
/**
* Projection numbers for Mod: use for Proj nodes!
*/
typedef enum {
pn_Mod_M = pn_Generic_M, /**< Memory result. */
pn_Mod_X_regular = pn_Generic_X_regular, /**< Execution result if no exception occurred. */
pn_Mod_X_except = pn_Generic_X_except, /**< Execution result if exception occurred. */
pn_Mod_res = pn_Generic_other, /**< Result of computation. */
pn_Mod_max /**< number of projections from a Mod */
} pn_Mod; /* Projection numbers for Mod. */
FIRM_API ir_node *get_Abs_op(const ir_node *node);
FIRM_API void set_Abs_op(ir_node *node, ir_node *op);
......@@ -860,17 +774,6 @@ FIRM_API void set_memop_mem(ir_node *node, ir_node *mem);
FIRM_API ir_node *get_memop_ptr(const ir_node *node);
FIRM_API void set_memop_ptr(ir_node *node, ir_node *ptr);
/**
* Projection numbers for Load: use for Proj nodes!
*/
typedef enum {
pn_Load_M = pn_Generic_M, /**< Memory result. */
pn_Load_X_regular = pn_Generic_X_regular, /**< Execution result if no exception occurred. */
pn_Load_X_except = pn_Generic_X_except, /**< Execution result if exception occurred. */
pn_Load_res = pn_Generic_other, /**< Result of load operation. */
pn_Load_max /**< number of projections from a Load */
} pn_Load; /* Projection numbers for Load. */
FIRM_API ir_node *get_Load_mem(const ir_node *node);
FIRM_API void set_Load_mem(ir_node *node, ir_node *mem);
FIRM_API ir_node *get_Load_ptr(const ir_node *node);
......@@ -882,16 +785,6 @@ FIRM_API void set_Load_volatility(ir_node *node, ir_volatility volatil
FIRM_API ir_align get_Load_align(const ir_node *node);
FIRM_API void set_Load_align(ir_node *node, ir_align align);
/**
* Projection numbers for Store: use for Proj nodes!
*/
typedef enum {
pn_Store_M = pn_Generic_M, /**< Memory result. */
pn_Store_X_regular = pn_Generic_X_regular, /**< Execution result if no exception occurred. */
pn_Store_X_except = pn_Generic_X_except, /**< Execution result if exception occurred. */
pn_Store_max = pn_Generic_other /**< number of projections from a Store */
} pn_Store; /* Projection numbers for Store. */
FIRM_API ir_node *get_Store_mem(const ir_node *node);
FIRM_API void set_Store_mem(ir_node *node, ir_node *mem);
FIRM_API ir_node *get_Store_ptr(const ir_node *node);
......@@ -903,17 +796,6 @@ FIRM_API void set_Store_volatility(ir_node *node, ir_volatility volati
FIRM_API ir_align get_Store_align(const ir_node *node);
FIRM_API void set_Store_align(ir_node *node, ir_align align);
/**
* Projection numbers for Alloc: use for Proj nodes!
*/
typedef enum {
pn_Alloc_M = pn_Generic_M, /**< Memory result. */
pn_Alloc_X_regular = pn_Generic_X_regular, /**< Execution result if no exception occurred. */
pn_Alloc_X_except = pn_Generic_X_except, /**< Execution result if exception occurred. */
pn_Alloc_res = pn_Generic_other, /**< Result of allocation. */
pn_Alloc_max /**< number of projections from an Alloc */
} pn_Alloc; /* Projection numbers for Alloc. */
FIRM_API ir_node *get_Alloc_mem(const ir_node *node);
FIRM_API void set_Alloc_mem(ir_node *node, ir_node *mem);
FIRM_API ir_node *get_Alloc_count(const ir_node *node);
......@@ -989,17 +871,6 @@ FIRM_API void set_Mux_false(ir_node *node, ir_node *ir_false);
FIRM_API ir_node *get_Mux_true(const ir_node *node);
FIRM_API void set_Mux_true(ir_node *node, ir_node *ir_true);
/**
* Projection numbers for result of CopyB node: use for Proj nodes!
*/
typedef enum {
pn_CopyB_M_regular = pn_Generic_M, /**< The memory result. */
pn_CopyB_X_regular = pn_Generic_X_regular, /**< Execution result if no exception occurred. */
pn_CopyB_X_except = pn_Generic_X_except, /**< The control flow result branching to the exception handler */
pn_CopyB_max = pn_Generic_other /**< number of projections from a CopyB */
} pn_CopyB; /* Projection numbers for CopyB. */
#define pn_CopyB_M pn_CopyB_M_regular
FIRM_API ir_node *get_CopyB_mem(const ir_node *node);
FIRM_API void set_CopyB_mem(ir_node *node, ir_node *mem);
FIRM_API ir_node *get_CopyB_dst(const ir_node *node);
......@@ -1009,18 +880,6 @@ FIRM_API void set_CopyB_src(ir_node *node, ir_node *src);
FIRM_API ir_type *get_CopyB_type(const ir_node *node);
FIRM_API void set_CopyB_type(ir_node *node, ir_type *data_type);
/**
* Projection numbers for result of InstOf node: use for Proj nodes!
*/
typedef enum {
pn_InstOf_M_regular = pn_Generic_M, /**< The memory result. */
pn_InstOf_X_regular = pn_Generic_X_regular, /**< Execution result if no exception occurred. */
pn_InstOf_X_except = pn_Generic_X_except, /**< The control flow result branching to the exception handler */
pn_InstOf_res = pn_Generic_other, /**< The checked object pointer. */
pn_InstOf_max /**< number of projections from an InstOf */
} pn_InstOf;
#define pn_InstOf_M pn_InstOf_M_regular
/** InstOf access. */
FIRM_API ir_type *get_InstOf_type(const ir_node *node);
FIRM_API void set_InstOf_type(ir_node *node, ir_type *type);
......@@ -1029,31 +888,11 @@ FIRM_API void set_InstOf_store(ir_node *node, ir_node *obj);
FIRM_API ir_node *get_InstOf_obj(const ir_node *node);
FIRM_API void set_InstOf_obj(ir_node *node, ir_node *obj);
/**
* Projection numbers for Raise.
*/
typedef enum {
pn_Raise_M = pn_Generic_M, /**< The Memory result. */
pn_Raise_X = pn_Generic_X_regular, /**< The control flow to the exception handler. */
pn_Raise_max /**< number of projections from a Raise */
} pn_Raise; /* Projection numbers for Raise. */
FIRM_API ir_node *get_Raise_mem(const ir_node *node);
FIRM_API void set_Raise_mem(ir_node *node, ir_node *mem);
FIRM_API ir_node *get_Raise_exo_ptr(const ir_node *node); /* PoinTeR to EXception Object */
FIRM_API void set_Raise_exo_ptr(ir_node *node, ir_node *exoptr);
/**
* Projection numbers for result of Bound node: use for Proj nodes!
*/
typedef enum {
pn_Bound_M = pn_Generic_M, /**< The memory result. */
pn_Bound_X_regular = pn_Generic_X_regular, /**< Execution result if no exception occurred. */
pn_Bound_X_except = pn_Generic_X_except, /**< The control flow result branching to the exception handler */
pn_Bound_res = pn_Generic_other, /**< The checked index. */
pn_Bound_max /**< number of projections from a Bound */
} pn_Bound;
/** Returns the memory input of a Bound operation. */
FIRM_API ir_node *get_Bound_mem(const ir_node *bound);
FIRM_API void set_Bound_mem(ir_node *bound, ir_node *mem);
......
/* Warning: automatically generated code */
/**
* Projection numbers for result of Alloc node (use for Proj nodes)
*/
typedef enum {
pn_Alloc_M = pn_Generic_M, /**< memory result */
pn_Alloc_X_regular = pn_Generic_X_regular, /**< control flow when no exception occurs */
pn_Alloc_X_except = pn_Generic_X_except, /**< control flow when exception occured */
pn_Alloc_res = pn_Generic_other, /**< pointer to newly allocated memory */
pn_Alloc_max
} pn_Alloc;
/**
* Projection numbers for result of Bound node (use for Proj nodes)
*/
typedef enum {
pn_Bound_M = pn_Generic_M, /**< memory result */
pn_Bound_X_regular = pn_Generic_X_regular, /**< control flow when no exception occurs */
pn_Bound_X_except = pn_Generic_X_except, /**< control flow when exception occured */
pn_Bound_res = pn_Generic_other, /**< the checked index */
pn_Bound_max
} pn_Bound;
/**
* Projection numbers for result of Builtin node (use for Proj nodes)
*/
typedef enum {
pn_Builtin_M = pn_Generic_M, /**< memory result */
pn_Builtin_1_result = pn_Generic_other, /**< first result */
pn_Builtin_max
} pn_Builtin;
/**
* Projection numbers for result of Call node (use for Proj nodes)
*/
typedef enum {
pn_Call_M = pn_Generic_M, /**< memory result */
pn_Call_X_regular = pn_Generic_X_regular, /**< control flow when no exception occurs */
pn_Call_X_except = pn_Generic_X_except, /**< control flow when exception occured */
pn_Call_T_result = pn_Generic_other, /**< tuple containing all results */
pn_Call_P_value_res_base, /**< pointer to memory register containing copied results passed by value */
pn_Call_max
} pn_Call;
/**
* Projection numbers for result of Cmp node (use for Proj nodes)
*/
typedef enum {
pn_Cmp_False = 0, /**< always false */
pn_Cmp_Eq = 1, /**< equal */
pn_Cmp_Lt = 2, /**< less */
pn_Cmp_Le = pn_Cmp_Eq|pn_Cmp_Lt, /**< less or equal */
pn_Cmp_Gt = 4, /**< greater */
pn_Cmp_Ge = pn_Cmp_Eq|pn_Cmp_Gt, /**< greater or equal */
pn_Cmp_Lg = pn_Cmp_Lt|pn_Cmp_Gt, /**< less or greater ('not equal' for integer numbers) */
pn_Cmp_Leg = pn_Cmp_Lt|pn_Cmp_Eq|pn_Cmp_Gt, /**< less, equal or greater ('not unordered') */
pn_Cmp_Uo = 8, /**< unordered */
pn_Cmp_Ue = pn_Cmp_Uo|pn_Cmp_Eq, /**< unordered or equal */
pn_Cmp_Ul = pn_Cmp_Uo|pn_Cmp_Lt, /**< unordered or less */
pn_Cmp_Ule = pn_Cmp_Uo|pn_Cmp_Lt|pn_Cmp_Eq, /**< unordered, less or equal */
pn_Cmp_Ug = pn_Cmp_Uo|pn_Cmp_Gt, /**< unordered or greater */
pn_Cmp_Uge = pn_Cmp_Uo|pn_Cmp_Gt|pn_Cmp_Eq, /**< onordered, greater or equal */
pn_Cmp_Ne = pn_Cmp_Uo|pn_Cmp_Lt|pn_Cmp_Gt, /**< unordered, less or greater ('not equal' for floatingpoint numbers) */
pn_Cmp_True = 15, /**< always true */
pn_Cmp_max
} pn_Cmp;
/**
* Projection numbers for result of Cond node (use for Proj nodes)
*/
typedef enum {
pn_Cond_false, /**< control flow if operand is "false" */
pn_Cond_true, /**< control flow if operand is "true" */
pn_Cond_max
} pn_Cond;
/**
* Projection numbers for result of CopyB node (use for Proj nodes)
*/
typedef enum {
pn_CopyB_M = pn_Generic_M, /**< memory result */
pn_CopyB_X_regular = pn_Generic_X_regular, /**< control flow when no exception occurs */
pn_CopyB_X_except = pn_Generic_X_except, /**< control flow when exception occured */
pn_CopyB_max
} pn_CopyB;
/**
* Projection numbers for result of Div node (use for Proj nodes)
*/
typedef enum {
pn_Div_M = pn_Generic_M, /**< memory result */
pn_Div_X_regular = pn_Generic_X_regular, /**< control flow when no exception occurs */
pn_Div_X_except = pn_Generic_X_except, /**< control flow when exception occured */
pn_Div_res = pn_Generic_other, /**< result of computation */
pn_Div_max
} pn_Div;
/**
* Projection numbers for result of DivMod node (use for Proj nodes)
*/
typedef enum {
pn_DivMod_M = pn_Generic_M, /**< memory result */
pn_DivMod_X_regular = pn_Generic_X_regular, /**< control flow when no exception occurs */
pn_DivMod_X_except = pn_Generic_X_except, /**< control flow when exception occured */
pn_DivMod_res_div = pn_Generic_other, /**< result of computation a/b */
pn_DivMod_res_mod, /**< result of computation a%b */
pn_DivMod_max
} pn_DivMod;
/**
* Projection numbers for result of InstOf node (use for Proj nodes)
*/
typedef enum {
pn_InstOf_M = pn_Generic_M, /**< memory result */
pn_InstOf_X_regular = pn_Generic_X_regular, /**< control flow when no exception occurs */
pn_InstOf_X_except = pn_Generic_X_except, /**< control flow when exception occured */
pn_InstOf_res = pn_Generic_other, /**< checked object pointer */
pn_InstOf_max
} pn_InstOf;
/**
* Projection numbers for result of Load node (use for Proj nodes)
*/
typedef enum {
pn_Load_M = pn_Generic_M, /**< memory result */
pn_Load_X_regular = pn_Generic_X_regular, /**< control flow when no exception occurs */
pn_Load_X_except = pn_Generic_X_except, /**< control flow when exception occured */
pn_Load_res = pn_Generic_other, /**< result of load operation */
pn_Load_max
} pn_Load;
/**
* Projection numbers for result of Mod node (use for Proj nodes)
*/
typedef enum {
pn_Mod_M = pn_Generic_M, /**< memory result */
pn_Mod_X_regular = pn_Generic_X_regular, /**< control flow when no exception occurs */
pn_Mod_X_except = pn_Generic_X_except, /**< control flow when exception occured */
pn_Mod_res = pn_Generic_other, /**< result of computation */
pn_Mod_max
} pn_Mod;
/**
* Projection numbers for result of Quot node (use for Proj nodes)
*/
typedef enum {
pn_Quot_M = pn_Generic_M, /**< memory result */
pn_Quot_X_regular = pn_Generic_X_regular, /**< control flow when no exception occurs */
pn_Quot_X_except = pn_Generic_X_except, /**< control flow when exception occured */
pn_Quot_res = pn_Generic_other, /**< result of computation */
pn_Quot_max
} pn_Quot;
/**
* Projection numbers for result of Raise node (use for Proj nodes)
*/
typedef enum {
pn_Raise_M = pn_Generic_M, /**< memory result */
pn_Raise_X = pn_Generic_X_regular, /**< control flow to exception handler */
pn_Raise_max
} pn_Raise;
/**
* Projection numbers for result of Start node (use for Proj nodes)
*/
typedef enum {
pn_Start_X_initial_exec, /**< control flow */
pn_Start_M, /**< initial memory */
pn_Start_P_frame_base, /**< frame base pointer */
pn_Start_P_tls, /**< pointer to thread local storage segment */
pn_Start_T_args, /**< function arguments */
pn_Start_max
} pn_Start;
/**
* Projection numbers for result of Store node (use for Proj nodes)
*/
typedef enum {
pn_Store_M = pn_Generic_M, /**< memory result */
pn_Store_X_regular = pn_Generic_X_regular, /**< control flow when no exception occurs */
pn_Store_X_except = pn_Generic_X_except, /**< control flow when exception occured */
pn_Store_max
} pn_Store;
......@@ -561,7 +561,7 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp)
assert(mode_is_reference(get_irn_mode(param)));
copy = new_rd_CopyB(dbgi, bl, curr_mem, addr, param, param_type);
mem = new_r_Proj(copy, mode_M, pn_CopyB_M_regular);
mem = new_r_Proj(copy, mode_M, pn_CopyB_M);
}
curr_ofs += param_size;
......
......@@ -4671,7 +4671,7 @@ static ir_node *gen_Proj_CopyB(ir_node *node)
long proj = get_Proj_proj(node);
switch (proj) {
case pn_CopyB_M_regular:
case pn_CopyB_M:
if (is_ia32_CopyB_i(new_pred)) {
return new_rd_Proj(dbgi, new_pred, mode_M, pn_ia32_CopyB_i_M);
} else if (is_ia32_CopyB(new_pred)) {
......
......@@ -1636,7 +1636,7 @@ static ir_node *equivalent_node_Proj_CopyB(ir_node *proj)
if (a == b) {
/* Turn CopyB into a tuple (mem, jmp, bad, bad) */
switch (get_Proj_proj(proj)) {
case pn_CopyB_M_regular:
case pn_CopyB_M:
proj = get_CopyB_mem(copyb);
DBG_OPT_ALGSIM0(oldn, proj, FS_OPT_NOP);
break;
......
......@@ -137,7 +137,7 @@ static void find_copyb_nodes(ir_node *irn, void *ctx)
if (is_Proj(irn)) {
ir_node *pred = get_Proj_pred(irn);
if (is_CopyB(pred) && get_Proj_proj(irn) != pn_CopyB_M_regular) {
if (is_CopyB(pred) && get_Proj_proj(irn) != pn_CopyB_M) {
/* found an exception Proj: remove it from the list again */
entry = get_irn_link(pred);
list_del(&entry->list);
......
......@@ -353,19 +353,6 @@ ir_node *new_{{node.constrname}}(
}
''')
# not used - as we have the pn_ declarations in libfirm/irnode.h where they
# contain informative comments
# {% for node in nodes %}
# {% if node.outs %}
# typedef enum {
# {%- for out in node.outs %}
# pn_{{node.name}}_{{out}},
# {%- endfor %}
# pn_{{node.name}}_max
# } pn_{{node.name}};
# {% endif %}
# {% endfor %}
irnode_h_template = env.from_string('''
/* Warning: automatically generated code */
......@@ -459,28 +446,55 @@ void finish_op(void)
''')
projnumbers_h_template = env.from_string('''
/* Warning: automatically generated code */
{% for node in nodes -%}
{% if node.outs %}
/**
* Projection numbers for result of {{node.name}} node (use for Proj nodes)
*/
typedef enum {
{% for out in node.outs -%}
pn_{{node.name}}_{{out[0]}}
{%- if out.__len__() > 2 %} = {{out[2]}}{% endif %}, /**< {{out[1]}} */
{% endfor -%}
pn_{{node.name}}_max
} pn_{{node.name}};
{% endif %}
{%- endfor %}
''')
#############################
def prepare_nodes():
real_nodes = []
for node in nodes:
if isAbstract(node):
continue
real_nodes.append(node)
for node in real_nodes:
preprocess_node(node)
return real_nodes
def main(argv):
if len(argv) < 3:
print "usage: %s specname(ignored) destdirectory" % argv[0]
sys.exit(1)
gendir = argv[2]
# hardcoded path to libfirm/include/libfirm
gendir2 = argv[2] + "/../../include/libfirm"
# List of TODOs
niymap = [ "ASM", "Const", "Phi", "SymConst", "Sync"]
real_nodes = []
for node in nodes:
if isAbstract(node):
continue
real_nodes.append(node)
real_nodes = prepare_nodes()
file = open(gendir + "/gen_ir_cons.c.inl", "w")
for node in real_nodes:
preprocess_node(node)
if node.name in niymap:
continue
......@@ -507,4 +521,8 @@ def main(argv):