X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbearch.h;h=9a093d66aa8cf8a0acbc244179969b265f1d225b;hb=9e45062f03f139df6068019c3f4733d809cf9e2c;hp=97424296fb558f8edb8f1f1be2e83d5026760d81;hpb=b01012584fe92c9f1b840fbe10dfd2a97df141cf;p=libfirm diff --git a/ir/be/bearch.h b/ir/be/bearch.h index 97424296f..9a093d66a 100644 --- a/ir/be/bearch.h +++ b/ir/be/bearch.h @@ -19,7 +19,7 @@ struct _be_node_factory_t; typedef enum _arch_register_type_t { - arch_register_type_none = 0, + arch_register_type_none = 0, arch_register_type_caller_save = 1, /**< The register must be saved by the caller upon a function call. It thus can be overwritten in the called function. */ @@ -346,7 +346,7 @@ extern int arch_reg_is_allocatable(const arch_env_t *env, * Get the register class of an operand of a node. * @param env The architecture environment. * @param irn The node. - * @param pos The position of the operand. + * @param pos The position of the operand, -1 for the output. * @return The register class of the operand or NULL, if * operand is a non-register operand. */ @@ -417,11 +417,10 @@ struct _arch_irn_handler_t { struct _arch_code_generator_if_t { /** * Initialize the code generator. - * @param file The file to dump to. * @param birg A backend IRG session. * @return A newly created code generator. */ - void *(*init)(FILE *file, const be_irg_t *birg); + void *(*init)(const be_irg_t *birg); /** * Called before abi introduce. @@ -498,14 +497,12 @@ struct _arch_isa_t { */ struct _arch_isa_if_t { -#ifdef WITH_LIBCORE - void (*register_options)(lc_opt_entry_t *grp); -#endif - /** * Initialize the isa interface. + * @param file_handle the file handle to write the output to + * @return a new isa instance */ - void *(*init)(void); + void *(*init)(FILE *file_handle); /** * Free the isa instance. @@ -570,6 +567,14 @@ struct _arch_isa_if_t { * @return The alignment in bytes. */ int (*get_reg_class_alignment)(const void *self, const arch_register_class_t *cls); + +#ifdef WITH_LIBCORE + /** + * Register command line options for this backend. + * @param grp The root group. + */ + void (*register_options)(lc_opt_entry_t *grp); +#endif }; #define arch_isa_get_n_reg_class(isa) ((isa)->impl->get_n_reg_class(isa)) @@ -606,10 +611,11 @@ struct _arch_env_t { /** * Initialize the architecture environment struct. - * @param isa The isa which shall be put into the environment. + * @param isa The isa which shall be put into the environment. + * @param file_handle The file handle * @return The environment. */ -extern arch_env_t *arch_env_init(arch_env_t *env, const arch_isa_if_t *isa); +extern arch_env_t *arch_env_init(arch_env_t *env, const arch_isa_if_t *isa, FILE *file_handle); /** * Add a node handler to the environment.