summaryrefslogtreecommitdiffstats
path: root/linux-user/aarch64/cpu_loop.c
diff options
context:
space:
mode:
authorRichard Henderson2022-04-28 10:10:55 +0200
committerRichard Henderson2022-06-28 01:05:07 +0200
commited3a06b10a6abb53589d794ed23accf21be05633 (patch)
tree78e7bb0e6c8432afd1e985f3e8a156402f2821df /linux-user/aarch64/cpu_loop.c
parentsemihosting: Clean up common_semi_open_cb (diff)
downloadqemu-ed3a06b10a6abb53589d794ed23accf21be05633.tar.gz
qemu-ed3a06b10a6abb53589d794ed23accf21be05633.tar.xz
qemu-ed3a06b10a6abb53589d794ed23accf21be05633.zip
semihosting: Return void from do_common_semihosting
Perform the cleanup in the FIXME comment in common_semi_gdb_syscall. Do not modify guest registers until the syscall is complete, which in the gdbstub case is asynchronous. In the synchronous non-gdbstub case, use common_semi_set_ret to set the result. Merge set_swi_errno into common_semi_cb. Rely on the latter for combined return value / errno setting. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'linux-user/aarch64/cpu_loop.c')
-rw-r--r--linux-user/aarch64/cpu_loop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/aarch64/cpu_loop.c b/linux-user/aarch64/cpu_loop.c
index 3b273f6299..f7ef36cd9f 100644
--- a/linux-user/aarch64/cpu_loop.c
+++ b/linux-user/aarch64/cpu_loop.c
@@ -154,7 +154,7 @@ void cpu_loop(CPUARMState *env)
force_sig_fault(TARGET_SIGTRAP, TARGET_TRAP_BRKPT, env->pc);
break;
case EXCP_SEMIHOST:
- env->xregs[0] = do_common_semihosting(cs);
+ do_common_semihosting(cs);
env->pc += 4;
break;
case EXCP_YIELD: