#ifndef FIRM_BE_ARM_ARM_NODES_ATTR_H
#define FIRM_BE_ARM_ARM_NODES_ATTR_H
+#include "firm_types.h"
+#include "irnode_t.h"
#include "../bearch_t.h"
-#include "../../common/firm_types.h"
/**
* Possible ARM register shift types.
/** Set the condition code to flags */
#define ARM_SET_COND(attr, code) ((attr)->instr_fl = (((attr)->instr_fl & ~(15 << 3)) | ((code) << 3)))
+/** Generic ARM node attributes. */
typedef struct _arm_attr_t {
- arch_irn_flags_t flags; /**< indicating if spillable, rematerializeable ... etc. */
- int n_res; /**< number of results for this node */
+ except_attr exc; /**< the exception attribute. MUST be the first one. */
+ arch_irn_flags_t flags; /**< indicating if spillable, rematerializeable ... etc. */
const arch_register_req_t **in_req; /**< register requirements for arguments */
const arch_register_req_t **out_req; /**< register requirements for results */
- ir_mode *op_mode; /**< operation mode */
- unsigned instr_fl; /**< condition code, shift modifier */
- tarval *value; /**< immediate */
- const char *symconst_label;
- int proj_num;
- int n_projs;
- long default_proj_num;
+ ir_mode *op_mode; /**< operation mode if different from node's mode */
+ unsigned instr_fl; /**< condition code, shift modifier */
+ tarval *value; /**< immediate */
+ int *out_flags; /**< flags for each produced value */
- /* must be last, dynamically allocated */
- const arch_register_t *slots[1]; /**< register slots for assigned registers */
+ const arch_register_t **slots; /**< register slots for assigned registers */
} arm_attr_t;
+/** Attributes for a SymConst */
+typedef struct _arm_SymConst_attr_t {
+ arm_attr_t attr;
+ ident *symconst_id; /**< for SymConsts: its ident */
+} arm_SymConst_attr_t;
+
+/** Attributes for a CondJmp */
+typedef struct _arm_CondJmp_attr_t {
+ arm_attr_t attr;
+ int proj_num;
+} arm_CondJmp_attr_t;
+
+/** Attributes for a SwitchJmp */
+typedef struct _arm_SwitchJmp_attr_t {
+ arm_attr_t attr;
+ int n_projs;
+ long default_proj_num;
+} arm_SwitchJmp_attr_t;
+
/**
* Returns the shift modifier string.
*/