libFirm
irarch.h
Go to the documentation of this file.
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 
26 #ifndef FIRM_IR_IRARCH_H
27 #define FIRM_IR_IRARCH_H
28 
29 #include "firm_types.h"
30 #include "begin.h"
31 
35 typedef enum instr {
36  LEA,
38  SUB,
39  ADD,
40  ZERO,
41  MUL,
43 } insn_kind;
44 
54 typedef int (*evaluate_costs_func)(insn_kind kind, const ir_mode *mode, ir_tarval *tv);
55 
60 typedef struct ir_settings_arch_dep_t {
61  /* Mul optimization */
62  unsigned also_use_subs : 1;
63  unsigned maximum_shifts;
69  /* Div/Mod optimization */
70  unsigned allow_mulhs : 1;
71  unsigned allow_mulhu : 1;
72  unsigned max_bits_for_mulh;
75 
80 typedef const ir_settings_arch_dep_t *(*arch_dep_params_factory_t)(void);
81 
85 typedef enum {
86  arch_dep_none = 0,
92 
93 
98 
107 
124 
141 
142 #include "end.h"
143 
144 #endif