summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/resources/execution_unit.cc
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2011-06-19 21:43:41 -0400
committerKorey Sewell <ksewell@umich.edu>2011-06-19 21:43:41 -0400
commit716e447da8424386f2c3448c17891927aeb49f67 (patch)
tree7cd5ba23161faa0a5337b5a7add3f75569bbfd76 /src/cpu/inorder/resources/execution_unit.cc
parent83a0fd24f72ed46e71c015c23b723c04d39ca93c (diff)
downloadgem5-716e447da8424386f2c3448c17891927aeb49f67.tar.xz
inorder: handle serializing instructions
including IPR accesses and store-conditionals. These class of instructions will not execute correctly in a superscalar machine
Diffstat (limited to 'src/cpu/inorder/resources/execution_unit.cc')
-rw-r--r--src/cpu/inorder/resources/execution_unit.cc20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/cpu/inorder/resources/execution_unit.cc b/src/cpu/inorder/resources/execution_unit.cc
index c1945488c..255756956 100644
--- a/src/cpu/inorder/resources/execution_unit.cc
+++ b/src/cpu/inorder/resources/execution_unit.cc
@@ -45,7 +45,7 @@ ExecutionUnit::ExecutionUnit(string res_name, int res_id, int res_width,
int res_latency, InOrderCPU *_cpu,
ThePipeline::Params *params)
: Resource(res_name, res_id, res_width, res_latency, _cpu),
- lastExecuteTick(0), lastControlTick(0), serializeTick(0)
+ lastExecuteTick(0), lastControlTick(0)
{ }
void
@@ -103,13 +103,6 @@ ExecutionUnit::execute(int slot_num)
#if TRACING_ON
InstSeqNum seq_num = inst->seqNum;
#endif
- if (cur_tick == serializeTick) {
- DPRINTF(InOrderExecute, "Can not execute [tid:%i][sn:%i][PC:%s] %s. "
- "All instructions are being serialized this cycle\n",
- inst->readTid(), seq_num, inst->pcState(), inst->instName());
- exec_req->done(false);
- return;
- }
switch (exec_req->cmd)
{
@@ -131,15 +124,9 @@ ExecutionUnit::execute(int slot_num)
lastExecuteTick = cur_tick;
}
+ //@todo: handle address generation here
assert(!inst->isMemRef());
- if (inst->isSerializeAfter()) {
- serializeTick = cur_tick;
- DPRINTF(InOrderExecute, "Serializing execution after [tid:%i] "
- "[sn:%i] [PC:%s] %s.\n", inst->readTid(), seq_num,
- inst->pcState(), inst->instName());
- }
-
if (inst->isControl()) {
if (lastControlTick == cur_tick) {
DPRINTF(InOrderExecute, "Can not Execute More than One Control "
@@ -219,11 +206,12 @@ ExecutionUnit::execute(int slot_num)
#if TRACING_ON
for (int didx = 0; didx < inst->numDestRegs(); didx++)
if (inst->resultType(didx) == InOrderDynInst::Float ||
+ inst->resultType(didx) == InOrderDynInst::FloatBits ||
inst->resultType(didx) == InOrderDynInst::Double)
DPRINTF(InOrderExecute, "[tid:%i]: [sn:%i]: Dest result %i "
"of FP execution is %08f (%x).\n", inst->readTid(),
seq_num, didx, inst->readFloatResult(didx),
- inst->readIntResult(didx));
+ inst->readFloatBitsResult(didx));
else
DPRINTF(InOrderExecute, "[tid:%i]: [sn:%i]: Dest result %i "
"of Int execution is 0x%x.\n", inst->readTid(),