summaryrefslogtreecommitdiff
path: root/src/cpu/base_dyn_inst_impl.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-05-09 20:50:46 -0700
committerGabe Black <gblack@eecs.umich.edu>2007-05-09 20:50:46 -0700
commit4ad1b58fdd7cc9ba9704ae966a41c99fd0f1dbc9 (patch)
tree2c68db7cd94a457fff83fe8d4bd7c63a6de023c0 /src/cpu/base_dyn_inst_impl.hh
parent939cbd8201a4b0dfad6a56b5d9fb68cc2b23ae73 (diff)
parentc2ac0fd89b9928f653e1485b2432cd71b455d7c5 (diff)
downloadgem5-4ad1b58fdd7cc9ba9704ae966a41c99fd0f1dbc9.tar.xz
Merge zizzer.eecs.umich.edu:/bk/newmem
into doughnut.mwconnections.com:/home/gblack/newmem-o3-micro --HG-- extra : convert_revision : 545b9e98eb1895f4b9e782224fb6615c71ed6323
Diffstat (limited to 'src/cpu/base_dyn_inst_impl.hh')
-rw-r--r--src/cpu/base_dyn_inst_impl.hh55
1 files changed, 51 insertions, 4 deletions
diff --git a/src/cpu/base_dyn_inst_impl.hh b/src/cpu/base_dyn_inst_impl.hh
index a1c866336..acf8af9cf 100644
--- a/src/cpu/base_dyn_inst_impl.hh
+++ b/src/cpu/base_dyn_inst_impl.hh
@@ -62,19 +62,66 @@ my_hash_t thishash;
#endif
template <class Impl>
-BaseDynInst<Impl>::BaseDynInst(TheISA::ExtMachInst machInst,
+BaseDynInst<Impl>::BaseDynInst(StaticInstPtr _staticInst,
Addr inst_PC, Addr inst_NPC,
+ Addr inst_MicroPC,
Addr pred_PC, Addr pred_NPC,
+ Addr pred_MicroPC,
InstSeqNum seq_num, ImplCPU *cpu)
- : staticInst(machInst), traceData(NULL), cpu(cpu)
+ : staticInst(_staticInst), traceData(NULL), cpu(cpu)
{
seqNum = seq_num;
+ bool nextIsMicro =
+ staticInst->isMicroOp() && !staticInst->isLastMicroOp();
+
PC = inst_PC;
- nextPC = inst_NPC;
- nextNPC = nextPC + sizeof(TheISA::MachInst);
+ microPC = inst_MicroPC;
+ if (nextIsMicro) {
+ nextPC = inst_PC;
+ nextNPC = inst_NPC;
+ nextMicroPC = microPC + 1;
+ } else {
+ nextPC = inst_NPC;
+ nextNPC = nextPC + sizeof(TheISA::MachInst);
+ nextMicroPC = 0;
+ }
+ predPC = pred_PC;
+ predNPC = pred_NPC;
+ predMicroPC = pred_MicroPC;
+ predTaken = false;
+
+ initVars();
+}
+
+template <class Impl>
+BaseDynInst<Impl>::BaseDynInst(TheISA::ExtMachInst inst,
+ Addr inst_PC, Addr inst_NPC,
+ Addr inst_MicroPC,
+ Addr pred_PC, Addr pred_NPC,
+ Addr pred_MicroPC,
+ InstSeqNum seq_num, ImplCPU *cpu)
+ : staticInst(inst), traceData(NULL), cpu(cpu)
+{
+ seqNum = seq_num;
+
+ bool nextIsMicro =
+ staticInst->isMicroOp() && !staticInst->isLastMicroOp();
+
+ PC = inst_PC;
+ microPC = inst_MicroPC;
+ if (nextIsMicro) {
+ nextPC = inst_PC;
+ nextNPC = inst_NPC;
+ nextMicroPC = microPC + 1;
+ } else {
+ nextPC = inst_NPC;
+ nextNPC = nextPC + sizeof(TheISA::MachInst);
+ nextMicroPC = 0;
+ }
predPC = pred_PC;
predNPC = pred_NPC;
+ predMicroPC = pred_MicroPC;
predTaken = false;
initVars();