inorder: InstSeqNum bug
Because int and not InstSeqNum was used in a couple of places, you can overflow the int type and thus get wierd bugs when the sequence number is negative (or some wierd value)
This commit is contained in:
@@ -55,7 +55,7 @@ AGENUnit::execute(int slot_num)
|
||||
#if TRACING_ON
|
||||
ThreadID tid = inst->readTid();
|
||||
#endif
|
||||
int seq_num = inst->seqNum;
|
||||
InstSeqNum seq_num = inst->seqNum;
|
||||
|
||||
switch (agen_req->cmd)
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@ BranchPredictor::execute(int slot_num)
|
||||
ResourceRequest* bpred_req = reqs[slot_num];
|
||||
DynInstPtr inst = bpred_req->inst;
|
||||
ThreadID tid = inst->readTid();
|
||||
int seq_num = inst->seqNum;
|
||||
InstSeqNum seq_num = inst->seqNum;
|
||||
|
||||
switch (bpred_req->cmd)
|
||||
{
|
||||
|
||||
@@ -85,7 +85,7 @@ ExecutionUnit::execute(int slot_num)
|
||||
ResourceRequest* exec_req = reqs[slot_num];
|
||||
DynInstPtr inst = reqs[slot_num]->inst;
|
||||
Fault fault = NoFault;
|
||||
int seq_num = inst->seqNum;
|
||||
InstSeqNum seq_num = inst->seqNum;
|
||||
Tick cur_tick = curTick();
|
||||
|
||||
if (cur_tick == serializeTick) {
|
||||
|
||||
@@ -76,7 +76,7 @@ FetchSeqUnit::execute(int slot_num)
|
||||
DynInstPtr inst = fs_req->inst;
|
||||
ThreadID tid = inst->readTid();
|
||||
int stage_num = fs_req->getStageNum();
|
||||
int seq_num = inst->seqNum;
|
||||
InstSeqNum seq_num = inst->seqNum;
|
||||
|
||||
DPRINTF(InOrderFetchSeq, "[tid:%i]: Current PC is %s\n", tid,
|
||||
pc[tid]);
|
||||
|
||||
@@ -109,7 +109,7 @@ TLBUnit::execute(int slot_idx)
|
||||
|
||||
DynInstPtr inst = tlb_req->inst;
|
||||
ThreadID tid = inst->readTid();
|
||||
int seq_num = inst->seqNum;
|
||||
InstSeqNum seq_num = inst->seqNum;
|
||||
int stage_num = tlb_req->getStageNum();
|
||||
|
||||
tlb_req->fault = NoFault;
|
||||
|
||||
@@ -145,7 +145,7 @@ UseDefUnit::execute(int slot_idx)
|
||||
|
||||
DynInstPtr inst = ud_req->inst;
|
||||
ThreadID tid = inst->readTid();
|
||||
int seq_num = inst->seqNum;
|
||||
InstSeqNum seq_num = inst->seqNum;
|
||||
int ud_idx = ud_req->useDefIdx;
|
||||
|
||||
// If there is a non-speculative instruction
|
||||
|
||||
Reference in New Issue
Block a user