Commit 658138bcbcde308472bc6980957b6b9dbd9348f3

Authored by bellard
1 parent 1190935d

flush insn support


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@743 c046a42c-6fe2-441c-8c8c-71466251a162
target-sparc/exec.h
... ... @@ -13,4 +13,5 @@ register uint32_t T2 asm(AREG3);
13 13 void cpu_lock(void);
14 14 void cpu_unlock(void);
15 15 void cpu_loop_exit(void);
  16 +void helper_flush(target_ulong addr);
16 17 #endif
... ...
target-sparc/op.c
... ... @@ -683,3 +683,7 @@ void OPPROTO op_generic_branch(void)
683 683 FORCE_RET();
684 684 }
685 685  
  686 +void OPPROTO op_flush_T0(void)
  687 +{
  688 + helper_flush(T0);
  689 +}
... ...
target-sparc/translate.c
... ... @@ -650,7 +650,8 @@ static void disas_sparc_insn(DisasContext * dc)
650 650 }
651 651 goto jmp_insn;
652 652 case 0x3b: /* flush */
653   - /* nothing to do */
  653 + gen_op_add_T1_T0();
  654 + gen_op_flush_T0();
654 655 break;
655 656 case 0x3c: /* save */
656 657 save_state(dc);
... ... @@ -878,3 +879,9 @@ target_ulong cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
878 879 {
879 880 return addr;
880 881 }
  882 +
  883 +void helper_flush(target_ulong addr)
  884 +{
  885 + addr &= ~7;
  886 + tb_invalidate_page_range(addr, addr + 8);
  887 +}
... ...