X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fia32%2Fia32_map_regs.h;h=ba1681a3d7065cad2ea4150907cfc6442001920b;hb=9fcd5f662056f33a38dbd39f59dc5125718e04ed;hp=ef3034f742bb79a7ac682acc5264975e2542777f;hpb=8cb8fe7d9d69a9bd06365823d5d5f68d051f6db0;p=libfirm diff --git a/ir/be/ia32/ia32_map_regs.h b/ir/be/ia32/ia32_map_regs.h index ef3034f74..ba1681a3d 100644 --- a/ir/be/ia32/ia32_map_regs.h +++ b/ir/be/ia32/ia32_map_regs.h @@ -31,14 +31,8 @@ #include "set.h" #include "../bearch_t.h" - -/** - * Convenience macro to check if register out<\code> - * and register in<\code> are equal. - */ -#define REGS_ARE_EQUAL(out, in) \ - ((arch_register_get_class(out) == arch_register_get_class(in)) && \ - (arch_register_get_index(out) == arch_register_get_index(in))) +#include "bearch_ia32_t.h" +#include "gen_ia32_regalloc_if.h" /** * Set compare function @@ -66,33 +60,27 @@ void ia32_build_16bit_reg_map(pmap *reg_map); * name into a pmap. */ void ia32_build_8bit_reg_map(pmap *reg_map); +void ia32_build_8bit_reg_map_high(pmap *reg_map); /** * Returns the corresponding mapped name for a register. */ const char *ia32_get_mapped_reg_name(pmap *reg_map, const arch_register_t *reg); -/** - * Check all parameters and determine the maximum number of parameters - * to pass in gp regs resp. in fp regs. - * - * @param n The number of parameters - * @param modes The list of the parameter modes - * @param n_int Holds the number of int parameters to be passed in regs after the call - * @param n_float Holds the number of float parameters to be passed in regs after the call - * @return The number of the last parameter to be passed in register - */ -int ia32_get_n_regparam_class(int n, ir_mode **modes, int *n_int, int *n_float); - /** * Returns the register for parameter nr. - * - * @param n The number of parameters - * @param modes The list of the parameter modes - * @param nr The number of the parameter to return the requirements for - * @param cc The calling convention - * @return The register */ -const arch_register_t *ia32_get_RegParam_reg(int n, ir_mode **modes, long nr, unsigned cc); +const arch_register_t *ia32_get_RegParam_reg(ia32_code_gen_t *cg, unsigned cc, + size_t nr, const ir_mode *mode); + +static INLINE int is_unknown_reg(const arch_register_t *reg) +{ + if(reg == &ia32_gp_regs[REG_GP_UKNWN] + || reg == &ia32_xmm_regs[REG_XMM_UKNWN] + || reg == &ia32_vfp_regs[REG_VFP_UKNWN]) + return 1; + + return 0; +} #endif /* FIRM_BE_IA32_IA32_MAP_REGS_H */