[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 9/9] semihosting: Implement SYS_ISERROR
From: |
Keith Packard |
Subject: |
[PATCH 9/9] semihosting: Implement SYS_ISERROR |
Date: |
Thu, 7 Jan 2021 09:07:17 -0800 |
Part of Semihosting for AArch32 and AArch64 Release 2.0
Signed-off-by: Keith Packard <keithp@keithp.com>
Message-Id: <20201214200713.3886611-10-keithp@keithp.com>
---
hw/semihosting/common-semi.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/semihosting/common-semi.c b/hw/semihosting/common-semi.c
index b0648c3812..abc15bf219 100644
--- a/hw/semihosting/common-semi.c
+++ b/hw/semihosting/common-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.29.2
- [PATCH 0/9] Add RISC-V semihosting 0.2. Finish ARM semihosting 2.0, Keith Packard, 2021/01/07
- [PATCH 5/9] riscv: Add semihosting support, Keith Packard, 2021/01/07
- [PATCH 1/9] semihosting: Move ARM semihosting code to shared directories, Keith Packard, 2021/01/07
- [PATCH 7/9] semihosting: Implement SYS_ELAPSED and SYS_TICKFREQ, Keith Packard, 2021/01/07
- [PATCH 9/9] semihosting: Implement SYS_ISERROR,
Keith Packard <=
- [PATCH 8/9] semihosting: Implement SYS_TMPNAM, Keith Packard, 2021/01/07
- [PATCH 4/9] semihosting: Support SYS_HEAPINFO when env->boot_info is not set, Keith Packard, 2021/01/07
- [PATCH 2/9] semihosting: Change common-semi API to be architecture-independent, Keith Packard, 2021/01/07
- [PATCH 6/9] riscv: Add semihosting support for user mode, Keith Packard, 2021/01/07
- [PATCH 3/9] semihosting: Change internal common-semi interfaces to use CPUState *, Keith Packard, 2021/01/07
- Re: [PATCH 0/9] Add RISC-V semihosting 0.2. Finish ARM semihosting 2.0, Alex Bennée, 2021/01/08