Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Unified Diff: tests/simd/nacl.scons

Issue 222483002: PNaCl: Test support for GCC/LLVM vector extensions (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Add TODOs. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pnacl/build.sh ('k') | tests/simd/vector_extension.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/simd/nacl.scons
diff --git a/tests/simd/nacl.scons b/tests/simd/nacl.scons
index 4b0436c11f8424ef37c9f2cdd6e486192ff4edd8..98a890d01c42e618892afe3cdaf8757bcfc2da50 100644
--- a/tests/simd/nacl.scons
+++ b/tests/simd/nacl.scons
@@ -23,6 +23,7 @@ def AddTest(env, src, exit_status='0', golden_file=None, test_suffix='',
node, ['toolchain_tests', 'small_tests'], 'run_' + name + '_test',
is_broken=is_broken)
+c_flags = ['-std=gnu99']
cxx_flags = (['-Wc++11-narrowing', '-std=gnu++11']
if env.Bit('bitcode') else ['-std=gnu++0x'])
@@ -37,13 +38,23 @@ elif env.Bit('target_arm'):
native_flags = ['--target=armv7a-unknown-nacl-gnueabi','-mfloat-abi=hard']
elif env.Bit('target_mips32'):
native_flags = []
-native_env.Append(CCFLAGS=native_flags + cxx_flags)
+native_env.Append(CFLAGS=c_flags)
+native_env.Append(CXXFLAGS=cxx_flags)
+native_env.Append(CCFLAGS=native_flags)
ref_env = env.Clone()
ref_flags = ['-DVREFIMPL']
-ref_env.Append(CCFLAGS=ref_flags + cxx_flags)
+ref_env.Append(CFLAGS=c_flags)
+ref_env.Append(CXXFLAGS=cxx_flags)
+ref_env.Append(CCFLAGS=ref_flags)
# TODO(jfb): The native environment currently doesn't compile.
if env.Bit('bitcode'):
AddTest(native_env, 'simd.cc', test_suffix='_native')
AddTest(ref_env, 'simd.cc', test_suffix='_ref')
+
+# GCC 4.4 doesn't support all features of the vector extensions in C.
+# TODO(jfb) Re-enable testing when we migrate to a newer GCC.
+if env.Bit('bitcode') and env['TOOLCHAIN_FEATURE_VERSION'] >= 5:
+ AddTest(ref_env, 'vector_extension.c',
+ golden_file=ref_env.File('vector_extension.stdout'))
« no previous file with comments | « pnacl/build.sh ('k') | tests/simd/vector_extension.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698