util: (trivial) fix asm input/output list for fxsave
authorRoland Scheidegger <sroland@vmware.com>
Fri, 9 Aug 2013 15:29:52 +0000 (17:29 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Fri, 9 Aug 2013 15:30:13 +0000 (17:30 +0200)
Otherwise gcc might do very unsafe optimizations, spotted by Uros Bizjak.
Hopefully this time it's finally right?

src/gallium/auxiliary/util/u_cpu_detect.c

index 3b36993dcc1aed232be0adb4e837d4aa6641f184..87ad780951e227bf9afcf42634fef3514b8c8226 100644 (file)
@@ -244,7 +244,7 @@ static INLINE boolean sse2_has_daz(void)
 
    fxarea.mxcsr_mask = 0;
 #if (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO))
-   __asm __volatile ("fxsave %0" :: "m" (fxarea));
+   __asm __volatile ("fxsave %0" : "+m" (fxarea));
 #elif (defined(PIPE_CC_MSVC) || defined(PIPE_CC_ICL))
    _fxsave(&fxarea);
 #endif