From ce4defa062c5e6d940f73a1013f8770f23b0f4bf Mon Sep 17 00:00:00 2001 From: pbrook Date: Thu, 9 Feb 2006 16:49:55 +0000 Subject: Arm Linux EABI syscall support. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1756 c046a42c-6fe2-441c-8c8c-71466251a162 --- linux-user/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'linux-user/main.c') diff --git a/linux-user/main.c b/linux-user/main.c index 56accfbb52..afcf4f4b1b 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -360,6 +360,7 @@ void cpu_loop(CPUARMState *env) case EXCP_SWI: case EXCP_BKPT: { + env->eabi = 1; /* system call */ if (trapnr == EXCP_BKPT) { if (env->thumb) { @@ -386,13 +387,14 @@ void cpu_loop(CPUARMState *env) } else if (n == ARM_NR_semihosting || n == ARM_NR_thumb_semihosting) { env->regs[0] = do_arm_semihosting (env); - } else if (n >= ARM_SYSCALL_BASE + } else if (n == 0 || n >= ARM_SYSCALL_BASE || (env->thumb && n == ARM_THUMB_SYSCALL)) { /* linux syscall */ - if (env->thumb) { + if (env->thumb || n == 0) { n = env->regs[7]; } else { n -= ARM_SYSCALL_BASE; + env->eabi = 0; } env->regs[0] = do_syscall(env, n, -- cgit v1.2.3