compiler/
lib/
examples/
std/
arch/
char/
collections/
lang/
sys/
arch.rad
68 B
char.rad
855 B
collections.rad
39 B
fmt.rad
8.1 KiB
intrinsics.rad
683 B
io.rad
1.4 KiB
lang.rad
360 B
mem.rad
2.2 KiB
sys.rad
173 B
testing.rad
2.4 KiB
tests.rad
15.4 KiB
vec.rad
4.8 KiB
std.rad
358 B
scripts/
seed/
sublime/
test/
vim/
.gitignore
336 B
.gitsigners
112 B
LICENSE
1.1 KiB
Makefile
3.7 KiB
README
2.5 KiB
STYLE
2.5 KiB
std.lib
1.2 KiB
std.lib.test
373 B
lib/std/intrinsics.rad
raw
| 1 | //! Compiler intrinsics. |
| 2 | |
| 3 | /// Issue a system call with the given number and arguments. |
| 4 | /// |
| 5 | /// Arguments and the return value are `i64` to support both 32-bit |
| 6 | /// emulator addresses and 64-bit native (AMD64) pointers. |
| 7 | /// |
| 8 | /// The caller must satisfy the target system call's ABI. Every argument that |
| 9 | /// the kernel interprets as an address must remain valid and readable or |
| 10 | /// writable for the full extent and duration required by that system call. |
| 11 | @intrinsic export unsafe fn ecall(number: u32, arg1: i64, arg2: i64, arg3: i64, arg4: i64) -> i64; |
| 12 | |
| 13 | /// Break out of program. |
| 14 | @intrinsic export fn ebreak(); |
| 15 | |
| 16 | /// Full acquire/release memory fence. |
| 17 | @intrinsic export fn memoryFence(); |