mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-28 18:30:06 +00:00
add support for linux_riscv64 and freestanding_riscv64
This commit is contained in:
@@ -34,6 +34,9 @@ when ODIN_BUILD_MODE == .Dynamic {
|
||||
} else when ODIN_OS == .Darwin && ODIN_ARCH == .arm64 {
|
||||
@require foreign import entry "entry_unix_no_crt_darwin_arm64.asm"
|
||||
SYS_exit :: 1
|
||||
} else when ODIN_ARCH == .riscv64 {
|
||||
@require foreign import entry "entry_unix_no_crt_riscv64.asm"
|
||||
SYS_exit :: 93
|
||||
}
|
||||
@(link_name="_start_odin", linkage="strong", require)
|
||||
_start_odin :: proc "c" (argc: i32, argv: [^]cstring) -> ! {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
.text
|
||||
|
||||
.globl _start
|
||||
|
||||
_start:
|
||||
ld a0, 0(sp)
|
||||
addi a1, sp, 8
|
||||
addi sp, sp, ~15
|
||||
call _start_odin
|
||||
ebreak
|
||||
@@ -12,6 +12,8 @@ _stderr_write :: proc "contextless" (data: []byte) -> (int, _OS_Errno) {
|
||||
SYS_write :: uintptr(4)
|
||||
} else when ODIN_ARCH == .arm32 {
|
||||
SYS_write :: uintptr(4)
|
||||
} else when ODIN_ARCH == .riscv64 {
|
||||
SYS_write :: uintptr(64)
|
||||
}
|
||||
|
||||
stderr :: 2
|
||||
|
||||
Reference in New Issue
Block a user