    }
  };
  // <TAG-CLASS-INSTRUCTION-END>
-@@ -2917,7 +2927,12 @@
+@@ -2931,7 +2941,12 @@
  #if BX_SUPPORT_X86_64
    BX_SMF unsigned fetchDecode64(Bit8u *, bxInstruction_c *, unsigned);
  #endif
-+#if BX_SUPPORT_ICACHE
++#if BX_SUPPORT_TRACE_CACHE
 +  BX_SMF bxICacheEntry_c* fetchInstructionTrace(bxInstruction_c *, bx_address);
 +  BX_SMF bx_bool mergeTraces(bxICacheEntry_c *trace, bxInstruction_c *i, bx_phy_address pAddr);
 +#else

+
+  InstrICache_Increment(iCacheMisses);
+
   bx_address remainingInPage = (BX_CPU_THIS_PTR eipPageWindowSize - eipBiased);
   unsigned maxFetch = 15;
   if (remainingInPage < 15) maxFetch = remainingInPage;
   Bit8u *fetchPtr = BX_CPU_THIS_PTR eipFetchPtr + eipBiased;
+  unsigned ret;
 
-#if BX_SUPPORT_ICACHE
-  // The entry will be marked valid if fetchdecode will succeed
-  cache_entry->writeStamp = ICacheWriteStampInvalid;
-  InstrICache_Increment(iCacheMisses);
+  // We could include in trace maximum BX_MAX_TRACE_LEN instructions
+  unsigned max_length = BX_MAX_TRACE_LENGTH;
+  if ((pageWriteStamp & ICacheWriteStampMask) != ICacheWriteStampStart)

+
+#else
+
+bxInstruction_c* BX_CPU_C::fetchInstruction(bxInstruction_c *iStorage, bx_address eipBiased)
 {
   unsigned ret;
   bxInstruction_c *i = iStorage;
@@ -162,6 +277,8 @@
   return i;
 }
 
