dreamcast/runtime.cpp
Zack Buhman 25e299feba new "example" directory
This is a reshuffling of filenames, extensions, paths, make rules,
just because I felt like it.
2023-12-12 21:50:39 +08:00

28 lines
469 B
C++

#include <cstdint>
#include "cache.hpp"
extern uint32_t __bss_link_start __asm("__bss_link_start");
extern uint32_t __bss_link_end __asm("__bss_link_end");
extern void main();
extern "C"
void runtime_init()
__attribute__((section(".text.startup.runtime_init")));
extern "C"
void runtime_init()
{
// clear BSS
uint32_t * start = &__bss_link_start;
uint32_t * end = &__bss_link_end;
while (start < end) {
*start++ = 0;
}
cache::init();
main();
}