Commit 2ca226ab authored by Matthias Braun's avatar Matthias Braun
Browse files

mask out extra precision bits in tarval_shr_unsigned

This should fix C/bitfield4.c on leon.
parent ed6ddee2
......@@ -1268,7 +1268,10 @@ ir_tarval *tarval_shr_unsigned(ir_tarval *a, unsigned b)
sc_word *temp = ALLOCAN(sc_word, sc_value_length);
sc_shrI(a->value, (long)b, temp);
/* workaround for unnecessary internal higher precision */
memcpy(temp, a->value, sc_value_length);
sc_zero_extend(temp, get_mode_size_bits(a->mode));
sc_shrI(temp, (long)b, temp);
return get_tarval(temp, sc_value_length, mode);
Supports Markdown
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