fix: flush pipeline on specific LDR/STR regsiter writes
This commit is contained in:
parent
348df3dbe4
commit
27957e1549
|
@ -45,8 +45,16 @@ pub fn singleDataTransfer(comptime I: bool, comptime P: bool, comptime U: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
address = modified_base;
|
address = modified_base;
|
||||||
if (W and P or !P) cpu.r[rn] = address;
|
if (W and P or !P) {
|
||||||
if (L) cpu.r[rd] = result; // This emulates the LDR rd == rn behaviour
|
cpu.r[rn] = address;
|
||||||
|
if (rn == 0xF) cpu.pipe.flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (L) {
|
||||||
|
// This emulates the LDR rd == rn behaviour
|
||||||
|
cpu.r[rd] = result;
|
||||||
|
if (rd == 0xF) cpu.pipe.flush();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}.inner;
|
}.inner;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue