patch check_cond abstraction, now works properly with thumb and arm

This commit is contained in:
Matthew Berry 2020-09-28 00:13:47 -07:00
parent 116058472c
commit 3ad9f6d8df
2 changed files with 2 additions and 2 deletions

View file

@ -5,7 +5,7 @@
module ARM
def arm_execute(instr : Word) : Nil
if check_cond instr
if check_cond bits(instr, 28..31)
hash = hash_instr instr
lut[hash].call instr
else

View file

@ -62,7 +62,7 @@ class CPU
end
def check_cond(cond : Word) : Bool
case bits cond, 28..31
case cond
when 0x0 then @cpsr.zero
when 0x1 then !@cpsr.zero
when 0x2 then @cpsr.carry