From 8fd0a145947011f113abaab245e35f1adfb6eb48 Mon Sep 17 00:00:00 2001 From: Mustafa Quraish Date: Fri, 4 Feb 2022 06:16:18 -0500 Subject: Allow `builtins.c` to inject constants into program, use for syscalls We can now directly expose the `syscallN()` APIs to the program and define the `open()`, `write()` etc syscalls in the stdlib. This simplifies the implementation a decent bunch :^) --- src/utils.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/utils.h') diff --git a/src/utils.h b/src/utils.h index 7718c1c..fbd3aac 100644 --- a/src/utils.h +++ b/src/utils.h @@ -11,5 +11,7 @@ i64 i64min(i64 a, i64 b); // Assumes alignment is a power of 2 i64 align_up(i64 val, i64 align); +i64 get_syscall_num(i64 orig_syscall); + #define die_location(loc, ...) _die_location(__FILE__, __LINE__, loc, __VA_ARGS__) \ No newline at end of file -- cgit v1.2.3