thumb load address does not need set_reg

This commit is contained in:
Matthew Berry 2021-05-16 21:03:43 -07:00
parent cf804e723c
commit d5c06fef98

View file

@ -6,7 +6,7 @@ module GBA
word = bits(instr, 0..7) word = bits(instr, 0..7)
imm = word << 2 imm = word << 2
# Where the PC is used as the source register (SP = 0), bit 1 of the PC is always read as 0. # Where the PC is used as the source register (SP = 0), bit 1 of the PC is always read as 0.
set_reg(rd, (source ? @r[13] : @r[15] & ~2) &+ imm) @r[rd] = (source ? @r[13] : @r[15] & ~2) &+ imm
step_thumb step_thumb
end end