* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <errno.h>
#include <unistd.h>
#include <inttypes.h>
+#if !defined(CONFIG_SOFTMMU)
#include <sys/mman.h>
+#endif
-#include "config.h"
#include "cpu.h"
#include "exec-all.h"
{
/* NOTE: we can always suppose that host_page_size >=
TARGET_PAGE_SIZE */
+#ifdef _WIN32
+ real_host_page_size = 4096;
+#else
real_host_page_size = getpagesize();
+#endif
if (host_page_size == 0)
host_page_size = real_host_page_size;
if (host_page_size < TARGET_PAGE_SIZE)
index = (vaddr >> 12) & (CPU_TLB_SIZE - 1);
addend -= vaddr;
- if (prot & PROT_READ) {
+ if (prot & PAGE_READ) {
env->tlb_read[is_user][index].address = address;
env->tlb_read[is_user][index].addend = addend;
} else {
env->tlb_read[is_user][index].address = -1;
env->tlb_read[is_user][index].addend = -1;
}
- if (prot & PROT_WRITE) {
+ if (prot & PAGE_WRITE) {
if ((pd & ~TARGET_PAGE_MASK) == IO_MEM_ROM) {
/* ROM: access is ignored (same as unassigned) */
env->tlb_write[is_user][index].address = vaddr | IO_MEM_ROM;