ia32: Use a more logical specification of operand sizes in the binary emitter.
[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  */
25 #ifndef FIRM_BE_SPARC_SPARC_NODES_ATTR_H
26 #define FIRM_BE_SPARC_SPARC_NODES_ATTR_H
27
28 #include "bearch.h"
29 #include <stdint.h>
30
31 typedef struct sparc_attr_t  sparc_attr_t;
32
33 /**
34  * base SPARC attribute
35  */
36 struct sparc_attr_t
37 {
38         except_attr                 exc;                /**< the exception attribute. MUST be the first one. */
39         int32_t                     immediate_value;    /* immediate values */
40         ir_entity                  *immediate_value_entity;
41 };
42
43 enum sparc_arch_irn_flags_t {
44         sparc_arch_irn_flag_needs_64bit_spillslot = arch_irn_flags_backend << 0,
45         sparc_arch_irn_flag_immediate_form        = arch_irn_flags_backend << 1,
46         sparc_arch_irn_flag_aggregate_return      = arch_irn_flags_backend << 2,
47         sparc_arch_irn_flag_has_delay_slot        = arch_irn_flags_backend << 3,
48 };
49
50 /**
51  * attribute for FP immediate instruction
52  */
53 typedef struct sparc_fp_attr_t sparc_fp_attr_t;
54 struct sparc_fp_attr_t {
55         sparc_attr_t  base;         /**< generic attribute */
56         ir_mode      *fp_mode;
57 };
58
59 typedef struct sparc_fp_conv_attr_t sparc_fp_conv_attr_t;
60 struct sparc_fp_conv_attr_t {
61         sparc_attr_t  base;
62         ir_mode      *src_mode;
63         ir_mode      *dest_mode;
64 };
65
66 /**
67  * attributes for load/store addressing modes
68  */
69 typedef struct sparc_load_store_attr_t sparc_load_store_attr_t;
70 struct sparc_load_store_attr_t {
71         sparc_attr_t  base;    /**< generic attribute */
72         ir_mode      *load_store_mode;
73         bool          is_frame_entity : 1;
74         bool          is_reg_reg      : 1;
75 };
76
77 /**
78  * attributes for conditional jumps
79  */
80 typedef struct sparc_jmp_cond_attr_t sparc_jmp_cond_attr_t;
81 struct sparc_jmp_cond_attr_t {
82         sparc_attr_t base;    /**< generic attribute */
83         ir_relation  relation;
84         bool         is_unsigned      : 1;
85         bool         annul_delay_slot : 1;
86 };
87
88 /**
89  * attributes for switch jumps
90  */
91 typedef struct sparc_switch_jmp_attr_t sparc_switch_jmp_attr_t;
92 struct sparc_switch_jmp_attr_t {
93         sparc_attr_t           base;
94         const ir_switch_table *table;
95         ir_entity             *table_entity;
96 };
97
98 enum n_sparc_Return {
99         n_sparc_Return_mem = 0,
100         n_sparc_Return_sp  = 1,
101 };
102
103 #endif