summaryrefslogtreecommitdiffstats
path: root/config.tests/arch
diff options
context:
space:
mode:
Diffstat (limited to 'config.tests/arch')
-rw-r--r--config.tests/arch/CMakeLists.txt9
-rw-r--r--config.tests/arch/arch.cpp51
-rw-r--r--config.tests/arch/arch.pro2
-rw-r--r--config.tests/arch/arch_host.pro3
-rw-r--r--config.tests/arch/write_info.pri11
5 files changed, 17 insertions, 59 deletions
diff --git a/config.tests/arch/CMakeLists.txt b/config.tests/arch/CMakeLists.txt
index c0873a984f..b2517039df 100644
--- a/config.tests/arch/CMakeLists.txt
+++ b/config.tests/arch/CMakeLists.txt
@@ -1,6 +1,13 @@
-cmake_minimum_required(VERSION 3.15.0)
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
project(arch LANGUAGES CXX)
add_executable(architecture_test)
set_property(TARGET architecture_test PROPERTY MACOSX_BUNDLE FALSE)
target_sources(architecture_test PRIVATE arch.cpp)
+
+if(EMSCRIPTEN)
+ target_compile_options(architecture_test PRIVATE -O2 -msimd128 -msse -msse2)
+endif()
diff --git a/config.tests/arch/arch.cpp b/config.tests/arch/arch.cpp
index 2ccfe127b5..44ec721432 100644
--- a/config.tests/arch/arch.cpp
+++ b/config.tests/arch/arch.cpp
@@ -1,42 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Copyright (C) 2016 Intel Corporation.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the FOO module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// Copyright (C) 2016 Intel Corporation.
+// SPDX-License-Identifier: BSD-3-Clause
#define QGLOBAL_H
#include "../../src/corelib/global/archdetect.cpp"
@@ -177,7 +141,7 @@ const char msg2[] = "==Qt=magic=Qt== Sub-architecture:"
// Leading-Zero bit count, Intel Core 4th Generation ("Haswell")
" lzcnt"
#endif
-#ifdef __MMX__
+#if defined(__MMX__) && defined(__i386__)
// Multimedia Extensions, Pentium MMX, AMD K6-2
" mmx"
#endif
@@ -234,11 +198,11 @@ const char msg2[] = "==Qt=magic=Qt== Sub-architecture:"
// Shadow stack, Intel processor TBA
" shstk"
#endif
-#if defined(__SSE__) || (defined(_M_IX86_FP) && _M_IX86_FP >= 1) || defined(_M_X64)
+#if (defined(__SSE__) && defined(__i386__)) || (defined(_M_IX86_FP) && _M_IX86_FP >= 1 && defined(_M_IX86))
// Streaming SIMD Extensions, Intel Pentium III, AMD Athlon
" sse"
#endif
-#if defined(__SSE2__) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2) || defined(_M_X64)
+#if (defined(__SSE2__) && defined(__i386__)) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2 && defined(_M_IX86))
// SSE2, Intel Pentium-M, Intel Pentium 4, AMD Opteron and Athlon 64
" sse2"
#endif
@@ -284,6 +248,9 @@ const char msg2[] = "==Qt=magic=Qt== Sub-architecture:"
#ifdef __ARM_FEATURE_CRC32
" crc32"
#endif
+#ifdef __ARM_FEATURE_CRYPTO
+" crypto"
+#endif
// -- SPARC --
#ifdef __VIS__
diff --git a/config.tests/arch/arch.pro b/config.tests/arch/arch.pro
deleted file mode 100644
index c607898b71..0000000000
--- a/config.tests/arch/arch.pro
+++ /dev/null
@@ -1,2 +0,0 @@
-SOURCES = arch.cpp
-include(write_info.pri)
diff --git a/config.tests/arch/arch_host.pro b/config.tests/arch/arch_host.pro
deleted file mode 100644
index ea0d1fa572..0000000000
--- a/config.tests/arch/arch_host.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-option(host_build)
-SOURCES = arch.cpp
-include(write_info.pri)
diff --git a/config.tests/arch/write_info.pri b/config.tests/arch/write_info.pri
deleted file mode 100644
index 5b43ce1cd5..0000000000
--- a/config.tests/arch/write_info.pri
+++ /dev/null
@@ -1,11 +0,0 @@
-targetinfofile = $$basename(_PRO_FILE_)
-targetinfofile ~= s/pro$/target.txt/
-
-win32 {
- ext = .exe
-} else:wasm {
- ext = .wasm
-}
-
-content = $${file_prefix}$${TARGET}$${ext}
-write_file($$OUT_PWD/$$targetinfofile, content)