Fix ROR with amount > 32
Former-commit-id: 8f88de3c55c0e452266c40944ff920175b83627e
This commit is contained in:
parent
9421281381
commit
1bacb927af
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue