X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fia32%2Fia32_emitter.h;h=a7f6d8f495a0740b1369e1a6c49381ab47ca1a7f;hb=ee2ce90606e3b629b45482964a70a71a46aa6966;hp=04761b152b4d108a67281a8c42b92607254facb8;hpb=8535fe8732b0acf822be252812a7158ce5b8134a;p=libfirm diff --git a/ir/be/ia32/ia32_emitter.h b/ir/be/ia32/ia32_emitter.h index 04761b152..a7f6d8f49 100644 --- a/ir/be/ia32/ia32_emitter.h +++ b/ir/be/ia32/ia32_emitter.h @@ -1,43 +1,60 @@ +/* + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. + * + * 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. + */ + /** - * Header file for ia32 emitter, containing some function definitions and types. - * @author Christian Wuerdig, Matthias Braun - * $Id$ + * @file + * @brief This file implements the ia32 node emitter. + * @author Christian Wuerdig, Matthias Braun + * @version $Id$ */ -#ifndef _IA32_EMITTER_H_ -#define _IA32_EMITTER_H_ +#ifndef FIRM_BE_IA32_IA32_EMITTER_H +#define FIRM_BE_IA32_IA32_EMITTER_H -#include "irargs_t.h" #include "irnode.h" -#include "debug.h" #include "../bearch.h" -#include "../beemitter.h" #include "bearch_ia32_t.h" -typedef struct ia32_emit_env_t { - be_emit_env_t *emit; - const arch_env_t *arch_env; - const ia32_code_gen_t *cg; - ia32_isa_t *isa; - DEBUG_ONLY(firm_dbg_module_t *mod;) -} ia32_emit_env_t; - -void ia32_emit_source_register(ia32_emit_env_t *env, const ir_node *node, int pos); -void ia32_emit_dest_register(ia32_emit_env_t *env, const ir_node *node, int pos); -void ia32_emit_x87_name(ia32_emit_env_t *env, const ir_node *node, int pos); -void ia32_emit_immediate(ia32_emit_env_t *env, const ir_node *node); -void ia32_emit_mode_suffix(ia32_emit_env_t *env, const ir_mode *mode); -void ia32_emit_x87_mode_suffix(ia32_emit_env_t *env, const ir_node *node); -void ia32_emit_xmm_mode_suffix(ia32_emit_env_t *env, const ir_node *node); -void ia32_emit_xmm_mode_suffix_s(ia32_emit_env_t *env, const ir_node *node); -void ia32_emit_extend_suffix(ia32_emit_env_t *env, const ir_mode *mode); -void ia32_emit_binop(ia32_emit_env_t *env, const ir_node *node); -void ia32_emit_unop(ia32_emit_env_t *env, const ir_node *node); -void ia32_emit_am(ia32_emit_env_t *env, const ir_node *node); -void ia32_emit_adr(ia32_emit_env_t *env, const ir_node *node); -void ia32_emit_x87_binop(ia32_emit_env_t *env, const ir_node *node); +void ia32_emit_source_register(const ir_node *node, int pos); +void ia32_emit_dest_register(const ir_node *node, int pos); +void ia32_emit_dest_register_size(const ir_node *node, int pos); +void ia32_emit_8bit_dest_register(const ir_node *node, int pos); +void ia32_emit_x87_register(const ir_node *node, int pos); +void ia32_emit_source_register_or_immediate(const ir_node *node, int pos); +void ia32_emit_8bit_source_register_or_immediate(const ir_node *node, int pos); +void ia32_emit_8bit_high_source_register(const ir_node *node, int pos); +void ia32_emit_16bit_source_register_or_immediate(const ir_node *node, int pos); +void ia32_emit_mode_suffix(const ir_node *node); +void ia32_emit_x87_mode_suffix(const ir_node *node); +void ia32_emit_xmm_mode_suffix(const ir_node *node); +void ia32_emit_xmm_mode_suffix_s(const ir_node *node); +void ia32_emit_extend_suffix(const ir_node *node); +void ia32_emit_cmp_suffix_node(const ir_node *node, int flags_pos); +void ia32_emit_binop(const ir_node *node); +void ia32_emit_unop(const ir_node *node, int pos); +void ia32_emit_am(const ir_node *node); +void ia32_emit_x87_binop(const ir_node *node); -void ia32_gen_routine(ia32_code_gen_t *cg, ir_graph *irg); +void ia32_gen_routine(ir_graph *irg); +void ia32_gen_binary_routine(ir_graph *irg); -#endif /* _IA32_EMITTER_H_ */ +/** Initializes the Emitter. */ +void ia32_init_emitter(void); +#endif