- Split bearch.h correctly into bearch.h and bearch_t.h
[libfirm] / ir / be / ppc32 / ppc32_nodes_attr.h
1 #ifndef _PPC32_NODES_ATTR_H_
2 #define _PPC32_NODES_ATTR_H_
3
4 #include "../bearch_t.h"
5
6 typedef struct
7 {
8         unsigned shift:5;
9         unsigned maskA:5;
10         unsigned maskB:5;
11 } rlwimi_const_t;
12
13
14 typedef enum {
15         ppc32_ac_None,
16         ppc32_ac_Const,
17         ppc32_ac_SymConst,
18         ppc32_ac_FrameEntity,
19         ppc32_ac_RlwimiConst,
20         ppc32_ac_BranchProj,
21         ppc32_ac_Offset
22 } ppc32_attr_content_type;
23
24 typedef enum {
25         ppc32_ao_None, ppc32_ao_Lo16, ppc32_ao_Hi16, ppc32_ao_Ha16, ppc32_ao_Illegal
26 } ppc32_attr_offset_mode;
27
28 typedef struct _ppc32_attr_t {
29         arch_irn_flags_t flags;     /**< indicating if spillable, rematerializeable ... etc. */
30         int              n_res;     /**< number of results for this node */
31
32         const arch_register_req_t **in_req;  /**< register requirements for arguments */
33         const arch_register_req_t **out_req; /**< register requirements for results */
34
35         ppc32_attr_content_type content_type;
36         ppc32_attr_offset_mode offset_mode;
37         union {
38                 tarval *constant_tarval;
39                 ident *symconst_ident;
40                 ir_entity *frame_entity;
41                 rlwimi_const_t rlwimi_const;
42                 int proj_nr;
43                 int offset;
44                 void* empty;
45         } data;
46
47         /* must be last, dynamically allocated */
48         const arch_register_t *slots[1];       /**< register slots for assigned registers */
49 } ppc32_attr_t;
50
51 #endif /* _PPC32_NODES_ATTR_H_ */