Require @(init) and @(fini) to be proc "contextless" ()

This commit is contained in:
gingerBill
2025-08-08 12:10:01 +01:00
parent 3194fda8f3
commit 7642e0a0e0
47 changed files with 170 additions and 102 deletions
+2 -2
View File
@@ -52,7 +52,7 @@ CPU :: struct {
cpu: CPU
@(init, private)
init_cpu_features :: proc "c" () {
init_cpu_features :: proc "contextless" () {
is_set :: #force_inline proc "c" (bit: u32, value: u32) -> bool {
return (value>>bit) & 0x1 != 0
}
@@ -156,7 +156,7 @@ init_cpu_features :: proc "c" () {
_cpu_name_buf: [72]u8
@(init, private)
init_cpu_name :: proc "c" () {
init_cpu_name :: proc "contextless" () {
number_of_extended_ids, _, _, _ := cpuid(0x8000_0000, 0)
if number_of_extended_ids < 0x8000_0004 {
return