mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:52:56 +00:00
[KERNEL32_WINETEST]
- Enable test_thread_fpu_cw on MSVC builds svn path=/trunk/; revision=68926
This commit is contained in:
parent
075ba93d0c
commit
743db122d7
1 changed files with 11 additions and 2 deletions
|
@ -1397,16 +1397,25 @@ static void test_ThreadErrorMode(void)
|
||||||
pSetThreadErrorMode(oldmode, NULL);
|
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)
|
static inline void set_fpu_cw(WORD cw)
|
||||||
{
|
{
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
__asm { fnclex }
|
||||||
|
__asm { fldcw [cw] }
|
||||||
|
#else
|
||||||
__asm__ volatile ("fnclex; fldcw %0" : : "m" (cw));
|
__asm__ volatile ("fnclex; fldcw %0" : : "m" (cw));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline WORD get_fpu_cw(void)
|
static inline WORD get_fpu_cw(void)
|
||||||
{
|
{
|
||||||
WORD cw = 0;
|
WORD cw = 0;
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
__asm { fnstcw [cw] }
|
||||||
|
#else
|
||||||
__asm__ volatile ("fnstcw %0" : "=m" (cw));
|
__asm__ volatile ("fnstcw %0" : "=m" (cw));
|
||||||
|
#endif
|
||||||
return cw;
|
return cw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1769,7 +1778,7 @@ START_TEST(thread)
|
||||||
test_RegisterWaitForSingleObject();
|
test_RegisterWaitForSingleObject();
|
||||||
test_TLS();
|
test_TLS();
|
||||||
test_ThreadErrorMode();
|
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();
|
test_thread_fpu_cw();
|
||||||
#endif
|
#endif
|
||||||
test_thread_actctx();
|
test_thread_actctx();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue