mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-23 21:39:10 -04:00
Register numbers are decimal. Don't spawn more threads than there are lanes.
This commit is contained in:
parent
d7352c02d1
commit
cfbbc665fd
1 changed files with 9 additions and 4 deletions
|
@ -85,17 +85,17 @@ Instruction::InstTableEntry Instruction::instTable[] = {
|
|||
|
||||
ostream &Harp::operator<<(ostream& os, Instruction &inst) {
|
||||
if (inst.predicated) {
|
||||
os << "@p" << inst.pred << " ? ";
|
||||
os << "@p" << dec << inst.pred << " ? ";
|
||||
}
|
||||
|
||||
os << Instruction::instTable[inst.op].opString << ' ';
|
||||
if (inst.rdestPresent) os << "%r" << inst.rdest << ' ';
|
||||
if (inst.rdestPresent) os << "%r" << dec << inst.rdest << ' ';
|
||||
if (inst.pdestPresent) os << "@p" << inst.pdest << ' ';
|
||||
for (int i = 0; i < inst.nRsrc; i++) {
|
||||
os << "%r" << inst.rsrc[i] << ' ';
|
||||
os << "%r" << dec << inst.rsrc[i] << ' ';
|
||||
}
|
||||
for (int i = 0; i < inst.nPsrc; i++) {
|
||||
os << "@p" << inst.psrc[i] << ' ';
|
||||
os << "@p" << dec << inst.psrc[i] << ' ';
|
||||
}
|
||||
if (inst.immsrcPresent) {
|
||||
if (inst.refLiteral) os << inst.refLiteral->name;
|
||||
|
@ -288,4 +288,9 @@ void Instruction::executeOn(Core &c) {
|
|||
D(3, "End instruction execute.");
|
||||
|
||||
c.activeThreads = nextActiveThreads;
|
||||
if (nextActiveThreads > c.reg.size()) {
|
||||
cerr << "Error: attempt to spawn " << nextActiveThreads << " threads. "
|
||||
<< c.reg.size() << " available.\n";
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue