void tlb_fill(target_ulong addr, int is_write, int is_user, void *retaddr)

{

    TranslationBlock *tb;

    int ret;

    unsigned long pc;

    CPUX86State *saved_env;



    /* XXX: hack to restore env in all cases, even if not called from

       generated code */

    saved_env = env;

    env = cpu_single_env;



    ret = cpu_x86_handle_mmu_fault(env, addr, is_write, is_user, 1);

    if (ret) {

        if (retaddr) {

            /* now we have a real cpu fault */

            pc = (unsigned long)retaddr;

            tb = tb_find_pc(pc);

            if (tb) {

                /* the PC is inside the translated code. It means that we have

                   a virtual CPU fault */

                cpu_restore_state(tb, env, pc, NULL);

            }

        }

        if (retaddr)

            raise_exception_err(EXCP0E_PAGE, env->error_code);

        else

            raise_exception_err_norestore(EXCP0E_PAGE, env->error_code);

    }

    env = saved_env;

}

void tlb_fill(target_ulong addr, int is_write, int is_user, void *retaddr)

{

    TranslationBlock *tb;

    int ret;

    unsigned long pc;

    CPUX86State *saved_env;



    



    saved_env = env;

    env = cpu_single_env;



    ret = cpu_x86_handle_mmu_fault(env, addr, is_write, is_user, 1);

    if (ret) {

        if (retaddr) {

            

            pc = (unsigned long)retaddr;

            tb = tb_find_pc(pc);

            if (tb) {

                



                cpu_restore_state(tb, env, pc, NULL);

            }

        }

        if (retaddr)

            raise_exception_err(EXCP0E_PAGE, env->error_code);

        else

            raise_exception_err_norestore(EXCP0E_PAGE, env->error_code);

    }

    env = saved_env;

}

void FUNC_0(target_ulong VAR_0, int VAR_1, int VAR_2, void *VAR_3)

{

    TranslationBlock *tb;

    int VAR_4;

    unsigned long VAR_5;

    CPUX86State *saved_env;



    



    saved_env = env;

    env = cpu_single_env;



    VAR_4 = cpu_x86_handle_mmu_fault(env, VAR_0, VAR_1, VAR_2, 1);

    if (VAR_4) {

        if (VAR_3) {

            

            VAR_5 = (unsigned long)VAR_3;

            tb = tb_find_pc(VAR_5);

            if (tb) {

                



                cpu_restore_state(tb, env, VAR_5, NULL);

            }

        }

        if (VAR_3)

            raise_exception_err(EXCP0E_PAGE, env->error_code);

        else

            raise_exception_err_norestore(EXCP0E_PAGE, env->error_code);

    }

    env = saved_env;

}

void FUNC_0(target_ulong VAR_0, int VAR_1, int VAR_2, void *VAR_3)
{ TranslationBlock *tb; int VAR_4; unsigned long VAR_5; CPUX86State *saved_env; saved_env = env; env = cpu_single_env; VAR_4 = cpu_x86_handle_mmu_fault(env, VAR_0, VAR_1, VAR_2, 1); if (VAR_4) { if (VAR_3) { VAR_5 = (unsigned long)VAR_3; tb = tb_find_pc(VAR_5); if (tb) { cpu_restore_state(tb, env, VAR_5, NULL); } } if (VAR_3)
raise_exception_err(EXCP0E_PAGE, env->error_code); else
raise_exception_err_norestore(EXCP0E_PAGE, env->error_code); } env = saved_env; }