Commit 94d8ca16 authored by Andreas Zwinkau's avatar Andreas Zwinkau
Browse files

Fix some types

Fixes issue 64, because casting long to int does work on 64bit.
parent cef4733a
......@@ -1875,7 +1875,7 @@ static int check_block_cfg(const ir_node *block, check_cfg_env_t *env)
if (pn == pn_Cond_false)
ir_nodeset_insert(&env->false_projs, branch);
} else {
int default_pn = get_Cond_default_proj(branch);
long default_pn = get_Cond_default_proj(branch);
if (pn == default_pn)
ir_nodeset_insert(&env->true_projs, branch);
}
......
......@@ -207,7 +207,7 @@ static void create_out_of_bounds_check(cond_env_t *env, ir_node *cond)
ir_node *block = get_nodes_block(cond);
ir_mode *cmp_mode = get_irn_mode(sel);
ir_node **default_preds = NEW_ARR_F(ir_node*, 0);
unsigned long default_pn = get_Cond_default_proj(cond);
long default_pn = get_Cond_default_proj(cond);
long delta = 0;
ir_node *max_const;
ir_node *proj_true;
......@@ -252,11 +252,11 @@ static void create_out_of_bounds_check(cond_env_t *env, ir_node *cond)
/* adapt projs */
foreach_out_irn(cond, i, proj) {
unsigned long pn = get_Proj_proj(proj);
unsigned long new_pn = pn - delta;
long pn = get_Proj_proj(proj);
long new_pn = pn - delta;
if (pn == default_pn) {
/* we might have to choose a new default_pn */
if (pn < (unsigned long) env->switch_max) {
if (pn < env->switch_max) {
new_pn = env->switch_max + 1;
set_Cond_default_proj(cond, new_pn);
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment