mirror of
https://github.com/mattrberry/crab.git
synced 2025-01-15 03:40:56 +01:00
clear pipeline in block data transfer when writing to pc
This commit is contained in:
parent
476bb6afd4
commit
94a063adc3
1 changed files with 5 additions and 2 deletions
|
@ -15,6 +15,7 @@ module ARM
|
||||||
if bit?(list, idx)
|
if bit?(list, idx)
|
||||||
address &+= add ? 4 : -4 if pre_index
|
address &+= add ? 4 : -4 if pre_index
|
||||||
@r[idx] = @gba.bus.read_word(address)
|
@r[idx] = @gba.bus.read_word(address)
|
||||||
|
clear_pipeline if idx == 15
|
||||||
address &+= add ? 4 : -4 unless pre_index
|
address &+= add ? 4 : -4 unless pre_index
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -28,7 +29,9 @@ module ARM
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@r[rn] = address if write_back
|
if write_back
|
||||||
# todo reset pipeline if r15 is written (this needs to be done in all other instrs that write to r15 as well)
|
@r[rn] = address
|
||||||
|
clear_pipeline if rn == 15 # do this for all other instrs that write to r15
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue