X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fsparc%2Fsparc_map_regs.c;h=10048540dcb11813e540bf1542ff9cdfcbff6b8a;hb=7cf3689476440ec8774dc310354c0948a6f5bfae;hp=e3ef0112adceb126b84608a90dd932ab7b64826e;hpb=2158510961e84fb11e9195c200335f2314e49055;p=libfirm diff --git a/ir/be/sparc/sparc_map_regs.c b/ir/be/sparc/sparc_map_regs.c index e3ef0112a..10048540d 100644 --- a/ir/be/sparc/sparc_map_regs.c +++ b/ir/be/sparc/sparc_map_regs.c @@ -33,7 +33,7 @@ #include "gen_sparc_regalloc_if.h" -static const arch_register_t *gp_param_regs[] = { +static const arch_register_t *gp_param_out_regs[] = { &sparc_gp_regs[REG_O0], &sparc_gp_regs[REG_O1], &sparc_gp_regs[REG_O2], @@ -42,9 +42,29 @@ static const arch_register_t *gp_param_regs[] = { &sparc_gp_regs[REG_O5], }; +static const arch_register_t *gp_param_in_regs[] = { + &sparc_gp_regs[REG_I0], + &sparc_gp_regs[REG_I1], + &sparc_gp_regs[REG_I2], + &sparc_gp_regs[REG_I3], + &sparc_gp_regs[REG_I4], + &sparc_gp_regs[REG_I5], +}; + +/** + * get register for outgoing parameters 1-6 + */ +const arch_register_t *sparc_get_RegParamOut_reg(int n) +{ + assert(n < 6 && n >=0 && "trying to get (out) register for param >= 6"); + return gp_param_out_regs[n]; +} -const arch_register_t *sparc_get_RegParam_reg(int n) +/** + * get register for incoming parameters 1-6 + */ +const arch_register_t *sparc_get_RegParamIn_reg(int n) { - assert(n < 6 && n >=0 && "trying to get register for param >= 6"); - return gp_param_regs[n]; + assert(n < 6 && n >=0 && "trying to get (in) register for param >= 6"); + return gp_param_in_regs[n]; }