d3d8: Implement FPUSETUP for msvc.
This commit is contained in:
parent
e1d92059ea
commit
14a245690d
|
@ -3032,6 +3032,11 @@ static void setup_fpu(void)
|
|||
__asm__ volatile ("fnstcw %0" : "=m" (cw));
|
||||
cw = (cw & ~0xf3f) | 0x3f;
|
||||
__asm__ volatile ("fldcw %0" : : "m" (cw));
|
||||
#elif defined(__i386__) && defined(_MSC_VER)
|
||||
WORD cw;
|
||||
__asm fnstcw cw;
|
||||
cw = (cw & ~0xf3f) | 0x3f;
|
||||
__asm fldcw cw;
|
||||
#else
|
||||
FIXME("FPU setup not implemented for this platform.\n");
|
||||
#endif
|
||||
|
|
|
@ -2416,8 +2416,13 @@ done:
|
|||
static inline void set_fpu_cw(WORD cw)
|
||||
{
|
||||
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
|
||||
#define D3D8_TEST_SET_FPU_CW 1
|
||||
__asm__ volatile ("fnclex");
|
||||
__asm__ volatile ("fldcw %0" : : "m" (cw));
|
||||
#elif defined(__i386__) && defined(_MSC_VER)
|
||||
#define D3D8_TEST_SET_FPU_CW 1
|
||||
__asm fnclex;
|
||||
__asm fldcw cw;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -2425,14 +2430,18 @@ static inline WORD get_fpu_cw(void)
|
|||
{
|
||||
WORD cw = 0;
|
||||
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
|
||||
#define D3D8_TEST_GET_FPU_CW 1
|
||||
__asm__ volatile ("fnstcw %0" : "=m" (cw));
|
||||
#elif defined(__i386__) && defined(_MSC_VER)
|
||||
#define D3D8_TEST_GET_FPU_CW 1
|
||||
__asm fnstcw cw;
|
||||
#endif
|
||||
return cw;
|
||||
}
|
||||
|
||||
static void test_fpu_setup(void)
|
||||
{
|
||||
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
|
||||
#if defined(D3D8_TEST_SET_FPU_CW) && defined(D3D8_TEST_GET_FPU_CW)
|
||||
D3DPRESENT_PARAMETERS present_parameters;
|
||||
IDirect3DDevice8 *device;
|
||||
D3DDISPLAYMODE d3ddm;
|
||||
|
|
Loading…
Reference in New Issue