scons: Re-enable SSE on MinGW.

It seems to be working correctly with gcc 4.4, and enabling it allows to
test some of the llvmpipe instrinsics on Windows.
This commit is contained in:
José Fonseca
2010-09-02 13:44:29 +01:00
parent 6ed726b8fc
commit 30c5d5d9d8

View File

@@ -271,24 +271,24 @@ def generate(env):
ccflags += [ ccflags += [
'-m32', '-m32',
#'-march=pentium4', #'-march=pentium4',
#'-mfpmath=sse',
] ]
if platform != 'windows': if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.2'):
# XXX: -mstackrealign causes stack corruption on MinGW. Ditto # NOTE: We need to ensure stack is realigned given that we
# for -mincoming-stack-boundary=2. Still enable it on other # produce shared objects, and have no control over the stack
# platforms for now, but we can't rely on it for cross platform # alignment policy of the application. Therefore we need
# code. We have to use __attribute__((force_align_arg_pointer)) # -mstackrealign ore -mincoming-stack-boundary=2.
# instead. #
# XXX: We could have SSE without -mstackrealign if we always used
# __attribute__((force_align_arg_pointer)), but that's not
# always the case.
ccflags += [ ccflags += [
'-mstackrealign', # ensure stack is aligned
'-mmmx', '-msse', '-msse2', # enable SIMD intrinsics '-mmmx', '-msse', '-msse2', # enable SIMD intrinsics
#'-mfpmath=sse',
] ]
if platform in ['windows', 'darwin']: if platform in ['windows', 'darwin']:
# Workaround http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216 # Workaround http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216
ccflags += ['-fno-common'] ccflags += ['-fno-common']
if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.2'):
ccflags += [
'-mstackrealign', # ensure stack is aligned
]
if env['machine'] == 'x86_64': if env['machine'] == 'x86_64':
ccflags += ['-m64'] ccflags += ['-m64']
if platform == 'darwin': if platform == 'darwin':