[sys/info] Add OpenBSD detection support.

This commit is contained in:
Jeroen van Rijn
2022-09-04 20:37:38 +02:00
parent 2d12ba3ac0
commit 426f02906b
6 changed files with 127 additions and 3 deletions
+2 -2
View File
@@ -67,8 +67,8 @@ init_cpu_features :: proc "c" () {
try_set(&set, .os_xsave, 27, ecx1)
try_set(&set, .rdrand, 30, ecx1)
when ODIN_OS == .FreeBSD {
// xgetbv is an illegal instruction under FreeBSD 13
when ODIN_OS == .FreeBSD || ODIN_OS == .OpenBSD {
// xgetbv is an illegal instruction under FreeBSD 13 & OpenBSD 7.1
// return before probing further
cpu_features = set
return