beifg: Collect ifg statistics in one pass instead of two.
[libfirm] / ir / be / amd64 / amd64_nodes_attr.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5
6 /**
7  * @file
8  * @brief   attributes attached to all amd64 nodes
9  */
10 #ifndef FIRM_BE_amd64_amd64_NODES_ATTR_H
11 #define FIRM_BE_amd64_amd64_NODES_ATTR_H
12
13 #include "bearch.h"
14
15 typedef struct amd64_attr_t            amd64_attr_t;
16 typedef struct amd64_SymConst_attr_t   amd64_SymConst_attr_t;
17
18 struct amd64_attr_t
19 {
20         except_attr                 exc;     /**< the exception attribute. MUST be the first one. */
21         ir_mode                    *ls_mode; /**< Stores the "input" mode */
22         struct amd64_attr_data_bitfield {
23                 unsigned ins_permuted : 1;      /**< inputs of node have been permuted
24                                                      (for commutative nodes) */
25                 unsigned cmp_unsigned : 1;      /**< compare should be unsigned */
26         } data;
27         struct amd64_attr_extended {
28                 ir_relation relation;           /**< type of compare operation >*/
29                 unsigned    imm_value;          /**< immediate value to use >*/
30         } ext;
31 };
32
33 struct amd64_SymConst_attr_t
34 {
35         amd64_attr_t  base;
36         ir_entity    *entity;
37         unsigned      fp_offset;
38 };
39
40 #define CAST_AMD64_ATTR(type,ptr)        ((type *)(ptr))
41 #define CONST_CAST_AMD64_ATTR(type,ptr)  ((const type *)(ptr))
42
43 #endif