aboutsummaryrefslogtreecommitdiff
path: root/linux-user/main.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-26 15:09:38 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-26 15:09:38 +0000
commita87295e8df0923dab9857c1a340d23fe3278a336 (patch)
tree30c629030791710b509b88fceb184766f97743cd /linux-user/main.c
parent20c9f095c4536e64e60432a5c72fce38e8306cbb (diff)
M68k system mode semihosting.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2861 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/main.c')
-rw-r--r--linux-user/main.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 0f4dbdadff..45b03000d2 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -1502,9 +1502,9 @@ void cpu_loop(CPUM68KState *env)
}
}
break;
- case EXCP_HALTED:
+ case EXCP_HALT_INSN:
/* Semihosing syscall. */
- env->pc += 2;
+ env->pc += 4;
do_m68k_semihosting(env, env->dregs[0]);
break;
case EXCP_LINEA:
@@ -1918,10 +1918,6 @@ int main(int argc, char **argv)
for(i = 0; i < 16; i++) {
env->regs[i] = regs->uregs[i];
}
- ts->stack_base = info->start_stack;
- ts->heap_base = info->brk;
- /* This will be filled in on the first SYS_HEAPINFO call. */
- ts->heap_limit = 0;
}
#elif defined(TARGET_SPARC)
{
@@ -2049,6 +2045,13 @@ int main(int argc, char **argv)
#error unsupported target CPU
#endif
+#if defined(TARGET_ARM) || defined(TARGET_M68K)
+ ts->stack_base = info->start_stack;
+ ts->heap_base = info->brk;
+ /* This will be filled in on the first SYS_HEAPINFO call. */
+ ts->heap_limit = 0;
+#endif
+
if (gdbstub_port) {
gdbserver_start (gdbstub_port);
gdb_handlesig(env, 0);