1 /* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is ShowSSEConfig.cpp.
17 * The Initial Developer of the Original Code is the Mozilla Foundation.
18 * Portions created by the Initial Developer are Copyright (C) 2009
19 * the Initial Developer. All Rights Reserved.
22 * L. David Baron <dbaron@dbaron.org>, Mozilla Corporation (original author)
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
38 #include "mozilla/SSE.h"
43 printf("CPUID detection present: %s\n",
44 #ifdef MOZILLA_SSE_HAVE_CPUID_DETECTION
51 #ifdef MOZILLA_COMPILE_WITH_MMX
52 #define COMPILE_MMX_STRING "Y"
54 #define COMPILE_MMX_STRING "-"
56 #ifdef MOZILLA_PRESUME_MMX
57 #define PRESUME_MMX_STRING "Y"
59 #define PRESUME_MMX_STRING "-"
62 #ifdef MOZILLA_COMPILE_WITH_SSE
63 #define COMPILE_SSE_STRING "Y"
65 #define COMPILE_SSE_STRING "-"
67 #ifdef MOZILLA_PRESUME_SSE
68 #define PRESUME_SSE_STRING "Y"
70 #define PRESUME_SSE_STRING "-"
73 #ifdef MOZILLA_COMPILE_WITH_SSE2
74 #define COMPILE_SSE2_STRING "Y"
76 #define COMPILE_SSE2_STRING "-"
78 #ifdef MOZILLA_PRESUME_SSE2
79 #define PRESUME_SSE2_STRING "Y"
81 #define PRESUME_SSE2_STRING "-"
84 #ifdef MOZILLA_COMPILE_WITH_SSE3
85 #define COMPILE_SSE3_STRING "Y"
87 #define COMPILE_SSE3_STRING "-"
89 #ifdef MOZILLA_PRESUME_SSE3
90 #define PRESUME_SSE3_STRING "Y"
92 #define PRESUME_SSE3_STRING "-"
95 #ifdef MOZILLA_COMPILE_WITH_SSSE3
96 #define COMPILE_SSSE3_STRING "Y"
98 #define COMPILE_SSSE3_STRING "-"
100 #ifdef MOZILLA_PRESUME_SSSE3
101 #define PRESUME_SSSE3_STRING "Y"
103 #define PRESUME_SSSE3_STRING "-"
106 #ifdef MOZILLA_COMPILE_WITH_SSE4A
107 #define COMPILE_SSE4A_STRING "Y"
109 #define COMPILE_SSE4A_STRING "-"
111 #ifdef MOZILLA_PRESUME_SSE4A
112 #define PRESUME_SSE4A_STRING "Y"
114 #define PRESUME_SSE4A_STRING "-"
117 #ifdef MOZILLA_COMPILE_WITH_SSE4_1
118 #define COMPILE_SSE4_1_STRING "Y"
120 #define COMPILE_SSE4_1_STRING "-"
122 #ifdef MOZILLA_PRESUME_SSE4_1
123 #define PRESUME_SSE4_1_STRING "Y"
125 #define PRESUME_SSE4_1_STRING "-"
128 #ifdef MOZILLA_COMPILE_WITH_SSE4_2
129 #define COMPILE_SSE4_2_STRING "Y"
131 #define COMPILE_SSE4_2_STRING "-"
133 #ifdef MOZILLA_PRESUME_SSE4_2
134 #define PRESUME_SSE4_2_STRING "Y"
136 #define PRESUME_SSE4_2_STRING "-"
139 printf("Feature Presume Compile Support Use\n");
140 #define SHOW_INFO(featurelc_, featureuc_) \
141 printf( "%7s %1s %1s %1s %1s\n", \
143 PRESUME_##featureuc_##_STRING, \
144 COMPILE_##featureuc_##_STRING, \
145 (mozilla::supports_##featurelc_() ? "Y" : "-"), \
146 (mozilla::use_##featurelc_() ? "Y" : "-"));
149 SHOW_INFO(sse2
, SSE2
)
150 SHOW_INFO(sse3
, SSE3
)
151 SHOW_INFO(ssse3
, SSSE3
)
152 SHOW_INFO(sse4a
, SSE4A
)
153 SHOW_INFO(sse4_1
, SSE4_1
)
154 SHOW_INFO(sse4_2
, SSE4_2
)