Skip to content

Commit 1a04412

Browse files
committed
win32: use posix code in vcpuid.c instead of windows one on i686 MinGW to avoid MSVC asm code
1 parent e369c61 commit 1a04412

File tree

1 file changed

+3
-3
lines changed
  • src/trusted/platform_qualify/arch/x86

1 file changed

+3
-3
lines changed

src/trusted/platform_qualify/arch/x86/vcpuid.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const int kMagicConst_ROUNDSS = 0xc0000000;
3838
const int kMagicConst_POPCNT = 13;
3939
const int kMagicConst_CRC32 = 0xb906c3ea;
4040

41-
#if !(NACL_WINDOWS && (NACL_BUILD_SUBARCH == 64))
41+
#if !((NACL_WINDOWS || !defined(_MSC_VER)) && (NACL_BUILD_SUBARCH == 64))
4242
static int asm_HasMMX(void) {
4343
volatile int before, after;
4444
before = kMagicConst;
@@ -386,13 +386,13 @@ static int asm_HasCX8(void) {
386386
#endif /* 0 */
387387
#endif /* 64-bit Windows */
388388

389-
#if NACL_WINDOWS && (NACL_BUILD_SUBARCH == 64)
389+
#if !(NACL_WINDOWS && (NACL_BUILD_SUBARCH == 64)) || !defined(MSC_VER)
390390
static int CheckCPUFeatureDetection(NaClCPUFeaturesX86 *cpuf) {
391391
/* Unfortunately the asm_ tests will not work on 64-bit Windows */
392392
return 0;
393393
}
394394
#else
395-
#if (NACL_LINUX || NACL_OSX)
395+
#if (NACL_LINUX || NACL_OSX || (NACL_WINDOWS && !defined(MSC_VER))
396396
/* Linux/MacOS signal handling code, for trapping illegal instruction faults */
397397
static int sawbadinstruction = 0;
398398
static struct sigaction crash_detect;

0 commit comments

Comments
 (0)