semihosting: Split out semihost_sys_write
commitaa915bd0a67d6c0a214b45372ed841521c5cd07a
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 28 Apr 2022 18:49:47 +0000 (28 11:49 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 27 Jun 2022 23:05:52 +0000 (28 04:35 +0530)
treeb0269554631c6f481a823fdd6e55db0a1542aa0c
parentaf0484b5025f8b7c951428a00b5bb3f172a2da8d
semihosting: Split out semihost_sys_write

Split out the non-ARM specific portions of SYS_WRITE to a
reusable function.  This handles all GuestFD.  This removes
the last use of common_semi_syscall_len.

Note that gdb_do_syscall %x reads target_ulong, not int.

Reviewed-by: Luc Michel <lmichel@kalray.eu>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
include/semihosting/syscalls.h
semihosting/arm-compat-semi.c
semihosting/syscalls.c