Fix ROR with amount > 32

Former-commit-id: 8f88de3c55c0e452266c40944ff920175b83627e
This commit is contained in:
Michel Heily 2019-07-08 21:03:47 +03:00
parent 9421281381
commit 1bacb927af

View file

@ -176,9 +176,9 @@ impl Core {
val val
} }
_ => { _ => {
let result = val.rotate_right(amount); let amount = amount % 32;
self.cpsr.set_C((result >> 1) & 1 == 1); self.cpsr.set_C(((val as u32) >> (amount - 1)) & 1 == 1);
result val.rotate_right(amount)
} }
} }
} }