tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

ShowSSEConfig.cpp (2886B)


      1 /* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 #include "mozilla/SSE.h"
      7 #include <stdio.h>
      8 
      9 #if defined(XP_WIN)
     10 int wmain()
     11 #else
     12 int main()
     13 #endif  // defined(XP_WIN)
     14 {
     15  printf("CPUID detection present: %s\n",
     16 #ifdef MOZILLA_SSE_HAVE_CPUID_DETECTION
     17         "yes"
     18 #else
     19         "no"
     20 #endif
     21  );
     22 
     23 #ifdef MOZILLA_COMPILE_WITH_MMX
     24 #  define COMPILE_MMX_STRING "Y"
     25 #else
     26 #  define COMPILE_MMX_STRING "-"
     27 #endif
     28 #ifdef MOZILLA_PRESUME_MMX
     29 #  define PRESUME_MMX_STRING "Y"
     30 #else
     31 #  define PRESUME_MMX_STRING "-"
     32 #endif
     33 
     34 #ifdef MOZILLA_COMPILE_WITH_SSE
     35 #  define COMPILE_SSE_STRING "Y"
     36 #else
     37 #  define COMPILE_SSE_STRING "-"
     38 #endif
     39 #ifdef MOZILLA_PRESUME_SSE
     40 #  define PRESUME_SSE_STRING "Y"
     41 #else
     42 #  define PRESUME_SSE_STRING "-"
     43 #endif
     44 
     45 #ifdef MOZILLA_COMPILE_WITH_SSE2
     46 #  define COMPILE_SSE2_STRING "Y"
     47 #else
     48 #  define COMPILE_SSE2_STRING "-"
     49 #endif
     50 #ifdef MOZILLA_PRESUME_SSE2
     51 #  define PRESUME_SSE2_STRING "Y"
     52 #else
     53 #  define PRESUME_SSE2_STRING "-"
     54 #endif
     55 
     56 #ifdef MOZILLA_COMPILE_WITH_SSE3
     57 #  define COMPILE_SSE3_STRING "Y"
     58 #else
     59 #  define COMPILE_SSE3_STRING "-"
     60 #endif
     61 #ifdef MOZILLA_PRESUME_SSE3
     62 #  define PRESUME_SSE3_STRING "Y"
     63 #else
     64 #  define PRESUME_SSE3_STRING "-"
     65 #endif
     66 
     67 #ifdef MOZILLA_COMPILE_WITH_SSSE3
     68 #  define COMPILE_SSSE3_STRING "Y"
     69 #else
     70 #  define COMPILE_SSSE3_STRING "-"
     71 #endif
     72 #ifdef MOZILLA_PRESUME_SSSE3
     73 #  define PRESUME_SSSE3_STRING "Y"
     74 #else
     75 #  define PRESUME_SSSE3_STRING "-"
     76 #endif
     77 
     78 #ifdef MOZILLA_COMPILE_WITH_SSE4A
     79 #  define COMPILE_SSE4A_STRING "Y"
     80 #else
     81 #  define COMPILE_SSE4A_STRING "-"
     82 #endif
     83 #ifdef MOZILLA_PRESUME_SSE4A
     84 #  define PRESUME_SSE4A_STRING "Y"
     85 #else
     86 #  define PRESUME_SSE4A_STRING "-"
     87 #endif
     88 
     89 #ifdef MOZILLA_COMPILE_WITH_SSE4_1
     90 #  define COMPILE_SSE4_1_STRING "Y"
     91 #else
     92 #  define COMPILE_SSE4_1_STRING "-"
     93 #endif
     94 #ifdef MOZILLA_PRESUME_SSE4_1
     95 #  define PRESUME_SSE4_1_STRING "Y"
     96 #else
     97 #  define PRESUME_SSE4_1_STRING "-"
     98 #endif
     99 
    100 #ifdef MOZILLA_COMPILE_WITH_SSE4_2
    101 #  define COMPILE_SSE4_2_STRING "Y"
    102 #else
    103 #  define COMPILE_SSE4_2_STRING "-"
    104 #endif
    105 #ifdef MOZILLA_PRESUME_SSE4_2
    106 #  define PRESUME_SSE4_2_STRING "Y"
    107 #else
    108 #  define PRESUME_SSE4_2_STRING "-"
    109 #endif
    110 
    111  printf("Feature Presume Compile Support  Use\n");
    112 #define SHOW_INFO(featurelc_, featureuc_)                              \
    113  printf("%7s    %1s       %1s       %1s\n", #featurelc_,              \
    114         PRESUME_##featureuc_##_STRING, COMPILE_##featureuc_##_STRING, \
    115         (mozilla::supports_##featurelc_() ? "Y" : "-"));
    116  SHOW_INFO(mmx, MMX)
    117  SHOW_INFO(sse, SSE)
    118  SHOW_INFO(sse2, SSE2)
    119  SHOW_INFO(sse3, SSE3)
    120  SHOW_INFO(ssse3, SSSE3)
    121  SHOW_INFO(sse4a, SSE4A)
    122  SHOW_INFO(sse4_1, SSE4_1)
    123  SHOW_INFO(sse4_2, SSE4_2)
    124  return 0;
    125 }