made code C89 compliant
[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, ppc32_ac_Const, ppc32_ac_SymConst, ppc32_ac_FrameEntity, ppc32_ac_RlwimiConst, ppc32_ac_BranchProj,
22         ppc32_ac_Offset
23 } ppc32_attr_content_type;
24
25 typedef enum {
26         ppc32_ao_None, ppc32_ao_Lo16, ppc32_ao_Hi16, ppc32_ao_Ha16, ppc32_ao_Illegal
27 } ppc32_attr_offset_mode;
28
29 typedef struct _ppc32_attr_t {
30         arch_irn_flags_t flags;     /**<< indicating if spillable, rematerializeable ... etc. */
31         int              n_res;     /**<< number of results for this node */
32
33         const ppc32_register_req_t **in_req;  /**<< register requirements for arguments */
34         const ppc32_register_req_t **out_req; /**<< register requirements for results */
35
36         const arch_register_t **slots;          /**<< register slots for assigned registers */
37
38         ppc32_attr_content_type content_type;
39         ppc32_attr_offset_mode offset_mode;
40         union {
41                 tarval *constant_tarval;
42                 ident *symconst_ident;
43                 entity *frame_entity;
44                 rlwimi_const_t rlwimi_const;
45                 int proj_nr;
46                 int offset;
47                 void* empty;
48         } data;
49
50 } ppc32_attr_t;
51
52 #endif /* _PPC32_NODES_ATTR_H_ */