[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 30/30] semihosting: Implement SYS_ISERROR
From: |
Alex Bennée |
Subject: |
[PULL 30/30] semihosting: Implement SYS_ISERROR |
Date: |
Fri, 15 Jan 2021 13:08:28 +0000 |
From: Keith Packard <keithp@keithp.com>
Part of Semihosting for AArch32 and AArch64 Release 2.0
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210107170717.2098982-10-keithp@keithp.com>
Message-Id: <20210108224256.2321-21-alex.bennee@linaro.org>
diff --git a/hw/semihosting/arm-compat-semi.c b/hw/semihosting/arm-compat-semi.c
index a631904fb0..23c6e3edcb 100644
--- a/hw/semihosting/arm-compat-semi.c
+++ b/hw/semihosting/arm-compat-semi.c
@@ -59,6 +59,7 @@
#define TARGET_SYS_WRITE 0x05
#define TARGET_SYS_READ 0x06
#define TARGET_SYS_READC 0x07
+#define TARGET_SYS_ISERROR 0x08
#define TARGET_SYS_ISTTY 0x09
#define TARGET_SYS_SEEK 0x0a
#define TARGET_SYS_FLEN 0x0c
@@ -967,6 +968,9 @@ target_ulong do_common_semihosting(CPUState *cs)
return guestfd_fns[gf->type].readfn(cs, gf, arg1, len);
case TARGET_SYS_READC:
return qemu_semihosting_console_inc(cs->env_ptr);
+ case TARGET_SYS_ISERROR:
+ GET_ARG(0);
+ return (target_long) arg0 < 0 ? 1 : 0;
case TARGET_SYS_ISTTY:
GET_ARG(0);
--
2.20.1
- [PULL 25/30] semihosting: Support SYS_HEAPINFO when env->boot_info is not set, (continued)
- [PULL 25/30] semihosting: Support SYS_HEAPINFO when env->boot_info is not set, Alex Bennée, 2021/01/15
- [PULL 13/30] test/guest-debug: echo QEMU command as well, Alex Bennée, 2021/01/15
- [PULL 14/30] configure: gate our use of GDB to 8.3.1 or above, Alex Bennée, 2021/01/15
- [PULL 21/30] target/arm: use official org.gnu.gdb.aarch64.sve layout for registers, Alex Bennée, 2021/01/15
- Re: [PULL 21/30] target/arm: use official org.gnu.gdb.aarch64.sve layout for registers, Claudio Fontana, 2021/01/19
- Re: [PULL 21/30] target/arm: use official org.gnu.gdb.aarch64.sve layout for registers, Claudio Fontana, 2021/01/19
- Re: [PULL 21/30] target/arm: use official org.gnu.gdb.aarch64.sve layout for registers, Alex Bennée, 2021/01/19
- Re: [PULL 21/30] target/arm: use official org.gnu.gdb.aarch64.sve layout for registers, Claudio Fontana, 2021/01/19
- Re: [PULL 21/30] target/arm: use official org.gnu.gdb.aarch64.sve layout for registers, Alex Bennée, 2021/01/19
- Re: [PULL 21/30] target/arm: use official org.gnu.gdb.aarch64.sve layout for registers, Luis Machado, 2021/01/19
[PULL 30/30] semihosting: Implement SYS_ISERROR,
Alex Bennée <=
[PULL 29/30] semihosting: Implement SYS_TMPNAM, Alex Bennée, 2021/01/15
[PULL 07/30] Makefile: wrap cscope in quiet-command calls, Alex Bennée, 2021/01/15
[PULL 28/30] semihosting: Implement SYS_ELAPSED and SYS_TICKFREQ, Alex Bennée, 2021/01/15
[PULL 16/30] gdbstub: implement a softmmu based test, Alex Bennée, 2021/01/15
[PULL 18/30] gdbstub: drop CPUEnv from gdb_exit(), Alex Bennée, 2021/01/15
[PULL 19/30] gdbstub: drop gdbserver_cleanup in favour of gdb_exit, Alex Bennée, 2021/01/15
[PULL 23/30] semihosting: Change common-semi API to be architecture-independent, Alex Bennée, 2021/01/15
[PULL 08/30] docker: expand debian-amd64 image to include tag tools, Alex Bennée, 2021/01/15
[PULL 27/30] riscv: Add semihosting support for user mode, Alex Bennée, 2021/01/15
[PULL 20/30] gdbstub: ensure we clean-up when terminated, Alex Bennée, 2021/01/15