summaryrefslogtreecommitdiffstats
path: root/scons/gallium.py
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-10-14 16:16:40 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-10-14 17:24:21 +0100
commit5ba645f0fbcb16ac97064c3d25d5966645410a44 (patch)
tree900f6fa948616b165c6a402a3ba9ec9e23f55206 /scons/gallium.py
parent9fd7e9ef05955834e3c4de8a1dfa7ea1a868d762 (diff)
downloadexternal_mesa3d-5ba645f0fbcb16ac97064c3d25d5966645410a44.zip
external_mesa3d-5ba645f0fbcb16ac97064c3d25d5966645410a44.tar.gz
external_mesa3d-5ba645f0fbcb16ac97064c3d25d5966645410a44.tar.bz2
scons: Disable SSE intrinsics on MinGW.
-mstackrealign causes stack corruption on MinGW. And without it the ability to use SSE instrinsics goes down the drain. Even if we use __attribute__((force_align_arg_pointer)) for the functions we explicitly use SSE instrinsics, the SSE code automatically generated by gcc will cause assertion failures. What a nightmare. Thankfully LLVM gets this right, so all runtime generated SSE code just works. rtasm code doesn't assume 16byte alignment. Therefore the bulk of our performance sensitive code is not affected by this. Still, intrinsics can be convenient, and it would be nice to get this working again some day, sp will try to get a reduced test case.
Diffstat (limited to 'scons/gallium.py')
-rw-r--r--scons/gallium.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/scons/gallium.py b/scons/gallium.py
index 38782ac..587294a 100644
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -343,10 +343,18 @@ def generate(env):
ccflags += [
'-m32',
#'-march=pentium4',
- '-mmmx', '-msse', '-msse2', # enable SIMD intrinsics
- '-mstackrealign', # ensure stack is aligned -- do not enabled -msse without it!
#'-mfpmath=sse',
]
+ if platform != 'windows':
+ # XXX: -mstackrealign causes stack corruption on MinGW. Ditto
+ # for -mincoming-stack-boundary=2. Still enable it on other
+ # platforms for now, but we can't rely on it for cross platform
+ # code. We have to use __attribute__((force_align_arg_pointer))
+ # instead.
+ ccflags += [
+ '-mmmx', '-msse', '-msse2', # enable SIMD intrinsics
+ '-mstackrealign', # ensure stack is aligned
+ ]
if env['machine'] == 'x86_64':
ccflags += ['-m64']
# See also: