X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbearch.h;h=011b5cb620d821fb37cde30c6d240245210dd5e9;hb=9156483f3da8efe9215a519b54b162bcb75c79c2;hp=743b9061cf17dfd276b7c84e2e2ef3505e1ba5f0;hpb=7c06e1a5be02e470bdb6e8cface089d0695ccb81;p=libfirm diff --git a/ir/be/bearch.h b/ir/be/bearch.h index 743b9061c..011b5cb62 100644 --- a/ir/be/bearch.h +++ b/ir/be/bearch.h @@ -122,6 +122,8 @@ typedef enum _arch_register_req_type_t { arch_register_req_type_should_be_different = 8, /**< The register must be unequal to some other at the node. */ + arch_register_req_type_should_be_different_from_all = 16, /**< The register must be different from + all in's at the node */ } arch_register_req_type_t; /** @@ -382,16 +384,16 @@ extern arch_irn_class_t arch_irn_classify(const arch_env_t *env, const ir_node * */ extern arch_irn_flags_t arch_irn_get_flags(const arch_env_t *env, const ir_node *irn); -#define arch_irn_is_ignore(env, irn) ((arch_irn_get_flags(env, irn) & arch_irn_flags_ignore) != 0) +#define arch_irn_is(env, irn, flag) ((arch_irn_get_flags(env, irn) & arch_irn_flags_ ## flag) != 0) #define arch_irn_has_reg_class(env, irn, pos, cls) \ ((cls) == arch_get_irn_reg_class(env, irn, pos)) #define arch_irn_consider_in_reg_alloc(env, cls, irn) \ - (arch_irn_has_reg_class(env, irn, -1, cls) && !arch_irn_is_ignore(env, irn)) + (arch_irn_has_reg_class(env, irn, -1, cls) && !arch_irn_is(env, irn, ignore)) /** - * Somebody who can be asked about nodes. + * Somebody who can be asked about IR nodes. */ struct _arch_irn_handler_t { @@ -403,15 +405,12 @@ struct _arch_irn_handler_t { */ const void *(*get_irn_ops)(const arch_irn_handler_t *handler, const ir_node *irn); - }; /** - * The code generator. + * The code generator interface. */ struct _arch_code_generator_if_t { - - /** * Initialize the code generator. * @param file The file to dump to. @@ -450,9 +449,12 @@ struct _arch_code_generator_if_t { * The code generator must also be de-allocated here. */ void (*done)(void *self); - }; +/** + * helper macro: call function func from the code generator + * if it's implemented. + */ #define _arch_cg_call(cg, func) \ do { \ if((cg)->impl->func) \