From 4d4c7d79d0847a004b4fed4dcfd8fd98fd164163 Mon Sep 17 00:00:00 2001 From: Korey Sewell Date: Sun, 19 Jun 2011 21:43:38 -0400 Subject: inorder: redefine DynInst FP result type Sharing the FP value w/the integer values was giving inconsistent results esp. when their is a 32-bit integer register matched w/a 64-bit float value --- src/cpu/inorder/resources/execution_unit.cc | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'src/cpu/inorder/resources/execution_unit.cc') diff --git a/src/cpu/inorder/resources/execution_unit.cc b/src/cpu/inorder/resources/execution_unit.cc index 77ab21b21..460ec32fe 100644 --- a/src/cpu/inorder/resources/execution_unit.cc +++ b/src/cpu/inorder/resources/execution_unit.cc @@ -142,6 +142,9 @@ ExecutionUnit::execute(int slot_num) // Evaluate Branch fault = inst->execute(); + + // Should unconditional control , pc relative count as an + // execution??? Probably not. executions++; if (fault == NoFault) { @@ -204,11 +207,19 @@ ExecutionUnit::execute(int slot_num) if (fault == NoFault) { inst->setExecuted(); - DPRINTF(InOrderExecute, "[tid:%i]: [sn:%i]: The result " - "of execution is 0x%x.\n", inst->readTid(), - seq_num, - (inst->resultType(0) == InOrderDynInst::Float) ? - inst->readFloatResult(0) : inst->readIntResult(0)); +#if TRACING_ON + for (int didx = 0; didx < inst->numDestRegs(); didx++) + if (inst->resultType(didx) == InOrderDynInst::Float || + 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)); + else + DPRINTF(InOrderExecute, "[tid:%i]: [sn:%i]: Dest result %i " + "of Int execution is 0x%x.\n", inst->readTid(), + seq_num, didx, inst->readIntResult(didx)); +#endif #if !FULL_SYSTEM // The Syscall might change the PC, so conservatively -- cgit v1.2.3