Skip to content

Commit

Permalink
os/2: attempt to get cpuid support on OpenWatcom builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Aug 2, 2017
1 parent 1e850d3 commit 3f9ffdd
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/physfs_lzmasdk.h
Expand Up @@ -1450,6 +1450,19 @@ static UInt32 CheckFlag(UInt32 flag)
#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
Expand Down Expand Up @@ -1498,9 +1511,6 @@ static void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d)

#endif

#elif defined(__WATCOMC__)
*a = *b = *c = *d = 0; /* !!! FIXME: oh well for now. */

#else

int CPUInfo[4];
Expand Down

0 comments on commit 3f9ffdd

Please sign in to comment.