Selaa lähdekoodia

Update arch enum

gingerBill 3 vuotta sitten
vanhempi
commit
be8de4a1ff

+ 1 - 0
core/runtime/core.odin

@@ -415,6 +415,7 @@ Odin_OS_Type :: type_of(ODIN_OS)
 		Unknown,
 		Unknown,
 		amd64,
 		amd64,
 		i386,
 		i386,
+		arm32,
 		arm64,
 		arm64,
 		wasm32,
 		wasm32,
 		wasm64,
 		wasm64,

+ 4 - 2
core/runtime/core_builtin.odin

@@ -631,13 +631,15 @@ assert :: proc(condition: bool, message := "", loc := #caller_location) {
 		// to improve performance to make the CPU not
 		// to improve performance to make the CPU not
 		// execute speculatively, making it about an order of
 		// execute speculatively, making it about an order of
 		// magnitude faster
 		// magnitude faster
-		proc(message: string, loc: Source_Code_Location) {
+		@(cold)
+		internal :: proc(message: string, loc: Source_Code_Location) {
 			p := context.assertion_failure_proc
 			p := context.assertion_failure_proc
 			if p == nil {
 			if p == nil {
 				p = default_assertion_failure_proc
 				p = default_assertion_failure_proc
 			}
 			}
 			p("runtime assertion", message, loc)
 			p("runtime assertion", message, loc)
-		}(message, loc)
+		}
+		internal(message, loc)
 	}
 	}
 }
 }
 
 

+ 1 - 1
core/sys/unix/syscalls_linux.odin

@@ -1114,7 +1114,7 @@ when ODIN_ARCH == .amd64 {
 	SYS_landlock_add_rule : uintptr : 445
 	SYS_landlock_add_rule : uintptr : 445
 	SYS_landlock_restrict_self : uintptr : 446
 	SYS_landlock_restrict_self : uintptr : 446
 	SYS_memfd_secret : uintptr : 447
 	SYS_memfd_secret : uintptr : 447
-} else when false /*ODIN_ARCH == .arm*/ { // TODO
+} else when ODIN_ARCH == .arm32 { // TODO
 	SYS_restart_syscall : uintptr : 0
 	SYS_restart_syscall : uintptr : 0
 	SYS_exit : uintptr : 1
 	SYS_exit : uintptr : 1
 	SYS_fork : uintptr : 2
 	SYS_fork : uintptr : 2