libFirm 1.20
|
00001 /* 00002 * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. 00003 * 00004 * This file is part of libFirm. 00005 * 00006 * This file may be distributed and/or modified under the terms of the 00007 * GNU General Public License version 2 as published by the Free Software 00008 * Foundation and appearing in the file LICENSE.GPL included in the 00009 * packaging of this file. 00010 * 00011 * Licensees holding valid libFirm Professional Edition licenses may use 00012 * this file in accordance with the libFirm Commercial License. 00013 * Agreement provided with the Software. 00014 * 00015 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00016 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00017 * PURPOSE. 00018 */ 00019 00025 #ifndef FIRM_BE_MAIN_H 00026 #define FIRM_BE_MAIN_H 00027 00028 #include <stdio.h> 00029 #include "irarch.h" 00030 #include "lowering.h" 00031 #include "iroptimize.h" 00032 #include "begin.h" 00033 00044 typedef enum asm_constraint_flags_t { 00045 ASM_CONSTRAINT_FLAG_NONE = 0, 00047 ASM_CONSTRAINT_FLAG_SUPPORTS_REGISTER = 1u << 0, 00049 ASM_CONSTRAINT_FLAG_SUPPORTS_MEMOP = 1u << 1, 00051 ASM_CONSTRAINT_FLAG_SUPPORTS_IMMEDIATE = 1u << 2, 00053 ASM_CONSTRAINT_FLAG_NO_SUPPORT = 1u << 3, 00055 ASM_CONSTRAINT_FLAG_MODIFIER_WRITE = 1u << 4, 00057 ASM_CONSTRAINT_FLAG_MODIFIER_NO_WRITE = 1u << 5, 00059 ASM_CONSTRAINT_FLAG_MODIFIER_READ = 1u << 6, 00061 ASM_CONSTRAINT_FLAG_MODIFIER_NO_READ = 1u << 7, 00064 ASM_CONSTRAINT_FLAG_MODIFIER_EARLYCLOBBER = 1u << 8, 00066 ASM_CONSTRAINT_FLAG_MODIFIER_COMMUTATIVE = 1u << 9, 00068 ASM_CONSTRAINT_FLAG_INVALID = 1u << 10 00069 } asm_constraint_flags_t; 00070 ENUM_BITSET(asm_constraint_flags_t) 00071 00072 00082 typedef ir_node *(create_trampoline_fkt)(ir_node *block, ir_node *mem, ir_node *trampoline, ir_node *env, ir_node *callee); 00083 00088 typedef struct backend_params { 00090 unsigned support_inline_asm:1; 00092 unsigned support_rotl:1; 00094 unsigned byte_order_big_endian:1; 00099 unsigned modulo_shift_efficient:1; 00104 unsigned non_modulo_shift_efficient:1; 00105 00107 const ir_settings_arch_dep_t *dep_param; 00108 00110 arch_allow_ifconv_func allow_ifconv; 00111 00114 unsigned machine_size; 00115 00120 ir_mode *mode_float_arithmetic; 00121 00125 ir_type *type_long_long; 00126 00130 ir_type *type_unsigned_long_long; 00131 00135 ir_type *type_long_double; 00136 00138 unsigned trampoline_size; 00139 00141 unsigned trampoline_align; 00142 00144 create_trampoline_fkt *build_trampoline; 00145 00147 unsigned stack_param_align; 00148 } backend_params; 00149 00153 FIRM_API int be_parse_arg(const char *arg); 00154 00161 FIRM_API const backend_params *be_get_backend_param(void); 00162 00172 FIRM_API void be_lower_for_target(void); 00173 00178 FIRM_API ir_prog_pass_t *lower_for_target_pass(const char *name); 00179 00183 FIRM_API void be_main(FILE *output, const char *compilation_unit_name); 00184 00189 FIRM_API asm_constraint_flags_t be_parse_asm_constraints(const char *constraints); 00190 00194 FIRM_API int be_is_valid_clobber(const char *clobber); 00195 00198 #include "end.h" 00199 00200 #endif