int cpu_sparc_handle_mmu_fault (CPUState *env, target_ulong address, int rw,

                              int mmu_idx, int is_softmmu)

{

    target_ulong virt_addr, vaddr;

    target_phys_addr_t paddr;

    int error_code = 0, prot, ret = 0, access_index;



    error_code = get_physical_address(env, &paddr, &prot, &access_index,

                                      address, rw, mmu_idx);

    if (error_code == 0) {

        virt_addr = address & TARGET_PAGE_MASK;

        vaddr = virt_addr + ((address & TARGET_PAGE_MASK) &

                             (TARGET_PAGE_SIZE - 1));

#ifdef DEBUG_MMU

        printf("Translate at 0x%" PRIx64 " -> 0x%" PRIx64 ", vaddr 0x%" PRIx64

               "\n", address, paddr, vaddr);

#endif

        ret = tlb_set_page_exec(env, vaddr, paddr, prot, mmu_idx, is_softmmu);

        return ret;

    }

    // XXX

    return 1;

}

int cpu_sparc_handle_mmu_fault (CPUState *env, target_ulong address, int rw,

                              int mmu_idx, int is_softmmu)

{

    target_ulong virt_addr, vaddr;

    target_phys_addr_t paddr;

    int error_code = 0, prot, ret = 0, access_index;



    error_code = get_physical_address(env, &paddr, &prot, &access_index,

                                      address, rw, mmu_idx);

    if (error_code == 0) {

        virt_addr = address & TARGET_PAGE_MASK;

        vaddr = virt_addr + ((address & TARGET_PAGE_MASK) &

                             (TARGET_PAGE_SIZE - 1));

#ifdef DEBUG_MMU

        printf("Translate at 0x%" PRIx64 " -> 0x%" PRIx64 ", vaddr 0x%" PRIx64

               "\n", address, paddr, vaddr);

#endif

        ret = tlb_set_page_exec(env, vaddr, paddr, prot, mmu_idx, is_softmmu);

        return ret;

    }

    

    return 1;

}

int FUNC_0 (CPUState *VAR_0, target_ulong VAR_1, int VAR_2,

                              int VAR_3, int VAR_4)

{

    target_ulong virt_addr, vaddr;

    target_phys_addr_t paddr;

    int VAR_5 = 0, VAR_6, VAR_7 = 0, VAR_8;



    VAR_5 = get_physical_address(VAR_0, &paddr, &VAR_6, &VAR_8,

                                      VAR_1, VAR_2, VAR_3);

    if (VAR_5 == 0) {

        virt_addr = VAR_1 & TARGET_PAGE_MASK;

        vaddr = virt_addr + ((VAR_1 & TARGET_PAGE_MASK) &

                             (TARGET_PAGE_SIZE - 1));

#ifdef DEBUG_MMU

        printf("Translate at 0x%" PRIx64 " -> 0x%" PRIx64 ", vaddr 0x%" PRIx64

               "\n", VAR_1, paddr, vaddr);

#endif

        VAR_7 = tlb_set_page_exec(VAR_0, vaddr, paddr, VAR_6, VAR_3, VAR_4);

        return VAR_7;

    }

    

    return 1;

}

int FUNC_0 (CPUState *VAR_0, target_ulong VAR_1, int VAR_2,
int VAR_3, int VAR_4)
{ target_ulong virt_addr, vaddr; target_phys_addr_t paddr; int VAR_5 = 0, VAR_6, VAR_7 = 0, VAR_8; VAR_5 = get_physical_address(VAR_0, &paddr, &VAR_6, &VAR_8,
VAR_1, VAR_2, VAR_3); if (VAR_5 == 0) { virt_addr = VAR_1 & TARGET_PAGE_MASK; vaddr = virt_addr + ((VAR_1 & TARGET_PAGE_MASK) &
(TARGET_PAGE_SIZE - 1)); #ifdef DEBUG_MMU
printf("Translate at 0x%" PRIx64 " -> 0x%" PRIx64 ", vaddr 0x%" PRIx64
"\n", VAR_1, paddr, vaddr); #endif
VAR_7 = tlb_set_page_exec(VAR_0, vaddr, paddr, VAR_6, VAR_3, VAR_4); return VAR_7; } return 1; }