uvm32/apps/crt0.S
Toby Jaffey a88f3a1690 Workaround for Rust having different system for templating constants to GNU as.
Having a separate file is ugly, but it allows for a single source of truth for constants
Works for C, asm, zig and rust.

https://stackoverflow.com/questions/79840723/shared-assembly-between-rust-and-c-using-preprocessor
2025-12-08 10:13:53 +00:00

16 lines
243 B
ArmAsm

#include "uvm32_sys.h"
.section .initial_jump , "ax", %progbits
.global _start
.align 4
_start:
# sp is already setup by vm
sw ra,12(sp)
jal ra, main
#if 1
#include "non-rust-crt0-hack.s"
#else
li a7, {IOREQ_HALT}
#endif
ecall
.section .data