X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fmips%2Fmips_emitter.h;h=a7844a0c0bd7252964e960058b4e7e77bb749da6;hb=aebc3c0c980bcc0536ffdc4cb2a545961b5a8b81;hp=86c4133e6c71eec5ed699f057fc534b66a183736;hpb=18dfdacb6faf2f93d4f6f9a6362584f8c7eb30a1;p=libfirm diff --git a/ir/be/mips/mips_emitter.h b/ir/be/mips/mips_emitter.h index 86c4133e6..a7844a0c0 100644 --- a/ir/be/mips/mips_emitter.h +++ b/ir/be/mips/mips_emitter.h @@ -1,29 +1,59 @@ -#ifndef _mips_EMITTER_H_ -#define _mips_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 the mips assembler emitter + * @author Matthias Braun, Mehdi + * @version $Id$ + */ +#ifndef FIRM_BE_MIPS_MIPS_EMITTER_H +#define FIRM_BE_MIPS_MIPS_EMITTER_H -#include "irargs_t.h" // this also inlucdes #include "irnode.h" -#include "debug.h" #include "../bearch.h" +#include "../beemitter.h" #include "bearch_mips_t.h" -typedef struct _mips_emit_env_t { - firm_dbg_module_t *mod; - FILE *out; - const arch_env_t *arch_env; +typedef struct mips_emit_env_t mips_emit_env_t; + +struct mips_emit_env_t { + be_emit_env_t *emit; + const arch_env_t *arch_env; const mips_code_gen_t *cg; -} mips_emit_env_t; + mips_isa_t *isa; +}; -const lc_arg_env_t *mips_get_arg_env(void); +void mips_emit_source_register(mips_emit_env_t *env, const ir_node *node, int pos); +void mips_emit_dest_register(mips_emit_env_t *env, const ir_node *node, int pos); +void mips_emit_immediate(mips_emit_env_t *env, const ir_node *node); +void mips_emit_jump_target(mips_emit_env_t *env, const ir_node *node); +void mips_emit_jump_target_proj(mips_emit_env_t *env, const ir_node *node, + int pn); void equalize_dest_src(FILE *F, ir_node *n); int get_mips_reg_nr(ir_node *irn, int posi, int in_out); const char *get_mips_in_reg_name(ir_node *irn, int pos); -void mips_gen_routine(FILE *F, ir_graph *irg, const mips_code_gen_t *cg); void mips_register_emitters(void); ir_node *mips_get_jump_block(const ir_node* node, int projn); @@ -32,4 +62,6 @@ const char* mips_get_block_label(const ir_node* block); /** returns the label for the jumptable */ const char* mips_get_jumptbl_label(const ir_node* switchjmp); -#endif /* _mips_EMITTER_H_ */ +void mips_gen_routine(mips_code_gen_t *cg, ir_graph *irg); + +#endif