sparc: mark has_delay_slot as node flag
[libfirm] / ir / be / sparc / sparc_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   attributes attached to all sparc nodes
23  * @author  Hannes Rapp, Matthias Braun
24  * @version $Id$
25  */
26 #ifndef FIRM_BE_SPARC_SPARC_NODES_ATTR_H
27 #define FIRM_BE_SPARC_SPARC_NODES_ATTR_H
28
29 #include "../bearch.h"
30 #include <stdint.h>
31
32 typedef struct sparc_attr_t  sparc_attr_t;
33
34 /**
35  * base SPARC attribute
36  */
37 struct sparc_attr_t
38 {
39         except_attr                 exc;                /**< the exception attribute. MUST be the first one. */
40         int32_t                     immediate_value;    /* immediate values */
41         ir_entity                  *immediate_value_entity;
42 };
43
44 enum sparc_arch_irn_flags_t {
45         sparc_arch_irn_flag_modifies_flags        = arch_irn_flags_backend << 0,
46         sparc_arch_irn_flag_modifies_fp_flags     = arch_irn_flags_backend << 1,
47         sparc_arch_irn_flag_needs_64bit_spillslot = arch_irn_flags_backend << 2,
48         sparc_arch_irn_flag_immediate_form        = arch_irn_flags_backend << 3,
49         sparc_arch_irn_flag_aggregate_return      = arch_irn_flags_backend << 4,
50         sparc_arch_irn_flag_has_delay_slot        = arch_irn_flags_backend << 5,
51 };
52
53 /**
54  * attribute for FP immediate instruction
55  */
56 typedef struct sparc_fp_attr_t sparc_fp_attr_t;
57 struct sparc_fp_attr_t {
58         sparc_attr_t  base;         /**< generic attribute */
59         ir_mode      *fp_mode;
60 };
61
62 typedef struct sparc_fp_conv_attr_t sparc_fp_conv_attr_t;
63 struct sparc_fp_conv_attr_t {
64         sparc_attr_t  base;
65         ir_mode      *src_mode;
66         ir_mode      *dest_mode;
67 };
68
69 /**
70  * attributes for load/store addressing modes
71  */
72 typedef struct sparc_load_store_attr_t sparc_load_store_attr_t;
73 struct sparc_load_store_attr_t {
74         sparc_attr_t  base;    /**< generic attribute */
75         ir_mode      *load_store_mode;
76         bool          is_frame_entity : 1;
77         bool          is_reg_reg      : 1;
78 };
79
80 /**
81  * attributes for conditional jumps
82  */
83 typedef struct sparc_jmp_cond_attr_t sparc_jmp_cond_attr_t;
84 struct sparc_jmp_cond_attr_t {
85         sparc_attr_t base;    /**< generic attribute */
86         ir_relation  relation;
87         bool         is_unsigned : 1;
88 };
89
90 /**
91  * attributes for switch jumps
92  */
93 typedef struct sparc_switch_jmp_attr_t sparc_switch_jmp_attr_t;
94 struct sparc_switch_jmp_attr_t {
95         sparc_attr_t  base;    /**< generic attribute */
96         long          default_proj_num;
97         ir_entity    *jump_table;
98 };
99
100 #endif