diff -pNaur qemu/exec.c qemu-omap-clean/exec.c
--- qemu/exec.c	2006-02-08 22:43:39.000000000 +0000
+++ qemu-omap-clean/exec.c	2006-04-07 20:56:55.000000000 +0000
@@ -40,8 +40,8 @@
 //#define DEBUG_TLB
 
 /* make various TB consistency checks */
-//#define DEBUG_TB_CHECK 
-//#define DEBUG_TLB_CHECK 
+//#define DEBUG_TB_CHECK
+//#define DEBUG_TLB_CHECK
 
 /* threshold to flush the translated code buffer */
 #define CODE_GEN_BUFFER_MAX_SIZE (CODE_GEN_BUFFER_SIZE - CODE_GEN_MAX_SIZE)
@@ -319,16 +319,17 @@ void tb_flush(CPUState *env1)
 
 #ifdef DEBUG_TB_CHECK
 
+#ifndef CONFIG_SOFTMMU
 static void tb_invalidate_check(unsigned long address)
 {
     TranslationBlock *tb;
     int i;
     address &= TARGET_PAGE_MASK;
-    for(i = 0;i < CODE_GEN_HASH_SIZE; i++) {
-        for(tb = tb_hash[i]; tb != NULL; tb = tb->hash_next) {
+    for(i = 0;i < CODE_GEN_PHYS_HASH_SIZE; i++) {
+        for(tb = tb_phys_hash[i]; tb != NULL; tb = tb->phys_hash_next) {
             if (!(address + TARGET_PAGE_SIZE <= tb->pc ||
                   address >= tb->pc + tb->size)) {
-                printf("ERROR invalidate: address=%08lx PC=%08lx size=%04x\n",
+                printf("ERROR invalidate: address=%08lx PC=%08x size=%04x\n",
                        address, tb->pc, tb->size);
             }
         }
@@ -341,17 +342,18 @@ static void tb_page_check(void)
     TranslationBlock *tb;
     int i, flags1, flags2;
     
-    for(i = 0;i < CODE_GEN_HASH_SIZE; i++) {
-        for(tb = tb_hash[i]; tb != NULL; tb = tb->hash_next) {
+    for(i = 0;i < CODE_GEN_PHYS_HASH_SIZE; i++) {
+        for(tb = tb_phys_hash[i]; tb != NULL; tb = tb->phys_hash_next) {
             flags1 = page_get_flags(tb->pc);
             flags2 = page_get_flags(tb->pc + tb->size - 1);
             if ((flags1 & PAGE_WRITE) || (flags2 & PAGE_WRITE)) {
-                printf("ERROR page flags: PC=%08lx size=%04x f1=%x f2=%x\n",
+                printf("ERROR page flags: PC=%08x size=%04x f1=%x f2=%x\n",
                        tb->pc, tb->size, flags1, flags2);
             }
         }
     }
 }
+#endif
 
 void tb_jmp_check(TranslationBlock *tb)
 {
@@ -907,7 +909,7 @@ void tb_link_phys(TranslationBlock *tb, 
     if (tb->tb_next_offset[1] != 0xffff)
         tb_reset_jump(tb, 1);
 
-#ifdef DEBUG_TB_CHECK
+#if defined(DEBUG_TB_CHECK) && !defined(CONFIG_SOFTMMU)
     tb_page_check();
 #endif
 }
