mips_nodes_attr.h 1.75 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.
 */

20
21
22
23
24
25
26
27
/**
 * @file
 * @brief   declaration of attributes for mips nodes
 * @author  Matthias Braun
 * @version $Id$
 */
#ifndef FIRM_BE_MIPS_MIPS_NODES_ATTR_H
#define FIRM_BE_MIPS_MIPS_NODES_ATTR_H
28

29
#include "../bearch.h"
30
#include "irmode_t.h"
31
#include "irnode_t.h"
32

33
34
typedef struct mips_attr_t {
	except_attr  exc;               /**< the exception attribute. MUST be the first one. */
35
36
37

	int switch_default_pn;		/**< proj number of default case in switch */

Matthias Braun's avatar
Matthias Braun committed
38
39
	const arch_register_req_t **in_req;  /**< register requirements for arguments */
	const arch_register_req_t **out_req; /**< register requirements for results */
40
41
} mips_attr_t;

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
typedef enum mips_immediate_type_t {
	MIPS_IMM_CONST,
	MIPS_IMM_SYMCONST_LO,
	MIPS_IMM_SYMCONST_HI
} mips_immediate_type_t;

typedef struct mips_immediate_attr_t {
	mips_attr_t            attr;
	mips_immediate_type_t  imm_type;
	ir_entity             *entity;
	long                   val;
} mips_immediate_attr_t;

typedef struct mips_load_store_attr_t {
	mips_attr_t  attr;
	ir_entity   *stack_entity;
	long         offset;
} mips_load_store_attr_t;

61
#endif