X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fppc32%2Fppc32_emitter.h;h=1de58b5d54bb628a60f9a29b346622d9dd71b47f;hb=52b05829a843d8e3c06aac48e8123db9c71c6ef8;hp=e6f48d3dc9326d25d362723168a7644a7a5de41b;hpb=205396c4f4f5abe7abd6dc2350c8c398a7623afc;p=libfirm diff --git a/ir/be/ppc32/ppc32_emitter.h b/ir/be/ppc32/ppc32_emitter.h index e6f48d3dc..1de58b5d5 100644 --- a/ir/be/ppc32/ppc32_emitter.h +++ b/ir/be/ppc32/ppc32_emitter.h @@ -1,8 +1,33 @@ -#ifndef _PPC32_EMITTER_H_ -#define _PPC32_EMITTER_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 ppc32 emitter + * @author Moritz Kroll, Jens Mueller + * @version $Id$ + */ +#ifndef FIRM_BE_PPC32_PPC32_EMITTER_H +#define FIRM_BE_PPC32_PPC32_EMITTER_H + +#include "firm_types.h" #include "irargs_t.h" // this also inlucdes -#include "irnode.h" #include "debug.h" #include "../bearch_t.h" @@ -10,22 +35,18 @@ #include "bearch_ppc32_t.h" typedef struct _emit_env_t { - FILE *out; - const arch_env_t *arch_env; - const ppc32_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 ppc32_code_gen_t *cg; /**< the code generator object */ DEBUG_ONLY(firm_dbg_module_t *mod;) } ppc32_emit_env_t; -const lc_arg_env_t *ppc32_get_arg_env(void); - -void equalize_dest_src(FILE *F, ir_node *n); - -int get_ppc32_reg_nr(ir_node *irn, int posi, int in_out); -const char *get_ppc32_in_reg_name(ir_node *irn, int pos); - -void ppc32_gen_routine(FILE *F, ir_graph *irg, const ppc32_code_gen_t *cg); - -const char *ppc32_rlwimi_emit_helper(const ir_node *n, ppc32_emit_env_t *env); +void ppc32_gen_routine(const ppc32_code_gen_t *cg, ir_graph *irg); +void ppc32_emit_source_register(ppc32_emit_env_t *env, const ir_node *node, int pos); +void ppc32_emit_dest_register(ppc32_emit_env_t *env, const ir_node *node, int pos); +void ppc32_emit_offset(ppc32_emit_env_t *env, const ir_node *n); +void ppc32_emit_immediate(ppc32_emit_env_t *env, const ir_node *n); +void ppc32_emit_rlwimi_helper(ppc32_emit_env_t *env, const ir_node *n); -#endif /* _PPC32_EMITTER_H_ */ +#endif