diff options
| author | joachimschmidt557 <joachim.schmidt557@outlook.com> | 2021-11-20 15:30:53 +0100 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2021-11-20 19:25:59 +0100 |
| commit | e8112f774450be081cc210cf03c114f64b78731e (patch) | |
| tree | a7dfe45c668d4539fb221f321ef90f334e091047 /lib/std/start.zig | |
| parent | c84147f90dd99af1352e69f698be48964573ee07 (diff) | |
| download | zig-e8112f774450be081cc210cf03c114f64b78731e.tar.gz zig-e8112f774450be081cc210cf03c114f64b78731e.zip | |
stage2 RISCV64: implement basic function prologue and epilogue
Diffstat (limited to 'lib/std/start.zig')
| -rw-r--r-- | lib/std/start.zig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/std/start.zig b/lib/std/start.zig index cd2cf230af..d10b756160 100644 --- a/lib/std/start.zig +++ b/lib/std/start.zig @@ -130,6 +130,14 @@ fn exit2(code: usize) noreturn { : "memory", "cc" ); }, + .riscv64 => { + asm volatile ("ecall" + : + : [number] "{a7}" (94), + [arg1] "{a0}" (0), + : "rcx", "r11", "memory" + ); + }, else => @compileError("TODO"), }, // exits(0) |
