| OLD | NEW |
| 1 // Copyright (c) 2014 Google Inc. All rights reserved. | 1 // Copyright (c) 2014 Google Inc. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdio.h> | 5 #include <stdio.h> |
| 6 | 6 |
| 7 static const char* GetArchOption() { | 7 static const char* GetArchOption() { |
| 8 #if _M_IX86_FP == 0 | 8 #if _M_IX86_FP == 0 |
| 9 return "IA32"; | 9 return "IA32"; |
| 10 #elif _M_IX86_FP == 1 | 10 #elif _M_IX86_FP == 1 |
| 11 return "SSE"; | 11 return "SSE"; |
| 12 #elif _M_IX86_FP == 2 | 12 #elif _M_IX86_FP == 2 |
| 13 # if !defined(__AVX__) | 13 # if defined(__AVX2__) |
| 14 return "AVX2"; |
| 15 # elif defined(__AVX__) |
| 16 return "AVX"; |
| 17 # else |
| 14 return "SSE2"; | 18 return "SSE2"; |
| 15 # else | |
| 16 return "AVX"; | |
| 17 # endif | 19 # endif |
| 18 #else | 20 #else |
| 19 return "UNSUPPORTED OPTION"; | 21 return "UNSUPPORTED OPTION"; |
| 20 #endif | 22 #endif |
| 21 } | 23 } |
| 22 | 24 |
| 23 int main() { | 25 int main() { |
| 24 printf("/arch:%s\n", GetArchOption()); | 26 printf("/arch:%s\n", GetArchOption()); |
| 25 return 0; | 27 return 0; |
| 26 } | 28 } |
| OLD | NEW |