diff options
author | Alexander Graf <agraf@suse.de> | 2012-05-29 05:30:26 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2012-08-14 20:26:56 +0100 |
commit | 3a1363acf9648bc26989b01b87c7c3c494df2138 (patch) | |
tree | ea76d15a5f33f34cc059e5ee169ddf9fca7aaccc /linux-user | |
parent | 806d102141b99d4f1e55a97d68b7ea8c8ba3129f (diff) |
linux-user: ARM: Ignore immediate value for svc in thumb mode
When running in thumb mode, Linux doesn't evaluate the immediate value
of the svc instruction, but instead just always assumes the syscall number
to be in r7.
This fixes executing go_bootstrap while building go for me.
Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index 63c1249576..7dea084873 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -822,8 +822,7 @@ 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 == 0 || n >= ARM_SYSCALL_BASE - || (env->thumb && n == ARM_THUMB_SYSCALL)) { + } else if (n == 0 || n >= ARM_SYSCALL_BASE || env->thumb) { /* linux syscall */ if (env->thumb || n == 0) { n = env->regs[7]; |