From: Alexander Graf Date: Tue, 29 May 2012 05:30:26 +0000 (+0000) Subject: linux-user: ARM: Ignore immediate value for svc in thumb mode X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~3749^2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a1363acf9648bc26989b01b87c7c3c494df2138;p=sdk%2Femulator%2Fqemu.git 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 Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- diff --git a/linux-user/main.c b/linux-user/main.c index 63c1249..7dea084 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];