amd64_nodes_attr.h 1.2 KB
Newer Older
1
2
/*
 * This file is part of libFirm.
3
 * Copyright (C) 2012 University of Karlsruhe.
4
5
6
7
8
9
 */

/**
 * @file
 * @brief   attributes attached to all amd64 nodes
 */
10
11
#ifndef FIRM_BE_AMD64_AMD64_NODES_ATTR_H
#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
19

struct amd64_attr_t
{
20
	except_attr                 exc;     /**< the exception attribute. MUST be the first one. */
21
	ir_mode                    *ls_mode; /**< Stores the "input" mode */
22
23
24
25
26
27
	struct amd64_attr_data_bitfield {
		unsigned ins_permuted : 1;      /**< inputs of node have been permuted
		                                     (for commutative nodes) */
		unsigned cmp_unsigned : 1;      /**< compare should be unsigned */
	} data;
	struct amd64_attr_extended {
28
29
		ir_relation relation;           /**< type of compare operation >*/
		unsigned    imm_value;          /**< immediate value to use >*/
30
	} ext;
31
32
};

33
34
struct amd64_SymConst_attr_t
{
35
36
37
	amd64_attr_t  base;
	ir_entity    *entity;
	unsigned      fp_offset;
38
39
};

40
41
42
43
#define CAST_AMD64_ATTR(type,ptr)        ((type *)(ptr))
#define CONST_CAST_AMD64_ATTR(type,ptr)  ((const type *)(ptr))

#endif