summaryrefslogtreecommitdiff
path: root/deps/gyp/test/win/compiler-flags/enable-enhanced-instruction-set.cc
blob: 432ef54eda2be556c5e43deee232ed23c431315f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// 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(__AVX2__)
  return "AVX2";
#  elif defined(__AVX__)
  return "AVX";
#  else
  return "SSE2";
#  endif
#else
  return "UNSUPPORTED OPTION";
#endif
}

int main() {
  printf("/arch:%s\n", GetArchOption());
  return 0;
}