Revision 99e43d36 target-mips/helper.c

b/target-mips/helper.c
272 272
#if !defined(CONFIG_USER_ONLY)
273 273
    target_phys_addr_t physical;
274 274
    int prot;
275
#endif
276 275
    int access_type;
276
#endif
277 277
    int ret = 0;
278 278

  
279 279
#if 0
......
285 285
    rw &= 1;
286 286

  
287 287
    /* data access */
288
#if !defined(CONFIG_USER_ONLY)
288 289
    /* XXX: put correct access by using cpu_restore_state()
289 290
       correctly */
290 291
    access_type = ACCESS_INT;
291
#if defined(CONFIG_USER_ONLY)
292
    ret = TLBRET_NOMATCH;
293
#else
294 292
    ret = get_physical_address(env, &physical, &prot,
295 293
                               address, rw, access_type);
296 294
    qemu_log("%s address=" TARGET_FMT_lx " ret %d physical " TARGET_FMT_plx " prot %d\n",
297 295
              __func__, address, ret, physical, prot);
298 296
    if (ret == TLBRET_MATCH) {
299
       tlb_set_page(env, address & TARGET_PAGE_MASK,
300
                    physical & TARGET_PAGE_MASK, prot | PAGE_EXEC,
301
                    mmu_idx, TARGET_PAGE_SIZE);
302
       ret = 0;
297
        tlb_set_page(env, address & TARGET_PAGE_MASK,
298
                     physical & TARGET_PAGE_MASK, prot | PAGE_EXEC,
299
                     mmu_idx, TARGET_PAGE_SIZE);
300
        ret = 0;
303 301
    } else if (ret < 0)
304 302
#endif
305 303
    {

Also available in: Unified diff