kernel32/tests: Run test_thread_fpu_cw on x86 MSVC builds.

This commit is contained in:
Thomas Faber 2015-09-01 16:14:54 +02:00 committed by Alexandre Julliard
parent 615ef98555
commit 9165dbbffc
1 changed files with 11 additions and 2 deletions

View File

@ -1408,16 +1408,25 @@ static void test_ThreadErrorMode(void)
pSetThreadErrorMode(oldmode, NULL);
}
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
#if (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))) || (defined(_MSC_VER) && defined(__i386__))
static inline void set_fpu_cw(WORD cw)
{
#ifdef _MSC_VER
__asm { fnclex }
__asm { fldcw [cw] }
#else
__asm__ volatile ("fnclex; fldcw %0" : : "m" (cw));
#endif
}
static inline WORD get_fpu_cw(void)
{
WORD cw = 0;
#ifdef _MSC_VER
__asm { fnstcw [cw] }
#else
__asm__ volatile ("fnstcw %0" : "=m" (cw));
#endif
return cw;
}
@ -1888,7 +1897,7 @@ START_TEST(thread)
test_RegisterWaitForSingleObject();
test_TLS();
test_ThreadErrorMode();
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
#if (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))) || (defined(_MSC_VER) && defined(__i386__))
test_thread_fpu_cw();
#endif
test_thread_actctx();