added missing include
[libfirm] / ir / be / ppc32 / ppc32_nodes_attr.h
1 #ifndef _PPC32_NODES_ATTR_H_
2 #define _PPC32_NODES_ATTR_H_
3
4 #include "../bearch.h"
5
6 typedef struct _ppc32_register_req_t {
7         const arch_register_req_t req;
8         int same_pos;        /**< in case of "should be same" we need to remember the pos to get the irn */
9         int different_pos;   /**< in case of "should be different" we need to remember the pos to get the irn */
10 } ppc32_register_req_t;
11
12 typedef struct
13 {
14         unsigned shift:5;
15         unsigned maskA:5;
16         unsigned maskB:5;
17 } rlwimi_const_t;
18
19
20 typedef enum {
21         ppc32_ac_None,
22         ppc32_ac_Const,
23         ppc32_ac_SymConst,
24         ppc32_ac_FrameEntity,
25         ppc32_ac_RlwimiConst,
26         ppc32_ac_BranchProj,
27         ppc32_ac_Offset
28 } ppc32_attr_content_type;
29
30 typedef enum {
31         ppc32_ao_None, ppc32_ao_Lo16, ppc32_ao_Hi16, ppc32_ao_Ha16, ppc32_ao_Illegal
32 } ppc32_attr_offset_mode;
33
34 typedef struct _ppc32_attr_t {
35         arch_irn_flags_t flags;     /**< indicating if spillable, rematerializeable ... etc. */
36         int              n_res;     /**< number of results for this node */
37
38         const ppc32_register_req_t **in_req;  /**< register requirements for arguments */
39         const ppc32_register_req_t **out_req; /**< register requirements for results */
40
41         const arch_register_t **slots;          /**< register slots for assigned registers */
42
43         ppc32_attr_content_type content_type;
44         ppc32_attr_offset_mode offset_mode;
45         union {
46                 tarval *constant_tarval;
47                 ident *symconst_ident;
48                 entity *frame_entity;
49                 rlwimi_const_t rlwimi_const;
50                 int proj_nr;
51                 int offset;
52                 void* empty;
53         } data;
54
55 } ppc32_attr_t;
56
57 #endif /* _PPC32_NODES_ATTR_H_ */