Compare commits
6 Commits
0016e28205
...
704c029fd3
Author | SHA1 | Date | |
---|---|---|---|
704c029fd3 | |||
424142d01c | |||
8a3ac9befd | |||
f97f2e028c | |||
9e69765135 | |||
c0e583d20d |
@ -11,9 +11,7 @@ pub fn singleDataTransfer(comptime I: bool, comptime P: bool, comptime U: bool,
|
||||
const rn = opcode >> 16 & 0xF;
|
||||
const rd = opcode >> 12 & 0xF;
|
||||
|
||||
// rn is r15 and L is not set, the PC is 12 ahead
|
||||
const base = cpu.r[rn] + if (!L and rn == 0xF) 4 else @as(u32, 0);
|
||||
|
||||
const base = cpu.r[rn];
|
||||
const offset = if (I) shifter.immediate(false, cpu, opcode) else opcode & 0xFFF;
|
||||
|
||||
const modified_base = if (U) base +% offset else base -% offset;
|
||||
|
Loading…
x
Reference in New Issue
Block a user