- Split bearch.h correctly into bearch.h and bearch_t.h
[libfirm] / ir / be / ppc32 / ppc32_nodes_attr.h
index 3737f27..d2c7685 100644 (file)
@@ -1,13 +1,7 @@
 #ifndef _PPC32_NODES_ATTR_H_
 #define _PPC32_NODES_ATTR_H_
 
-#include "../bearch.h"
-
-typedef struct _ppc32_register_req_t {
-       const arch_register_req_t req;
-       int same_pos;        /**<< in case of "should be same" we need to remember the pos to get the irn */
-       int different_pos;   /**<< in case of "should be different" we need to remember the pos to get the irn */
-} ppc32_register_req_t;
+#include "../bearch_t.h"
 
 typedef struct
 {
@@ -18,7 +12,12 @@ typedef struct
 
 
 typedef enum {
-       ppc32_ac_None, ppc32_ac_Const, ppc32_ac_SymConst, ppc32_ac_FrameEntity, ppc32_ac_RlwimiConst, ppc32_ac_BranchProj,
+       ppc32_ac_None,
+       ppc32_ac_Const,
+       ppc32_ac_SymConst,
+       ppc32_ac_FrameEntity,
+       ppc32_ac_RlwimiConst,
+       ppc32_ac_BranchProj,
        ppc32_ac_Offset
 } ppc32_attr_content_type;
 
@@ -27,26 +26,26 @@ typedef enum {
 } ppc32_attr_offset_mode;
 
 typedef struct _ppc32_attr_t {
-       arch_irn_flags_t flags;     /**<< indicating if spillable, rematerializeable ... etc. */
-       int              n_res;     /**<< number of results for this node */
-
-       const ppc32_register_req_t **in_req;  /**<< register requirements for arguments */
-       const ppc32_register_req_t **out_req; /**<< register requirements for results */
+       arch_irn_flags_t flags;     /**< indicating if spillable, rematerializeable ... etc. */
+       int              n_res;     /**< number of results for this node */
 
-       const arch_register_t **slots;          /**<< register slots for assigned registers */
+       const arch_register_req_t **in_req;  /**< register requirements for arguments */
+       const arch_register_req_t **out_req; /**< register requirements for results */
 
        ppc32_attr_content_type content_type;
        ppc32_attr_offset_mode offset_mode;
        union {
                tarval *constant_tarval;
                ident *symconst_ident;
-               entity *frame_entity;
+               ir_entity *frame_entity;
                rlwimi_const_t rlwimi_const;
                int proj_nr;
                int offset;
                void* empty;
        } data;
 
+       /* must be last, dynamically allocated */
+       const arch_register_t *slots[1];       /**< register slots for assigned registers */
 } ppc32_attr_t;
 
 #endif /* _PPC32_NODES_ATTR_H_ */