os/2: attempt to get cpuid support on OpenWatcom builds.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 02 Aug 2017 16:34:02 -0400
changeset 1528 e7f288b1ff5a
parent 1527 9440dcd3dcd0
child 1529 a8ae97afbbef
os/2: attempt to get cpuid support on OpenWatcom builds.
src/physfs_lzmasdk.h
--- a/src/physfs_lzmasdk.h	Wed Aug 02 13:06:56 2017 -0400
+++ b/src/physfs_lzmasdk.h	Wed Aug 02 16:34:02 2017 -0400
@@ -1450,6 +1450,19 @@
 #define CHECK_CPUID_IS_SUPPORTED
 #endif
 
+#if defined(__WATCOMC__)
+static void __cpuid( int cpuinfo[4], uint32_t infotype );
+#pragma aux __cpuid =      \
+    ".586"                \
+    "cpuid"               \
+    "mov  [esi+0],eax"    \
+    "mov  [esi+4],ebx"    \
+    "mov  [esi+8],ecx"    \
+    "mov  [esi+12],edx"   \
+    parm [esi] [eax] modify [ebx ecx edx];
+#endif
+
+
 static void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d)
 {
   #ifdef USE_ASM
@@ -1498,9 +1511,6 @@
 
   #endif
 
-  #elif defined(__WATCOMC__)
-  *a = *b = *c = *d = 0;  /* !!! FIXME: oh well for now. */
-
   #else
 
   int CPUInfo[4];