X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbearch.h;h=6a688660e257772a6755459e283650e6698ced2a;hb=fc9bc377a4efe064fe1998121e52ba97ce4da415;hp=55524452900698ccd2d341e3f43d8ddb88f56b47;hpb=ce6161a7e42a48f7422b7babcc64d8ace18e2687;p=libfirm diff --git a/ir/be/bearch.h b/ir/be/bearch.h index 555244529..6a688660e 100644 --- a/ir/be/bearch.h +++ b/ir/be/bearch.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2011 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -40,6 +40,13 @@ #include "beirg.h" #include "error.h" +/** + * this constant is returned by the get_sp_bias functions if the stack + * is reset (usually because the frame pointer is copied to the stack + * pointer + */ +#define SP_BIAS_RESET INT_MIN + typedef enum arch_register_class_flags_t { arch_register_class_flag_none = 0, /** don't do automatic register allocation for this class */ @@ -235,12 +242,13 @@ void be_register_isa_if(const char *name, const arch_isa_if_t *isa); * A register. */ struct arch_register_t { - const char *name; /**< The name of the register. */ - const arch_register_class_t *reg_class; /**< The class of the register */ - unsigned short index; /**< The index of the register in - the class. */ - unsigned short global_index; - arch_register_type_t type; /**< The type of the register. */ + const char *name; /**< The name of the register. */ + const arch_register_class_t *reg_class; /**< The class of the register */ + unsigned short index; /**< The index of the register in + the class. */ + unsigned short global_index; /** The global index this register + in the architecture. */ + arch_register_type_t type; /**< The type of the register. */ /** register constraint allowing just this register */ const arch_register_req_t *single_req; }; @@ -261,15 +269,6 @@ static inline const char *arch_register_get_name(const arch_register_t *reg) return reg->name; } -/** - * 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) != 0) - /** * A class of registers. * Like general purpose or floating point. @@ -466,6 +465,12 @@ struct arch_isa_if_t { */ arch_env_t *(*init)(FILE *file_handle); + /** + * lowers current program for target. See the documentation for + * be_lower_for_target() for details. + */ + void (*lower_for_target)(void); + /** * Free the isa instance. */ @@ -613,8 +618,6 @@ struct arch_env_t { const arch_register_t *bp; /**< The base pointer register. */ const arch_register_class_t *link_class; /**< The static link pointer register class. */ - int stack_dir; /**< -1 for decreasing, 1 for - increasing. */ int stack_alignment; /**< power of 2 stack alignment */ const be_main_env_t *main_env; /**< the be main environment */ int spill_cost; /**< cost for a be_Spill node */ @@ -630,7 +633,7 @@ static inline unsigned arch_irn_get_n_outs(const ir_node *node) if (info->out_infos == NULL) return 0; - return ARR_LEN(info->out_infos); + return (unsigned)ARR_LEN(info->out_infos); } static inline const arch_irn_ops_t *get_irn_ops_simple(const ir_node *node)