mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-24 16:37:54 +00:00
More contextless fixes
This commit is contained in:
@@ -7,7 +7,7 @@ import "base:intrinsics"
|
||||
import "core:sys/linux"
|
||||
|
||||
@(init, private)
|
||||
init_cpu_features :: proc() {
|
||||
init_cpu_features :: proc "contextless" () {
|
||||
_features: CPU_Features
|
||||
defer cpu.features = _features
|
||||
|
||||
@@ -85,7 +85,7 @@ init_cpu_features :: proc() {
|
||||
return
|
||||
}
|
||||
|
||||
assert(pairs[0].key == .IMA_EXT_0)
|
||||
assert_contextless(pairs[0].key == .IMA_EXT_0)
|
||||
exts := pairs[0].value.ima_ext_0
|
||||
exts -= { .FD, .C, .V }
|
||||
_features += transmute(CPU_Features)exts
|
||||
@@ -97,7 +97,7 @@ init_cpu_features :: proc() {
|
||||
_features += { .Misaligned_Supported }
|
||||
}
|
||||
} else {
|
||||
assert(pairs[1].key == .CPUPERF_0)
|
||||
assert_contextless(pairs[1].key == .CPUPERF_0)
|
||||
if .FAST in pairs[1].value.cpu_perf_0 {
|
||||
_features += { .Misaligned_Supported, .Misaligned_Fast }
|
||||
} else if .UNSUPPORTED not_in pairs[1].value.cpu_perf_0 {
|
||||
@@ -108,6 +108,6 @@ init_cpu_features :: proc() {
|
||||
}
|
||||
|
||||
@(init, private)
|
||||
init_cpu_name :: proc() {
|
||||
init_cpu_name :: proc "contextless" () {
|
||||
cpu.name = "RISCV64"
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package unix
|
||||
|
||||
import "base:intrinsics"
|
||||
|
||||
sysctl :: proc(mib: []i32, val: ^$T) -> (ok: bool) {
|
||||
sysctl :: proc "contextless" (mib: []i32, val: ^$T) -> (ok: bool) {
|
||||
mib := mib
|
||||
result_size := u64(size_of(T))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user