2 * Copyright (C) 1995-2007 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 This file implements the ia32 node emitter.
23 * @author Christian Wuerdig, Matthias Braun
26 #ifndef FIRM_BE_IA32_IA32_EMITTER_H
27 #define FIRM_BE_IA32_IA32_EMITTER_H
31 #include "../bearch.h"
32 #include "../beemitter.h"
34 #include "bearch_ia32_t.h"
36 typedef struct ia32_emit_env_t ia32_emit_env_t;
38 struct ia32_emit_env_t {
40 const arch_env_t *arch_env;
41 const ia32_code_gen_t *cg;
45 void ia32_emit_source_register(ia32_emit_env_t *env, const ir_node *node, int pos);
46 void ia32_emit_8bit_source_register(ia32_emit_env_t *env, const ir_node *node, int pos);
47 void ia32_emit_16bit_source_register(ia32_emit_env_t *env, const ir_node *node, int pos);
48 void ia32_emit_dest_register(ia32_emit_env_t *env, const ir_node *node, int pos);
49 void ia32_emit_x87_name(ia32_emit_env_t *env, const ir_node *node, int pos);
50 void ia32_emit_immediate(ia32_emit_env_t *env, const ir_node *node);
51 void ia32_emit_source_register_or_immediate(ia32_emit_env_t *env,
52 const ir_node *node, int pos);
53 void ia32_emit_mode_suffix(ia32_emit_env_t *env, const ir_node *node);
54 void ia32_emit_x87_mode_suffix(ia32_emit_env_t *env, const ir_node *node);
55 void ia32_emit_xmm_mode_suffix(ia32_emit_env_t *env, const ir_node *node);
56 void ia32_emit_xmm_mode_suffix_s(ia32_emit_env_t *env, const ir_node *node);
57 void ia32_emit_extend_suffix(ia32_emit_env_t *env, const ir_mode *mode);
58 void ia32_emit_binop(ia32_emit_env_t *env, const ir_node *node);
59 void ia32_emit_am_or_dest_register(ia32_emit_env_t *env, const ir_node *node,
61 void ia32_emit_unop(ia32_emit_env_t *env, const ir_node *node, int pos);
62 void ia32_emit_am(ia32_emit_env_t *env, const ir_node *node);
63 void ia32_emit_adr(ia32_emit_env_t *env, const ir_node *node);
64 void ia32_emit_x87_binop(ia32_emit_env_t *env, const ir_node *node);
66 void ia32_gen_routine(ia32_code_gen_t *cg, ir_graph *irg);
67 void ia32_emit_exc_label(ia32_emit_env_t *env, const ir_node *node);
69 #endif /* FIRM_BE_IA32_IA32_EMITTER_H */