mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-05 22:43:39 +00:00
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
16 lines
243 B
ArmAsm
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
|
|
|