 +      // decoding instruction compeleted -> continue with execution
 +      BX_INSTR_BEFORE_EXECUTION(BX_CPU_ID, i);
 +      RIP += i->ilen();
-+      BX_CPU_CALL_METHOD(execute, (i)); // might iterate repeat instruction
++      BX_CPU_CALL_METHOD(i->execute, (i)); // might iterate repeat instruction
 +      BX_CPU_THIS_PTR prev_eip = RIP; // commit new RIP
 +      BX_CPU_THIS_PTR prev_esp = RSP; // commit new RSP
 +      BX_INSTR_AFTER_EXECUTION(BX_CPU_ID, i);

   }  // while (1)
 }
 
diff -ur bochs-reference/cpu/cpu.h bochs/cpu/cpu.h
--- bochs-reference/cpu/cpu.h	2007-10-14 21:04:49.000000000 +0200
+++ bochs/cpu/cpu.h	2007-10-16 21:39:28.640625000 +0200
@@ -627,7 +627,7 @@
   //  6...6  os64
   //  5...5  as32
   //  4...4  os32
-  //  3...3  (unused)
+  //  3...3  stop trace (using with trace cache)
   //  2...0  seg
   Bit32u metaInfo;
 
@@ -807,6 +807,15 @@
   }
 #endif
 
+#if BX_SUPPORT_ICACHE
+  BX_CPP_INLINE void setStopTraceAttr(void) {
+   metaInfo |= (1<<3);
+  }
+  BX_CPP_INLINE unsigned getStopTraceAttr(void) {
+    return metaInfo & (1<<3);
+  }
+#endif
+
   BX_CPP_INLINE unsigned repUsedL(void) {
     return metaInfo & (3<<9);
   }
@@ -2601,7 +2610,12 @@
 #if BX_SUPPORT_X86_64
   BX_SMF unsigned fetchDecode64(Bit8u *, bxInstruction_c *, unsigned);
 #endif

   instruction->setB1(b1);
   instruction->setILen(ilen);
   return(1);
Files bochs/cpu/fetchdecode64.o and bochs-trace-cache/cpu/fetchdecode64.o differ
diff -ur bochs/cpu/icache.h bochs-trace-cache/cpu/icache.h
--- bochs/cpu/icache.h	2007-11-22 19:32:00.000000000 +0200
+++ bochs-trace-cache/cpu/icache.h	2007-11-23 15:37:53.703125000 +0200
@@ -115,12 +115,15 @@
 
 #define BxICacheEntries (64 * 1024)  // Must be a power of 2.
 
+#define BX_MAX_TRACE_LENGTH 16
+
