-/* Mapping to store proj numbers for registers */
-
-struct ia32_reg_projnum_assoc {
- const arch_register_t *reg;
- long proj_num;
-};
-
-int ia32_cmp_reg_projnum_assoc(const void *a, const void *b, size_t len) {
- const struct ia32_reg_projnum_assoc *x = a;
- const struct ia32_reg_projnum_assoc *y = b;
-
- return !(x->reg == y->reg);
-}
-
-static struct ia32_reg_projnum_assoc *get_reg_projnum_assoc(const arch_register_t *reg, set *reg_set) {
- struct ia32_reg_projnum_assoc templ;
- unsigned int hash;
-
- templ.reg = reg;
- templ.proj_num = -1;
- hash = HASH_PTR(reg);
-
- return set_insert(reg_set, &templ, sizeof(templ), hash);
-}
-
-void ia32_set_reg_projnum(const arch_register_t *reg, long proj_num, set *reg_set) {
- struct ia32_reg_projnum_assoc *assoc = get_reg_projnum_assoc(reg, reg_set);
- assoc->proj_num = proj_num;
-}
-
-long ia32_get_reg_projnum(const arch_register_t *reg, set *reg_set) {
- struct ia32_reg_projnum_assoc *assoc = get_reg_projnum_assoc(reg, reg_set);
- return assoc->proj_num;
-}
-
-
-
/**
* Check all parameters and determine the maximum number of parameters
* to pass in gp regs resp. in fp regs.
* @param cc The calling convention
* @return The register
*/
-const arch_register_t *ia32_get_RegParam_req(int n, ir_mode **modes, long nr, unsigned cc) {
+const arch_register_t *ia32_get_RegParam_reg(int n, ir_mode **modes, long nr, unsigned cc) {
const arch_register_t **current_gpreg_param_reg;
const arch_register_t **current_fpreg_param_reg;
const arch_register_t *param_reg = NULL;
* requirements dependend on the predecessor.
*/
long ia32_translate_proj_pos(const ir_node *proj) {
- ir_node *first;
ir_node *pred = get_Proj_pred(proj);
long nr = get_Proj_proj(proj);
else
assert(0 && "there should be no more Projs for a fDiv");
}
- else if (is_ia32_Call(pred)) {
- return 0;
- }
else if (get_irn_mode(proj) == mode_X && nr == pn_Start_X_initial_exec) {
return 0;
}
else if (is_Proj(pred)) {
- first = get_Proj_pred(pred);
-
- if (is_ia32_Call(first))
- return 0;
-
- assert(0 && "unsupported proj-pos translation Proj(Proj)");
- return -1;
+ return nr;
}
else if (get_irn_opcode(pred) == iro_Start) {
return nr;