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

Unified Diff: test/win/compiler-flags/enable-enhanced-instruction-set.cc

Issue 195283002: Add support for VCCLCompilerTool EnableEnhancedInstructionSet setting. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 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
Index: test/win/compiler-flags/enable-enhanced-instruction-set.cc
diff --git a/test/win/compiler-flags/enable-enhanced-instruction-set.cc b/test/win/compiler-flags/enable-enhanced-instruction-set.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2491f160a1213b1ac80209944901bbfe8f2b0e04
--- /dev/null
+++ b/test/win/compiler-flags/enable-enhanced-instruction-set.cc
@@ -0,0 +1,26 @@
+// Copyright (c) 2014 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <stdio.h>
+
+static const char* GetArchOption() {
+#if _M_IX86_FP == 0
+ return "IA32";
+#elif _M_IX86_FP == 1
+ return "SSE";
+#elif _M_IX86_FP == 2
+# if !defined(__AVX__)
+ return "SSE2";
+# else
+ return "AVX";
+# endif
+#else
+ return "UNSUPPORTED OPTION";
+#endif
+}
+
+int main() {
+ printf("/arch:%s\n", GetArchOption());
+ return 0;
+}

Powered by Google App Engine
This is Rietveld 408576698