[Bug 16735] New: ddraw/device: ‘oldcw’ is used uninitialized , needs FPUPRESERVE implemented

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Jan 2 21:29:07 CST 2009


http://bugs.winehq.org/show_bug.cgi?id=16735

           Summary: ddraw/device: ‘oldcw’ is used uninitialized, needs
                    FPUPRESERVE implemented
           Product: Wine
           Version: 1.1.12
          Platform: Macintosh
        OS/Version: Linux
            Status: NEW
          Keywords: source
          Severity: minor
          Priority: P2
         Component: build-env
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: austinenglish at gmail.com


austin at ubuntu-ppc:~/wine-git/dlls/ddraw$ make
gcc -c -I. -I. -I../../include -I../../include  -D__WINESRC__  -D_REENTRANT
-fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement
-Wwrite-strings -Wtype-limits -Wpointer-arith  -g -O2  -o device.o device.c
device.c: In function ‘d3d_fpu_setup’:
device.c:92: warning: ‘oldcw’ is used uninitialized in this function
../../tools/winegcc/winegcc -B../../tools/winebuild -shared ./ddraw.spec
clipper.o ddraw.o ddraw_thunks.o device.o direct3d.o executebuffer.o gamma.o
light.o main.o material.o palette.o parent.o regsvr.o surface.o
surface_thunks.o texture.o utils.o vertexbuffer.o viewport.o     version.res 
-o ddraw.dll.so  -ldxguid -luuid -lole32 -luser32 -lgdi32 -ladvapi32 -lkernel32
-lntdll  ../../libs/port/libwine_port.a   

Looking at the code:
static inline void set_fpu_control_word(WORD fpucw)
{
#if defined(__i386__) && defined(__GNUC__)
    __asm__ volatile ("fldcw %0" : : "m" (fpucw));
#elif defined(__i386__) && defined(_MSC_VER)
    __asm fldcw fpucw;
#endif
}

static inline WORD d3d_fpu_setup(void)
{
    WORD oldcw;

#if defined(__i386__) && defined(__GNUC__)
    __asm__ volatile ("fnstcw %0" : "=m" (oldcw));
#elif defined(__i386__) && defined(_MSC_VER)
    __asm fnstcw oldcw;
#else
    static BOOL warned = FALSE;
    if(!warned)
    {
        FIXME("FPUPRESERVE not implemented for this platform / compiler\n");
        warned = TRUE;
    }
#endif

Looks like FPUPRESERVE needs to be implemented for PPC (and x86-64 as well?).


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the wine-bugs mailing list