aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-user/main.c2
-rw-r--r--linux-user/syscall.c4
-rw-r--r--target-cris/cpu.h1
3 files changed, 3 insertions, 4 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 44af787d66..234a6dc6fc 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -1763,7 +1763,7 @@ void cpu_loop(CPUM68KState *env)
env->dregs[3],
env->dregs[4],
env->dregs[5],
- env->dregs[6]);
+ env->aregs[0]);
}
break;
case EXCP_INTERRUPT:
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 72b80e3fbb..a15c93567e 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4086,10 +4086,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
#endif
#ifdef TARGET_NR_mmap2
case TARGET_NR_mmap2:
-#if defined(TARGET_SPARC) || defined(TARGET_MIPS)
+#ifndef MMAP_SHIFT
#define MMAP_SHIFT 12
-#else
-#define MMAP_SHIFT TARGET_PAGE_BITS
#endif
ret = get_errno(target_mmap(arg1, arg2, arg3,
target_to_host_bitmask(arg4, mmap_flags_tbl),
diff --git a/target-cris/cpu.h b/target-cris/cpu.h
index 44d5ed7d61..ac042d5d21 100644
--- a/target-cris/cpu.h
+++ b/target-cris/cpu.h
@@ -213,6 +213,7 @@ void register_cris_insns (CPUCRISState *env);
/* CRIS uses 8k pages. */
#define TARGET_PAGE_BITS 13
+#define MMAP_SHIFT TARGET_PAGE_BITS
#define CPUState CPUCRISState
#define cpu_init cpu_cris_init