X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbearch.h;h=e20b8360e53f63169bc6e704f0bb8b2a016a07e9;hb=f3d1b40c75358f60f4224ca930f163c46659774c;hp=534a1df5db046c77ed570b12052dae36866ac95e;hpb=c675b5d864c110cca59fd91351ec318fc19188e0;p=libfirm diff --git a/ir/be/bearch.h b/ir/be/bearch.h index 534a1df5d..e20b8360e 100644 --- a/ir/be/bearch.h +++ b/ir/be/bearch.h @@ -1,7 +1,10 @@ #ifndef _FIRM_BEARCH_H #define _FIRM_BEARCH_H -#include "firm_config.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifdef WITH_LIBCORE #include @@ -21,8 +24,6 @@ typedef struct _arch_register_class_t arch_register_class_t; typedef struct _arch_register_t arch_register_t; -typedef struct _arch_enum_t arch_enum_t; -typedef struct _arch_enum_member_t arch_enum_member_t; typedef struct _arch_isa_if_t arch_isa_if_t; typedef struct _arch_isa_t arch_isa_t; typedef struct _arch_env_t arch_env_t; @@ -44,6 +45,15 @@ typedef enum _arch_register_type_t { arch_register_type_ignore /**< Do not consider this register when allocating. */ } arch_register_type_t; +/** + * Convenience macro to check for register type. + * @param req A pointer to register. + * @param kind The kind of type to check for (see arch_register_type_t). + * @return 1, If register is of given kind, 0 if not. + */ +#define arch_register_type_is(reg, kind) \ + ((reg)->type == arch_register_type_ ## kind) + /** * A register. */ @@ -175,7 +185,8 @@ typedef enum _arch_irn_class_t { arch_irn_class_reload, arch_irn_class_copy, arch_irn_class_perm, - arch_irn_class_branch + arch_irn_class_branch, + arch_irn_class_call } arch_irn_class_t; /** @@ -471,6 +482,14 @@ struct _arch_isa_if_t { * @return The list scheduler selector. */ const list_sched_selector_t *(*get_list_sched_selector)(const void *self); + + /** + * Get the proj number assigned to the register. + * @param self The isa object. + * @param reg The register + * @return The proj number assigned to this register + */ + long (*get_projnum_for_register)(const void *self, const arch_register_t *reg); }; #define arch_isa_get_n_reg_class(isa) ((isa)->impl->get_n_reg_class(isa))