ppc32_nodes_attr.h 1.86 KB
Newer Older
Christian Würdig's avatar
Christian Würdig committed
1
/*
Michael Beck's avatar
Michael Beck committed
2
 * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
Christian Würdig's avatar
Christian Würdig committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 *
 * This file is part of libFirm.
 *
 * This file may be distributed and/or modified under the terms of the
 * GNU General Public License version 2 as published by the Free Software
 * Foundation and appearing in the file LICENSE.GPL included in the
 * packaging of this file.
 *
 * Licensees holding valid libFirm Professional Edition licenses may use
 * this file in accordance with the libFirm Commercial License.
 * Agreement provided with the Software.
 *
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE.
 */

Matthias Braun's avatar
Matthias Braun committed
20
21
22
23
24
25
26
27
/**
 * @file
 * @brief   declarations for ppc32 node attributes
 * @author  Moritz Kroll, Jens Mueller
 * @version $Id$
 */
#ifndef FIRM_BE_PPC32_PPC32_NODES_ATTR_H
#define FIRM_BE_PPC32_PPC32_NODES_ATTR_H
28

Michael Beck's avatar
Michael Beck committed
29
#include "irnode_t.h"
30
#include "../bearch.h"
31
32
33
34
35
36
37
38
39
40

typedef struct
{
	unsigned shift:5;
	unsigned maskA:5;
	unsigned maskB:5;
} rlwimi_const_t;


typedef enum {
Michael Beck's avatar
Michael Beck committed
41
42
43
44
45
46
	ppc32_ac_None,
	ppc32_ac_Const,
	ppc32_ac_SymConst,
	ppc32_ac_FrameEntity,
	ppc32_ac_RlwimiConst,
	ppc32_ac_BranchProj,
47
48
49
50
51
52
53
54
	ppc32_ac_Offset
} ppc32_attr_content_type;

typedef enum {
	ppc32_ao_None, ppc32_ao_Lo16, ppc32_ao_Hi16, ppc32_ao_Ha16, ppc32_ao_Illegal
} ppc32_attr_offset_mode;

typedef struct _ppc32_attr_t {
Michael Beck's avatar
Michael Beck committed
55
	except_attr  exc;           /**< the exception attribute. MUST be the first one. */
56

Matthias Braun's avatar
Matthias Braun committed
57
58
	const arch_register_req_t **in_req;  /**< register requirements for arguments */
	const arch_register_req_t **out_req; /**< register requirements for results */
59
60
61
62
63
64

	ppc32_attr_content_type content_type;
	ppc32_attr_offset_mode offset_mode;
	union {
		tarval *constant_tarval;
		ident *symconst_ident;
65
		ir_entity *frame_entity;
66
67
68
69
		rlwimi_const_t rlwimi_const;
		int proj_nr;
		int offset;
		void* empty;
70
	} data;
71
72
73

} ppc32_attr_t;

Matthias Braun's avatar
Matthias Braun committed
74
#endif