add support for 2 return registers
[libfirm] / ir / be / arm / arm_nodes_attr.h
index 86a95f9..7d7bf37 100644 (file)
@@ -26,8 +26,9 @@
 #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.
@@ -80,25 +81,41 @@ typedef enum _arm_condition {
 /** 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.
  */