30b1aa6c8b55424c2d18d66b3a836259021c4560
[libfirm] / ir / be / ppc32 / ppc32_nodes_attr.h
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief   declarations for ppc32 node attributes
23  * @author  Moritz Kroll, Jens Mueller
24  * @version $Id$
25  */
26 #ifndef FIRM_BE_PPC32_PPC32_NODES_ATTR_H
27 #define FIRM_BE_PPC32_PPC32_NODES_ATTR_H
28
29 #include "irnode_t.h"
30 #include "../bearch_t.h"
31
32 typedef struct
33 {
34         unsigned shift:5;
35         unsigned maskA:5;
36         unsigned maskB:5;
37 } rlwimi_const_t;
38
39
40 typedef enum {
41         ppc32_ac_None,
42         ppc32_ac_Const,
43         ppc32_ac_SymConst,
44         ppc32_ac_FrameEntity,
45         ppc32_ac_RlwimiConst,
46         ppc32_ac_BranchProj,
47         ppc32_ac_Offset
48 } ppc32_attr_content_type;
49
50 typedef enum {
51         ppc32_ao_None, ppc32_ao_Lo16, ppc32_ao_Hi16, ppc32_ao_Ha16, ppc32_ao_Illegal
52 } ppc32_attr_offset_mode;
53
54 typedef struct _ppc32_attr_t {
55         except_attr  exc;           /**< the exception attribute. MUST be the first one. */
56
57         const arch_register_req_t **in_req;  /**< register requirements for arguments */
58         const arch_register_req_t **out_req; /**< register requirements for results */
59
60         ppc32_attr_content_type content_type;
61         ppc32_attr_offset_mode offset_mode;
62         union {
63                 tarval *constant_tarval;
64                 ident *symconst_ident;
65                 ir_entity *frame_entity;
66                 rlwimi_const_t rlwimi_const;
67                 int proj_nr;
68                 int offset;
69                 void* empty;
70         } data;
71
72 } ppc32_attr_t;
73
74 #endif