Rename ioreq to syscall

This commit is contained in:
Toby Jaffey 2025-12-08 12:26:47 +00:00
parent b79a107a3d
commit 61fe0e8647
20 changed files with 187 additions and 190 deletions

View file

@ -1,11 +1,11 @@
// Definitions needed by both host and target
// syscalls for exposed host functions
#define IOREQ_PRINT 0x13A
#define IOREQ_PRINTLN 0x13B
#define IOREQ_PRINTD 0x13C
#define IOREQ_PRINTX 0x13D
#define IOREQ_MILLIS 0x13F
#define IOREQ_PRINTC 0x140
#define IOREQ_GETC 0x141
#define UVM32_SYSCALL_PRINT 0x13A
#define UVM32_SYSCALL_PRINTLN 0x13B
#define UVM32_SYSCALL_PRINTD 0x13C
#define UVM32_SYSCALL_PRINTX 0x13D
#define UVM32_SYSCALL_MILLIS 0x13F
#define UVM32_SYSCALL_PRINTC 0x140
#define UVM32_SYSCALL_GETC 0x141

View file

@ -1,5 +1,5 @@
// System provided IOREQs
#define IOREQ_HALT 0x138
#define IOREQ_YIELD 0x139
// System provided UVM32_SYSCALLs
#define UVM32_SYSCALL_HALT 0x138
#define UVM32_SYSCALL_YIELD 0x139
#include "uvm32_common_custom.h"

View file

@ -24,14 +24,14 @@ static uint32_t syscall(uint32_t id, uint32_t param) {
}
#define syscall_cast(id, x) syscall((uint32_t)id, (uint32_t)x)
#define println(x) syscall_cast(IOREQ_PRINTLN, x)
#define print(x) syscall_cast(IOREQ_PRINT, x)
#define printd(x) syscall_cast(IOREQ_PRINTD, x)
#define printx(x) syscall_cast(IOREQ_PRINTX, x)
#define millis() syscall_cast(IOREQ_MILLIS, 0)
#define printc() syscall_cast(IOREQ_PRINTC, 0)
#define getc() syscall_cast(IOREQ_GETC, 0)
#define yield() syscall_cast(IOREQ_YIELD, 0)
#define println(x) syscall_cast(UVM32_SYSCALL_PRINTLN, x)
#define print(x) syscall_cast(UVM32_SYSCALL_PRINT, x)
#define printd(x) syscall_cast(UVM32_SYSCALL_PRINTD, x)
#define printx(x) syscall_cast(UVM32_SYSCALL_PRINTX, x)
#define millis() syscall_cast(UVM32_SYSCALL_MILLIS, 0)
#define printc() syscall_cast(UVM32_SYSCALL_PRINTC, 0)
#define getc() syscall_cast(UVM32_SYSCALL_GETC, 0)
#define yield() syscall_cast(UVM32_SYSCALL_YIELD, 0)
#include "uvm32_common_custom.h"