mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-24 05:47:35 -04:00
Hacked a fix for indirect-load-on-page-fault bug.
This commit is contained in:
parent
a9dfe00b48
commit
3804d09803
1 changed files with 12 additions and 0 deletions
|
@ -138,6 +138,18 @@ void Instruction::executeOn(Warp &c) {
|
|||
Size wordSz = c.core->a.getWordSize();
|
||||
Word nextPc = c.pc;
|
||||
|
||||
// If we have a load, overwriting a register's contents, we have to make sure
|
||||
// ahead of time it will not fault. Otherwise we may perform an indirect load
|
||||
// by mistake.
|
||||
if (op == LD && rdest == rsrc[0]) {
|
||||
for (Size t = 0; t < c.activeThreads; t++) {
|
||||
if ((!predicated || c.pred[t][pred]) && c.tmask[t]) {
|
||||
Word memAddr = c.reg[t][rsrc[0]] + immsrc;
|
||||
c.core->mem.read(memAddr, c.supervisorMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool sjOnce(true), // Has not yet split or joined once.
|
||||
pcSet(false); // PC has already been set
|
||||
for (Size t = 0; t < c.activeThreads; t++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue