mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
semihosting: Implement SYS_ISERROR
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>
This commit is contained in:
parent
27e3b109d1
commit
767ba049b8
1 changed files with 4 additions and 0 deletions
|
@ -59,6 +59,7 @@
|
||||||
#define TARGET_SYS_WRITE 0x05
|
#define TARGET_SYS_WRITE 0x05
|
||||||
#define TARGET_SYS_READ 0x06
|
#define TARGET_SYS_READ 0x06
|
||||||
#define TARGET_SYS_READC 0x07
|
#define TARGET_SYS_READC 0x07
|
||||||
|
#define TARGET_SYS_ISERROR 0x08
|
||||||
#define TARGET_SYS_ISTTY 0x09
|
#define TARGET_SYS_ISTTY 0x09
|
||||||
#define TARGET_SYS_SEEK 0x0a
|
#define TARGET_SYS_SEEK 0x0a
|
||||||
#define TARGET_SYS_FLEN 0x0c
|
#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);
|
return guestfd_fns[gf->type].readfn(cs, gf, arg1, len);
|
||||||
case TARGET_SYS_READC:
|
case TARGET_SYS_READC:
|
||||||
return qemu_semihosting_console_inc(cs->env_ptr);
|
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:
|
case TARGET_SYS_ISTTY:
|
||||||
GET_ARG(0);
|
GET_ARG(0);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue