Commit 6469c45c authored by Matthias Braun's avatar Matthias Braun
Browse files

arm: fix undefined behaviour

parent e65451d6
......@@ -189,7 +189,7 @@ static void arm_emit_shifter_operand(const ir_node *node)
case ARM_SHF_IMM: {
unsigned val = attr->immediate_value;
val = (val >> attr->shift_immediate)
| (val << (32-attr->shift_immediate));
| (val << ((32-attr->shift_immediate) & 31));
val &= 0xFFFFFFFF;
be_emit_irprintf("#0x%X", val);
return;
......
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