Revision 67b915a5 exec.c
b/exec.c | ||
---|---|---|
17 | 17 |
* License along with this library; if not, write to the Free Software |
18 | 18 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | 19 |
*/ |
20 |
#include "config.h" |
|
20 | 21 |
#include <stdlib.h> |
21 | 22 |
#include <stdio.h> |
22 | 23 |
#include <stdarg.h> |
... | ... | |
24 | 25 |
#include <errno.h> |
25 | 26 |
#include <unistd.h> |
26 | 27 |
#include <inttypes.h> |
28 |
#if !defined(CONFIG_SOFTMMU) |
|
27 | 29 |
#include <sys/mman.h> |
30 |
#endif |
|
28 | 31 |
|
29 |
#include "config.h" |
|
30 | 32 |
#include "cpu.h" |
31 | 33 |
#include "exec-all.h" |
32 | 34 |
|
... | ... | |
121 | 123 |
{ |
122 | 124 |
/* NOTE: we can always suppose that host_page_size >= |
123 | 125 |
TARGET_PAGE_SIZE */ |
126 |
#ifdef _WIN32 |
|
127 |
real_host_page_size = 4096; |
|
128 |
#else |
|
124 | 129 |
real_host_page_size = getpagesize(); |
130 |
#endif |
|
125 | 131 |
if (host_page_size == 0) |
126 | 132 |
host_page_size = real_host_page_size; |
127 | 133 |
if (host_page_size < TARGET_PAGE_SIZE) |
... | ... | |
1369 | 1375 |
|
1370 | 1376 |
index = (vaddr >> 12) & (CPU_TLB_SIZE - 1); |
1371 | 1377 |
addend -= vaddr; |
1372 |
if (prot & PROT_READ) {
|
|
1378 |
if (prot & PAGE_READ) {
|
|
1373 | 1379 |
env->tlb_read[is_user][index].address = address; |
1374 | 1380 |
env->tlb_read[is_user][index].addend = addend; |
1375 | 1381 |
} else { |
1376 | 1382 |
env->tlb_read[is_user][index].address = -1; |
1377 | 1383 |
env->tlb_read[is_user][index].addend = -1; |
1378 | 1384 |
} |
1379 |
if (prot & PROT_WRITE) {
|
|
1385 |
if (prot & PAGE_WRITE) {
|
|
1380 | 1386 |
if ((pd & ~TARGET_PAGE_MASK) == IO_MEM_ROM) { |
1381 | 1387 |
/* ROM: access is ignored (same as unassigned) */ |
1382 | 1388 |
env->tlb_write[is_user][index].address = vaddr | IO_MEM_ROM; |
Also available in: Unified diff