From ab8e44a55d1655beecac139b44f1e1124bc1df78 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Sat, 1 Nov 2025 16:50:38 +0000 Subject: [PATCH] fix watcom feature detect git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@563 b9cfdab3-6d41-4d17-bbe4-086880011989 --- src/math/math.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/math/math.c b/src/math/math.c index d6c36c5..470ce46 100644 --- a/src/math/math.c +++ b/src/math/math.c @@ -38,13 +38,14 @@ switch(ty) { return vec; } -#if defined(__WATCOMC__) || defined(__i386__) || defined(__amd64__) +#if defined(MwLLMathMMX) static MwU32 getCPUFeatures(void) { MwU32 _eax = 1; MwU32 _edx; #ifdef __WATCOMC__ __asm { + mov eax, _eax cpuid mov _eax, eax mov _edx, edx @@ -70,13 +71,13 @@ static MwLLMathVTable* getMultiTable(int ty) { } static MwLLMathVTable* multiTableSetupAndGet(int ty) { -#if defined(__WATCOMC__) || defined(__i386__) || defined(__amd64__) +#if defined(MwLLMathMMX) MwU32 features; #endif mwLLMultiTable = default_multi_table(); -#if defined(__WATCOMC__) || defined(__i386__) || defined(__amd64__) +#if defined(MwLLMathMMX) features = getCPUFeatures(); printf("Avaliable x86_64 Features:\n"); printf("\tMMX: %s\n", features & FEATX86_MMX ? "true" : "false");