Revision 67b915a5 target-i386/helper2.c

b/target-i386/helper2.c
24 24
#include <inttypes.h>
25 25
#include <signal.h>
26 26
#include <assert.h>
27
#include <sys/mman.h>
28 27

  
29 28
#include "cpu.h"
30 29
#include "exec-all.h"
......
334 333
    if (!(env->cr[0] & CR0_PG_MASK)) {
335 334
        pte = addr;
336 335
        virt_addr = addr & TARGET_PAGE_MASK;
337
        prot = PROT_READ | PROT_WRITE;
336
        prot = PAGE_READ | PAGE_WRITE;
338 337
        page_size = 4096;
339 338
        goto do_mapping;
340 339
    }
......
409 408
    }
410 409

  
411 410
    /* the page can be put in the TLB */
412
    prot = PROT_READ;
411
    prot = PAGE_READ;
413 412
    if (pte & PG_DIRTY_MASK) {
414 413
        /* only set write access if already dirty... otherwise wait
415 414
           for dirty access */
416 415
        if (is_user) {
417 416
            if (ptep & PG_RW_MASK)
418
                prot |= PROT_WRITE;
417
                prot |= PAGE_WRITE;
419 418
        } else {
420 419
            if (!(env->cr[0] & CR0_WP_MASK) ||
421 420
                (ptep & PG_RW_MASK))
422
                prot |= PROT_WRITE;
421
                prot |= PAGE_WRITE;
423 422
        }
424 423
    }
425 424

  

Also available in: Unified diff