2 * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
4 * This file is part of libFirm.
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.
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.
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
22 * @brief Generic backend types and interfaces.
23 * @author Sebastian Hack
26 #ifndef FIRM_BE_MAIN_H
27 #define FIRM_BE_MAIN_H
35 * This structure contains parameters that should be
36 * propagated to the libFirm parameter set.
38 typedef struct backend_params {
39 /** If set, the backend cannot handle DWORD access. */
40 unsigned do_dw_lowering:1;
41 /** If set, the backend supports inline assembly. */
42 unsigned support_inline_asm:1;
43 /** If set, the target architecture use an immediate floating point mode. */
44 unsigned has_imm_fp_mode:1;
46 /** Additional opcodes settings. */
47 const arch_ops_info *arch_op_settings;
49 /** Settings for architecture dependent optimizations. */
50 const ir_settings_arch_dep_t *dep_param;
52 /** The architecture specific intrinsic function creator. */
53 create_intrinsic_fkt *arch_create_intrinsic_fkt;
55 /** The context parameter for the create intrinsic function. */
56 void *create_intrinsic_ctx;
58 /** Backend settings for if-conversion. */
59 const ir_settings_if_conv_t *if_conv_info;
61 /** The immediate floating point mode. Temporaries are calculated using this mode. */
66 * Register the Firm backend command line options.
68 void be_opt_register(void);
71 * Parse one backend argument.
73 int be_parse_arg(const char *arg);
76 * Return the backend configuration parameter.
78 * @return libFirm configuration parameters for the selected
81 const backend_params *be_get_backend_param(void);
84 * Main interface to the frontend.
86 void be_main(FILE *output, const char *compilation_unit_name);
88 typedef struct be_main_env_t be_main_env_t;
89 typedef struct be_options_t be_options_t;