added freebsd, netbsd and openbsd support (#41)
This commit is contained in:
parent
3062efed38
commit
c8954feaa6
38
README.md
38
README.md
@ -25,7 +25,7 @@ int main()
|
|||||||
```
|
```
|
||||||
|
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td>OS</td><td>✅ Windows<br/>✅ Linux<br/>✅ macOS<br/>✅ Android<br/>✅ iOS</td></tr>
|
<tr><td>OS</td><td>✅ Windows<br/>✅ Linux<br/>✅ macOS<br/>✅ Android<br/>✅ iOS<br/>✅ FreeBSD<br/>✅ NetBSD<br/>✅ OpenBSD</td></tr>
|
||||||
<tr><td>Compiler</td><td>✅ GCC<br/>✅ Clang<br/>✅ MSVC<br/>✅ MinGW</td></tr>
|
<tr><td>Compiler</td><td>✅ GCC<br/>✅ Clang<br/>✅ MSVC<br/>✅ MinGW</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@ -197,6 +197,42 @@ avxifma = 0
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>FreeBSD/NetBSD/OpenBSD VM result (x86_64)</summary>
|
||||||
|
|
||||||
|
```
|
||||||
|
mmx = 1
|
||||||
|
sse = 1
|
||||||
|
sse2 = 1
|
||||||
|
sse3 = 1
|
||||||
|
ssse3 = 1
|
||||||
|
sse41 = 1
|
||||||
|
sse42 = 1
|
||||||
|
sse4a = 1
|
||||||
|
xop = 0
|
||||||
|
avx = 1
|
||||||
|
f16c = 1
|
||||||
|
fma = 1
|
||||||
|
fma4 = 0
|
||||||
|
avx2 = 1
|
||||||
|
avx512f = 0
|
||||||
|
avx512bw = 0
|
||||||
|
avx512cd = 0
|
||||||
|
avx512dq = 0
|
||||||
|
avx512vl = 0
|
||||||
|
avx512vnni = 0
|
||||||
|
avx512bf16 = 0
|
||||||
|
avx512ifma = 0
|
||||||
|
avx512vbmi = 0
|
||||||
|
avx512vbmi2 = 0
|
||||||
|
avx512fp16 = 0
|
||||||
|
avxvnni = 0
|
||||||
|
avxvnniint8 = 0
|
||||||
|
avxifma = 0
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
6
ruapu.h
6
ruapu.h
@ -70,7 +70,7 @@ static int ruapu_detect_isa(const void* some_inst)
|
|||||||
}
|
}
|
||||||
#endif // WINAPI_FAMILY == WINAPI_FAMILY_APP
|
#endif // WINAPI_FAMILY == WINAPI_FAMILY_APP
|
||||||
|
|
||||||
#elif defined __ANDROID__ || defined __linux__ || defined __APPLE__
|
#elif defined __ANDROID__ || defined __linux__ || defined __APPLE__ || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
static int g_ruapu_sigill_caught = 0;
|
static int g_ruapu_sigill_caught = 0;
|
||||||
@ -108,7 +108,7 @@ static int ruapu_detect_isa(ruapu_some_inst some_inst)
|
|||||||
return g_ruapu_sigill_caught ? 0 : 1;
|
return g_ruapu_sigill_caught ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // defined _WIN32 || defined __ANDROID__ || defined __linux__ || defined __APPLE__
|
#endif // defined _WIN32 || defined __ANDROID__ || defined __linux__ || defined __APPLE__ || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__
|
||||||
|
|
||||||
#if defined _WIN32
|
#if defined _WIN32
|
||||||
|
|
||||||
@ -355,7 +355,7 @@ RUAPU_ISAENTRY(zmmul)
|
|||||||
|
|
||||||
void ruapu_init()
|
void ruapu_init()
|
||||||
{
|
{
|
||||||
#if defined _WIN32 || defined __ANDROID__ || defined __linux__ || defined __APPLE__
|
#if defined _WIN32 || defined __ANDROID__ || defined __linux__ || defined __APPLE__ || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__
|
||||||
for (size_t i = 0; i < sizeof(g_ruapu_isa_map) / sizeof(g_ruapu_isa_map[0]); i++)
|
for (size_t i = 0; i < sizeof(g_ruapu_isa_map) / sizeof(g_ruapu_isa_map[0]); i++)
|
||||||
{
|
{
|
||||||
g_ruapu_isa_map[i].capable = ruapu_detect_isa(g_ruapu_isa_map[i].inst);
|
g_ruapu_isa_map[i].capable = ruapu_detect_isa(g_ruapu_isa_map[i].inst);
|
||||||
|
Loading…
Reference in New Issue
Block a user