Explain the hack better

This commit is contained in:
Toby Jaffey 2025-12-08 10:30:33 +00:00
parent 5b2c82b85e
commit 40e8795f3f

View file

@ -7,8 +7,11 @@ _start:
sw ra,12(sp) sw ra,12(sp)
jal ra, main jal ra, main
#if 1 #if 1
// rust will interpret the "#if 1" and "#include" as comments and ignore
// C, asm, zig will include the file below, which references a constant from uvm32_sys.h
#include "non-rust-crt0-hack.S" #include "non-rust-crt0-hack.S"
#else #else
// only rust will see this
li a7, {IOREQ_HALT} li a7, {IOREQ_HALT}
#endif #endif
ecall ecall