X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2FTEMPLATE%2FTEMPLATE_emitter.h;h=e5cdef154aa48a82da0b34d6492fd6dbd439136f;hb=fef8dc3eff6468d7d65485af8e1ac9884c504e1a;hp=4ec10678d53125115f21b4280d9f6206f9a1d614;hpb=4d5c3365a58cba59993045a9e08e686d8ae079a7;p=libfirm diff --git a/ir/be/TEMPLATE/TEMPLATE_emitter.h b/ir/be/TEMPLATE/TEMPLATE_emitter.h index 4ec10678d..e5cdef154 100644 --- a/ir/be/TEMPLATE/TEMPLATE_emitter.h +++ b/ir/be/TEMPLATE/TEMPLATE_emitter.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -17,33 +17,39 @@ * PURPOSE. */ -#ifndef _TEMPLATE_EMITTER_H_ -#define _TEMPLATE_EMITTER_H_ +/** + * @file + * @brief declarations for emit functions + */ +#ifndef FIRM_BE_TEMPLATE_TEMPLATE_EMITTER_H +#define FIRM_BE_TEMPLATE_TEMPLATE_EMITTER_H -#include "irargs_t.h" // this also inlucdes +#include "irargs_t.h" #include "irnode.h" #include "debug.h" -#include "../bearch_t.h" -#include "../beemitter.h" +#include "bearch.h" +#include "beemitter.h" #include "bearch_TEMPLATE_t.h" -typedef struct _TEMPLATE_emit_env_t { - be_emit_env_t *emit; - const arch_env_t *arch_env; - const TEMPLATE_code_gen_t *cg; - TEMPLATE_isa_t *isa; - DEBUG_ONLY(firm_dbg_module_t *mod;) -} TEMPLATE_emit_env_t; - -void TEMPLATE_emit_source_register(TEMPLATE_emit_env_t *env, const ir_node *node, int pos); -void TEMPLATE_emit_dest_register(TEMPLATE_emit_env_t *env, const ir_node *node, int pos); -void TEMPLATE_emit_immediate(TEMPLATE_emit_env_t *env, const ir_node *node); - -int get_TEMPLATE_reg_nr(ir_node *irn, int posi, int in_out); -const char *get_TEMPLATE_in_reg_name(ir_node *irn, int pos); +/** + * emit assembler instructions with format string. Automatically indents + * instructions and adds debug comments at the end (in verbose-asm mode). + * Format specifiers: + * + * fmt parameter output + * ---- ---------------------- --------------------------------------------- + * %% % + * %r const arch_register_t* register + * %Sx source register x + * %Dx destination register x + * %O shifter operand + * %I immediate + * %L target label + */ +void TEMPLATE_emitf(const ir_node *node, const char *format, ...); -void TEMPLATE_gen_routine(const TEMPLATE_code_gen_t *cg, ir_graph *irg); +void TEMPLATE_emit_routine(ir_graph *irg); -#endif /* _TEMPLATE_EMITTER_H_ */ +#endif