From e396a34b0155d5054a099c67a91baa66c095d3d8 Mon Sep 17 00:00:00 2001 From: Korey Sewell Date: Fri, 4 Feb 2011 00:09:20 -0500 Subject: inorder: fault handling Maintain all information about an instruction's fault in the DynInst object rather than any cpu-request object. Also, if there is a fault during the execution stage then just save the fault inside the instruction and trap once the instruction tries to graduate --- src/cpu/inorder/resources/agen_unit.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/cpu/inorder/resources/agen_unit.cc') diff --git a/src/cpu/inorder/resources/agen_unit.cc b/src/cpu/inorder/resources/agen_unit.cc index 2de586c82..f1862b94a 100644 --- a/src/cpu/inorder/resources/agen_unit.cc +++ b/src/cpu/inorder/resources/agen_unit.cc @@ -52,14 +52,11 @@ AGENUnit::execute(int slot_num) { ResourceRequest* agen_req = reqMap[slot_num]; DynInstPtr inst = reqMap[slot_num]->inst; - Fault fault = reqMap[slot_num]->fault; #if TRACING_ON ThreadID tid = inst->readTid(); #endif int seq_num = inst->seqNum; - agen_req->fault = NoFault; - switch (agen_req->cmd) { case GenerateAddr: @@ -70,18 +67,18 @@ AGENUnit::execute(int slot_num) "[tid:%i] Generating Address for [sn:%i] (%s).\n", tid, seq_num, inst->staticInst->getName()); - fault = inst->calcEA(); + inst->fault = inst->calcEA(); inst->setMemAddr(inst->getEA()); DPRINTF(InOrderAGEN, "[tid:%i] [sn:%i] Effective address calculated as: %#x\n", tid, seq_num, inst->getEA()); - if (fault == NoFault) { + if (inst->fault == NoFault) { agen_req->done(); } else { fatal("%s encountered while calculating address [sn:%i]", - fault->name(), seq_num); + inst->fault->name(), seq_num); } agens++; -- cgit v1.2.3