michael@0: /* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "mozilla/SSE.h" michael@0: #include michael@0: michael@0: int main() michael@0: { michael@0: printf("CPUID detection present: %s\n", michael@0: #ifdef MOZILLA_SSE_HAVE_CPUID_DETECTION michael@0: "yes" michael@0: #else michael@0: "no" michael@0: #endif michael@0: ); michael@0: michael@0: #ifdef MOZILLA_COMPILE_WITH_MMX michael@0: #define COMPILE_MMX_STRING "Y" michael@0: #else michael@0: #define COMPILE_MMX_STRING "-" michael@0: #endif michael@0: #ifdef MOZILLA_PRESUME_MMX michael@0: #define PRESUME_MMX_STRING "Y" michael@0: #else michael@0: #define PRESUME_MMX_STRING "-" michael@0: #endif michael@0: michael@0: #ifdef MOZILLA_COMPILE_WITH_SSE michael@0: #define COMPILE_SSE_STRING "Y" michael@0: #else michael@0: #define COMPILE_SSE_STRING "-" michael@0: #endif michael@0: #ifdef MOZILLA_PRESUME_SSE michael@0: #define PRESUME_SSE_STRING "Y" michael@0: #else michael@0: #define PRESUME_SSE_STRING "-" michael@0: #endif michael@0: michael@0: #ifdef MOZILLA_COMPILE_WITH_SSE2 michael@0: #define COMPILE_SSE2_STRING "Y" michael@0: #else michael@0: #define COMPILE_SSE2_STRING "-" michael@0: #endif michael@0: #ifdef MOZILLA_PRESUME_SSE2 michael@0: #define PRESUME_SSE2_STRING "Y" michael@0: #else michael@0: #define PRESUME_SSE2_STRING "-" michael@0: #endif michael@0: michael@0: #ifdef MOZILLA_COMPILE_WITH_SSE3 michael@0: #define COMPILE_SSE3_STRING "Y" michael@0: #else michael@0: #define COMPILE_SSE3_STRING "-" michael@0: #endif michael@0: #ifdef MOZILLA_PRESUME_SSE3 michael@0: #define PRESUME_SSE3_STRING "Y" michael@0: #else michael@0: #define PRESUME_SSE3_STRING "-" michael@0: #endif michael@0: michael@0: #ifdef MOZILLA_COMPILE_WITH_SSSE3 michael@0: #define COMPILE_SSSE3_STRING "Y" michael@0: #else michael@0: #define COMPILE_SSSE3_STRING "-" michael@0: #endif michael@0: #ifdef MOZILLA_PRESUME_SSSE3 michael@0: #define PRESUME_SSSE3_STRING "Y" michael@0: #else michael@0: #define PRESUME_SSSE3_STRING "-" michael@0: #endif michael@0: michael@0: #ifdef MOZILLA_COMPILE_WITH_SSE4A michael@0: #define COMPILE_SSE4A_STRING "Y" michael@0: #else michael@0: #define COMPILE_SSE4A_STRING "-" michael@0: #endif michael@0: #ifdef MOZILLA_PRESUME_SSE4A michael@0: #define PRESUME_SSE4A_STRING "Y" michael@0: #else michael@0: #define PRESUME_SSE4A_STRING "-" michael@0: #endif michael@0: michael@0: #ifdef MOZILLA_COMPILE_WITH_SSE4_1 michael@0: #define COMPILE_SSE4_1_STRING "Y" michael@0: #else michael@0: #define COMPILE_SSE4_1_STRING "-" michael@0: #endif michael@0: #ifdef MOZILLA_PRESUME_SSE4_1 michael@0: #define PRESUME_SSE4_1_STRING "Y" michael@0: #else michael@0: #define PRESUME_SSE4_1_STRING "-" michael@0: #endif michael@0: michael@0: #ifdef MOZILLA_COMPILE_WITH_SSE4_2 michael@0: #define COMPILE_SSE4_2_STRING "Y" michael@0: #else michael@0: #define COMPILE_SSE4_2_STRING "-" michael@0: #endif michael@0: #ifdef MOZILLA_PRESUME_SSE4_2 michael@0: #define PRESUME_SSE4_2_STRING "Y" michael@0: #else michael@0: #define PRESUME_SSE4_2_STRING "-" michael@0: #endif michael@0: michael@0: printf("Feature Presume Compile Support Use\n"); michael@0: #define SHOW_INFO(featurelc_, featureuc_) \ michael@0: printf( "%7s %1s %1s %1s\n", \ michael@0: #featurelc_, \ michael@0: PRESUME_##featureuc_##_STRING, \ michael@0: COMPILE_##featureuc_##_STRING, \ michael@0: (mozilla::supports_##featurelc_() ? "Y" : "-")); michael@0: SHOW_INFO(mmx, MMX) michael@0: SHOW_INFO(sse, SSE) michael@0: SHOW_INFO(sse2, SSE2) michael@0: SHOW_INFO(sse3, SSE3) michael@0: SHOW_INFO(ssse3, SSSE3) michael@0: SHOW_INFO(sse4a, SSE4A) michael@0: SHOW_INFO(sse4_1, SSE4_1) michael@0: SHOW_INFO(sse4_2, SSE4_2) michael@0: return 0; michael@0: }