mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-05 09:00:54 +00:00
fix watcom feature detect
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@563 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -38,13 +38,14 @@ switch(ty) {
|
|||||||
return vec;
|
return vec;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__WATCOMC__) || defined(__i386__) || defined(__amd64__)
|
#if defined(MwLLMathMMX)
|
||||||
static MwU32 getCPUFeatures(void) {
|
static MwU32 getCPUFeatures(void) {
|
||||||
MwU32 _eax = 1;
|
MwU32 _eax = 1;
|
||||||
MwU32 _edx;
|
MwU32 _edx;
|
||||||
|
|
||||||
#ifdef __WATCOMC__
|
#ifdef __WATCOMC__
|
||||||
__asm {
|
__asm {
|
||||||
|
mov eax, _eax
|
||||||
cpuid
|
cpuid
|
||||||
mov _eax, eax
|
mov _eax, eax
|
||||||
mov _edx, edx
|
mov _edx, edx
|
||||||
@@ -70,13 +71,13 @@ static MwLLMathVTable* getMultiTable(int ty) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static MwLLMathVTable* multiTableSetupAndGet(int ty) {
|
static MwLLMathVTable* multiTableSetupAndGet(int ty) {
|
||||||
#if defined(__WATCOMC__) || defined(__i386__) || defined(__amd64__)
|
#if defined(MwLLMathMMX)
|
||||||
MwU32 features;
|
MwU32 features;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mwLLMultiTable = default_multi_table();
|
mwLLMultiTable = default_multi_table();
|
||||||
|
|
||||||
#if defined(__WATCOMC__) || defined(__i386__) || defined(__amd64__)
|
#if defined(MwLLMathMMX)
|
||||||
features = getCPUFeatures();
|
features = getCPUFeatures();
|
||||||
printf("Avaliable x86_64 Features:\n");
|
printf("Avaliable x86_64 Features:\n");
|
||||||
printf("\tMMX: %s\n", features & FEATX86_MMX ? "true" : "false");
|
printf("\tMMX: %s\n", features & FEATX86_MMX ? "true" : "false");
|
||||||
|
|||||||
Reference in New Issue
Block a user