mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-23 13:27:29 -04:00
More side-effect-neutral way to handle PC updates.
This commit is contained in:
parent
6880e01db6
commit
3459ed22aa
1 changed files with 4 additions and 2 deletions
|
@ -285,7 +285,6 @@ void Instruction::executeOn(Warp &c) {
|
|||
nextActiveThreads = 0;
|
||||
break;
|
||||
case TRAP: c.interrupt(0);
|
||||
nextPc = c.core->interruptEntry;
|
||||
break;
|
||||
case JMPRU: c.supervisorMode = false;
|
||||
if (!pcSet) nextPc = reg[rsrc[0]];
|
||||
|
@ -392,7 +391,10 @@ void Instruction::executeOn(Warp &c) {
|
|||
D(3, "End instruction execute.");
|
||||
|
||||
c.activeThreads = nextActiveThreads;
|
||||
c.pc = nextPc;
|
||||
|
||||
// This way, if pc was set by a side effect (such as interrupt), it will
|
||||
// retain its new value.
|
||||
if (pcSet) c.pc = nextPc;
|
||||
|
||||
if (nextActiveThreads > c.reg.size()) {
|
||||
cerr << "Error: attempt to spawn " << nextActiveThreads << " threads. "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue