X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Farm%2Farm_emitter.h;h=fafdb2a616aea053635758d7ab85e190467f073a;hb=dfc341ac6f54b4b0922d605e28333be76f487c68;hp=787a7d4f10de0082e0c4c09e5a6f72d7a371dc25;hpb=021dd42c11eca475bae9fb4176a6b8f02f471c43;p=libfirm diff --git a/ir/be/arm/arm_emitter.h b/ir/be/arm/arm_emitter.h index 787a7d4f1..fafdb2a61 100644 --- a/ir/be/arm/arm_emitter.h +++ b/ir/be/arm/arm_emitter.h @@ -1,28 +1,58 @@ -#ifndef _arm_EMITTER_H_ -#define _arm_EMITTER_H_ - -#include "irargs_t.h" // this also inlucdes -#include "irnode.h" +/* + * Copyright (C) 1995-2007 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. + */ + +/** + * @file + * @brief declarations for arm emitter + * @author Oliver Richter, Tobias Gneis + * @version $Id$ + */ +#ifndef FIRM_BE_ARM_ARM_EMITTER_H +#define FIRM_BE_ARM_ARM_EMITTER_H + +#include "firm_types.h" +#include "pmap.h" +#include "irargs_t.h" #include "debug.h" -#include "../bearch.h" +#include "../bearch_t.h" #include "bearch_arm_t.h" +/** + * The ARM emitter environment. + */ typedef struct _arm_emit_env_t { - firm_dbg_module_t *mod; - FILE *out; - const arch_env_t *arch_env; - const arm_code_gen_t *cg; + be_emit_env_t *emit; /**< environment for the generic GAS emitter. */ + const arch_env_t *arch_env; /**< the architecture environment */ + const arm_code_gen_t *cg; /**< the code generator object */ + pmap *symbols; /**< map containing all indirect symbols */ + DEBUG_ONLY(firm_dbg_module_t *mod;) } arm_emit_env_t; -const lc_arg_env_t *arm_get_arg_env(void); - -void equalize_dest_src(FILE *F, ir_node *n); - -int get_arm_reg_nr(ir_node *irn, int posi, int in_out); -const char *get_arm_in_reg_name(ir_node *irn, int pos); +void arm_emit_mode(arm_emit_env_t *env, const ir_node *node); +void arm_emit_source_register(arm_emit_env_t *env, const ir_node *node, int pos); +void arm_emit_dest_register(arm_emit_env_t *env, const ir_node *node, int pos); +void arm_emit_offset(arm_emit_env_t *env, const ir_node *node); +void arm_emit_immediate(arm_emit_env_t *env, const ir_node *node); +void arm_emit_shift(arm_emit_env_t *env, const ir_node *node); -void arm_gen_routine(FILE *F, ir_graph *irg, const arm_code_gen_t *cg); +void arm_gen_routine(const arm_code_gen_t *cg, ir_graph *irg); -#endif /* _arm_EMITTER_H_ */ +#endif