thumb fix conditional branch crash on wrong int type

This commit is contained in:
Matthew Berry 2020-10-10 20:38:48 -07:00
parent 9b1f73e741
commit b52599ae2d

View file

@ -1,7 +1,7 @@
module THUMB
def thumb_conditional_branch(instr : Word) : Nil
cond = bits(instr, 8..11)
offset = bits(instr, 0..7).to_i8!
offset = bits(instr, 0..7).to_i8!.to_i32
if check_cond cond
@r[15] &+= (offset * 2)
clear_pipeline