21ae6cff90
Update to final v1.1.0 OBS-URL: https://build.opensuse.org/request/show/124131 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=77
32 lines
1.3 KiB
Diff
32 lines
1.3 KiB
Diff
From 8cc5120497695e7ea8dde9b096eb6c8cb9b6ac35 Mon Sep 17 00:00:00 2001
|
|
From: Alexander Graf <agraf@suse.de>
|
|
Date: Tue, 29 May 2012 17:28:07 +0200
|
|
Subject: [PATCH] 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>
|
|
---
|
|
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 503ecfa..ed48276 100644
|
|
--- a/linux-user/main.c
|
|
+++ b/linux-user/main.c
|
|
@@ -823,8 +823,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];
|