Add x86 version of call to "decode"
[gem5.git] / src / cpu / base_dyn_inst_impl.hh
index d47384871f1c7e1ca694578c3f7d381bcafe7132..c3d71e42842c5936d38d2a45b8c54f8405b8223a 100644 (file)
@@ -62,7 +62,8 @@ my_hash_t thishash;
 #endif
 
 template <class Impl>
-BaseDynInst<Impl>::BaseDynInst(TheISA::ExtMachInst machInst, Addr inst_PC,
+BaseDynInst<Impl>::BaseDynInst(TheISA::ExtMachInst machInst,
+                               Addr inst_PC, Addr inst_NPC,
                                Addr pred_PC, Addr pred_NPC,
                                InstSeqNum seq_num, ImplCPU *cpu)
   : staticInst(machInst), traceData(NULL), cpu(cpu)
@@ -70,7 +71,7 @@ BaseDynInst<Impl>::BaseDynInst(TheISA::ExtMachInst machInst, Addr inst_PC,
     seqNum = seq_num;
 
     PC = inst_PC;
-    nextPC = PC + sizeof(TheISA::MachInst);
+    nextPC = inst_NPC;
     nextNPC = nextPC + sizeof(TheISA::MachInst);
     predPC = pred_PC;
     predNPC = pred_NPC;