mirror of
https://github.com/mattrberry/crab.git
synced 2025-01-29 20:35:13 +01:00
patch check_cond abstraction, now works properly with thumb and arm
This commit is contained in:
parent
116058472c
commit
3ad9f6d8df
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue