Revision 698235aa

b/target-sparc/helper.c
185 185
        }
186 186
    }
187 187

  
188
    /* check access */
189
    access_perms = (pde & PTE_ACCESS_MASK) >> PTE_ACCESS_SHIFT;
190
    error_code = access_table[*access_index][access_perms];
191
    if (error_code && !((env->mmuregs[0] & MMU_NF) && is_user))
192
        return error_code;
193

  
188 194
    /* update page modified and dirty bits */
189 195
    is_dirty = (rw & 1) && !(pde & PG_MODIFIED_MASK);
190 196
    if (!(pde & PG_ACCESSED_MASK) || is_dirty) {
......
193 199
            pde |= PG_MODIFIED_MASK;
194 200
        stl_phys_notdirty(pde_ptr, pde);
195 201
    }
196
    /* check access */
197
    access_perms = (pde & PTE_ACCESS_MASK) >> PTE_ACCESS_SHIFT;
198
    error_code = access_table[*access_index][access_perms];
199
    if (error_code && !((env->mmuregs[0] & MMU_NF) && is_user))
200
        return error_code;
201 202

  
202 203
    /* the page can be put in the TLB */
203 204
    *prot = perm_table[is_user][access_perms];

Also available in: Unified diff