aboutsummaryrefslogtreecommitdiff
path: root/linux-user/main.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-02-09 16:49:55 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-02-09 16:49:55 +0000
commitce4defa062c5e6d940f73a1013f8770f23b0f4bf (patch)
tree685dfe397fa69b4ef03be4a197644a4b6daa86f7 /linux-user/main.c
parentb88a38324b9cc469d6fffaecacbeb106a248a4cf (diff)
Arm Linux EABI syscall support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1756 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/main.c')
-rw-r--r--linux-user/main.c6
1 files changed, 4 insertions, 2 deletions
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,