40#ifndef EFX_SEMIHOSTING_H
41#define EFX_SEMIHOSTING_H
48#define RISCV_SEMIHOSTING_CALL_NUMBER 7
81static inline int __attribute__ ((always_inline)) call_host(
int reason,
void* arg) {
82 register int value
asm (
"a0") = reason;
83 register void* ptr
asm (
"a1") = arg;
92 " slli x0, x0, 0x1f \n"
94 " srai x0, x0, %[swi] \n"
104static void sh_write0(
char* buf)
110static void sh_writec(
char c)
116static char sh_readc(
void)
#define RISCV_SEMIHOSTING_CALL_NUMBER
semihosting_operation_numbers
@ SEMIHOSTING_SYS_TICKFREQ
@ SEMIHOSTING_SYS_ISERROR
@ SEMIHOSTING_SYS_GET_CMDLINE
@ SEMIHOSTING_SYS_EXIT_EXTENDED
@ SEMIHOSTING_SYS_HEAPINFO
@ SEMIHOSTING_SYS_ELAPSED