From dde599f48f26b810ddba59ba23e14aec3dbb8cca Mon Sep 17 00:00:00 2001 From: Jean-Luc Duprat Date: Tue, 10 Jul 2012 16:39:18 -0700 Subject: [PATCH] run_tests.py now picks the ISA via a -m flag based on the target selected, rather than always picking -msse4.2; this is needed because -msse4.2 is not supported on KNC. --- run_tests.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/run_tests.py b/run_tests.py index 03fda1ad..4901acad 100755 --- a/run_tests.py +++ b/run_tests.py @@ -263,8 +263,18 @@ def run_test(filename): gcc_arch = '-m32' else: gcc_arch = '-m64' - cc_cmd = "%s -O2 -msse4.2 -I. %s test_static.cpp -DTEST_SIG=%d %s -o %s" % \ - (options.compiler_exe, gcc_arch, match, obj_name, exe_name) + + if options.target == 'sse2' or options.target == 'sse2-x2': + gcc_isa = '-msse3' + if options.target == 'sse4' or options.target == 'sse4-x2' or options.target == 'generic-4': + gcc_isa = '-msse4.2' + if options.target == 'avx' or options.target == 'avx-x2' or options.target == 'generic-16': + gcc_isa = '-mavx' + if options.target == 'generic-16' or options.target == 'generic-32' or options.target == 'generic-64': + gcc_isa = '-mmic' + + cc_cmd = "%s -O2 -I. %s %s test_static.cpp -DTEST_SIG=%d %s -o %s" % \ + (options.compiler_exe, gcc_arch, gcc_isa, match, obj_name, exe_name) if platform.system() == 'Darwin': cc_cmd += ' -Wl,-no_pie' if should_fail: