b68eb835fe20eece7e18354eb83efd7cb944a63d
[libfirm] / ir / be / mips / mips_nodes_attr.h
1 #ifndef _MIPS_NODES_ATTR_H_
2 #define _MIPS_NODES_ATTR_H_
3
4 #include "../bearch.h"
5 #include "irmode_t.h"
6
7 typedef struct _mips_register_req_t {
8         const arch_register_req_t req;
9         int same_pos;        /**<< in case of "should be same" we need to remember the pos to get the irn */
10         int different_pos;   /**<< in case of "should be different" we need to remember the pos to get the irn */
11 } mips_register_req_t;
12
13
14 typedef struct _mips_attr_t {
15         arch_irn_flags_t flags;     /**< indicating if spillable, rematerializeable ... etc. */
16         int              n_res;     /**< number of results for this node */
17
18         tarval *tv;                                     /**< contains the immediate value (if the node has any) */
19         ident *symconst_id;                     /**< contains the ident (for la operations) */
20
21         union {
22                 ir_mode *load_store_mode;       /**< contains the mode of a load/store */
23                 ir_mode *original_mode;         /**< contains the original mode of the node */
24         } modes;
25         ir_entity *stack_entity;        /**< contains the entity on the stack for a load/store mode */
26         int stack_entity_offset;        /**< contains the real stack offset for the entity */
27         int switch_default_pn;          /**< proj number of default case in switch */
28
29         const mips_register_req_t **in_req;  /**< register requirements for arguments */
30         const mips_register_req_t **out_req; /**< register requirements for results */
31
32         /* must be last, dynamically allocated */
33         const arch_register_t *slots[1];     /**< register slots for assigned registers */
34 } mips_attr_t;
35
36 #endif /* _mips_NODES_ATTR_H_ */