flush insn support
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 25 Apr 2004 17:56:08 +0000 (17:56 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 25 Apr 2004 17:56:08 +0000 (17:56 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@743 c046a42c-6fe2-441c-8c8c-71466251a162

target-sparc/exec.h
target-sparc/op.c
target-sparc/translate.c

index 72e4588f6962a774cb46eb79473c7b4cf78f78bd..6b49ca79af11324d7fc65b78858cfd1e466e19d0 100644 (file)
@@ -13,4 +13,5 @@ register uint32_t T2 asm(AREG3);
 void cpu_lock(void);
 void cpu_unlock(void);
 void cpu_loop_exit(void);
+void helper_flush(target_ulong addr);
 #endif
index 1ce3f950945b468a3c04a446b845b35688fb3005..946c11ec4c50aa5170cedd23bb2d5cc610cb27c1 100644 (file)
@@ -683,3 +683,7 @@ void OPPROTO op_generic_branch(void)
     FORCE_RET();
 }
 
+void OPPROTO op_flush_T0(void)
+{
+    helper_flush(T0);
+}
index 41decb18ff1919d137a852121ff435d12286966a..bcc810b2088f407f2d123f4d8c4a37d8840d3991 100644 (file)
@@ -650,7 +650,8 @@ static void disas_sparc_insn(DisasContext * dc)
                         }
                         goto jmp_insn;
                     case 0x3b: /* flush */
-                        /* nothing to do */
+                        gen_op_add_T1_T0();
+                        gen_op_flush_T0();
                         break;
                     case 0x3c: /* save */
                         save_state(dc);
@@ -878,3 +879,9 @@ target_ulong cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
 {
     return addr;
 }
+
+void helper_flush(target_ulong addr)
+{
+    addr &= ~7;
+    tb_invalidate_page_range(addr, addr + 8);
+}