Commit 651967a8 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Fix fehler157: Lowering Shrs was missing a Conv.

[r22469]
parent 25b7dac0
...@@ -999,24 +999,25 @@ static void lower_Shrs(ir_node *node, ir_mode *mode, lower_env_t *env) { ...@@ -999,24 +999,25 @@ static void lower_Shrs(ir_node *node, ir_mode *mode, lower_env_t *env) {
if (tarval_is_long(tv) && if (tarval_is_long(tv) &&
get_tarval_long(tv) >= (long)get_mode_size_bits(mode)) { get_tarval_long(tv) >= (long)get_mode_size_bits(mode)) {
ir_node *block = get_nodes_block(node); ir_node *block = get_nodes_block(node);
ir_node *left = get_Shrs_left(node); ir_node *left = get_Shrs_left(node);
long shf_cnt = get_tarval_long(tv) - get_mode_size_bits(mode); long shf_cnt = get_tarval_long(tv) - get_mode_size_bits(mode);
int idx = get_irn_idx(left);
ir_node *low;
ir_node *c; ir_node *c;
int idx = get_irn_idx(left);
left = env->entries[idx]->high_word; left = env->entries[idx]->high_word;
idx = get_irn_idx(node); idx = get_irn_idx(node);
if (shf_cnt > 0) { if (shf_cnt > 0) {
ir_node *tmp; c = new_r_Const_long(irg, block, mode_Iu, shf_cnt);
c = new_r_Const_long(irg, block, mode_Iu, shf_cnt); low = new_r_Shrs(irg, block, left, c, mode);
tmp = new_r_Shrs(irg, block, left, c, mode);
/* low word is expected to have mode_Iu */
env->entries[idx]->low_word = new_r_Conv(irg, block, tmp, mode_Iu);
} else { } else {
env->entries[idx]->low_word = left; low = left;
} /* if */ } /* if */
/* low word is expected to have mode_Iu */
env->entries[idx]->low_word = new_r_Conv(irg, block, low, mode_Iu);
c = new_r_Const_long(irg, block, mode_Iu, get_mode_size_bits(mode) - 1); c = new_r_Const_long(irg, block, mode_Iu, get_mode_size_bits(mode) - 1);
env->entries[idx]->high_word = new_r_Shrs(irg, block, left, c, mode); env->entries[idx]->high_word = new_r_Shrs(irg, block, left, c, mode);
......
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