diff options
Diffstat (limited to 'config.tests')
-rw-r--r-- | config.tests/common/avx512/avx512.cpp | 97 | ||||
-rw-r--r-- | config.tests/common/avx512/avx512.pro | 12 | ||||
-rw-r--r-- | config.tests/common/xlocalescanprint/qglobal.h (renamed from config.tests/x11/xinput/xinput.cpp) | 18 | ||||
-rw-r--r-- | config.tests/common/xlocalescanprint/xlocalescanprint.cpp (renamed from config.tests/x11/xvideo/xvideo.cpp) | 28 | ||||
-rw-r--r-- | config.tests/common/xlocalescanprint/xlocalescanprint.pro | 3 | ||||
-rwxr-xr-x | config.tests/unix/arch.test | 6 | ||||
-rwxr-xr-x | config.tests/unix/compile.test | 11 | ||||
-rw-r--r-- | config.tests/unix/doubleconversion/doubleconversion.cpp (renamed from config.tests/x11/xinerama/xinerama.cpp) | 8 | ||||
-rw-r--r-- | config.tests/unix/doubleconversion/doubleconversion.pro | 4 | ||||
-rw-r--r-- | config.tests/x11/xinerama/xinerama.pro | 4 | ||||
-rw-r--r-- | config.tests/x11/xinput/xinput.pro | 6 | ||||
-rw-r--r-- | config.tests/x11/xvideo/xvideo.pro | 4 |
12 files changed, 153 insertions, 48 deletions
diff --git a/config.tests/common/avx512/avx512.cpp b/config.tests/common/avx512/avx512.cpp new file mode 100644 index 0000000000..d0c55a09b5 --- /dev/null +++ b/config.tests/common/avx512/avx512.cpp @@ -0,0 +1,97 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Intel Corporation. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the configuration of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** 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 http://www.qt.io/terms-conditions. For further +** information use the contact form at http://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 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <immintrin.h> + +#ifndef AVX512WANT +# error ".pro file must define AVX512WANT macro to the AVX-512 feature to be tested" +#endif + +// The following checks if __AVXx__ is defined, where x is the value in +// AVX512WANT +#define HAS2(x) __AVX512 ## x ## __ +#define HAS(x) HAS2(x) +#if !HAS(AVX512WANT) +# error "Feature not supported" +#endif + +int main(int, char**argv) +{ + /* AVX512 Foundation */ + __m512i i; + __m512d d; + __m512 f; + __mmask16 m = ~1; + i = _mm512_maskz_loadu_epi32(0, argv); + d = _mm512_loadu_pd((double *)argv + 64); + f = _mm512_loadu_ps((float *)argv + 128); + +#ifdef __AVX512ER__ + /* AVX512 Exponential and Reciprocal */ + f = _mm512_exp2a23_round_ps(f, 8); +#endif +#ifdef __AVX512CD__ + /* AVX512 Conflict Detection */ + i = _mm512_maskz_conflict_epi32(m, i); +#endif +#ifdef __AVX512PF__ + /* AVX512 Prefetch */ + _mm512_mask_prefetch_i64scatter_pd(argv, 0xf, i, 2, 2); +#endif +#ifdef __AVX512DQ__ + /* AVX512 Doubleword and Quadword support */ + m = _mm512_movepi32_mask(i); +#endif +#ifdef __AVX512BW__ + /* AVX512 Byte and Word support */ + i = _mm512_mask_loadu_epi8(i, m, argv - 8); +#endif +#ifdef __AVX512VL__ + /* AVX512 Vector Length */ + __m256i i2 = _mm256_maskz_loadu_epi32(0, argv); + _mm256_mask_storeu_epi32(argv + 1, m, i2); +#endif +#ifdef __AVX512IFMA__ + /* AVX512 Integer Fused Multiply-Add */ + i = _mm512_madd52lo_epu64(i, i, i); +#endif +#ifdef __AVX512VBMI__ + /* AVX512 Vector Byte Manipulation Instructions */ + i = _mm512_permutexvar_epi8(i, i); +#endif + + _mm512_mask_storeu_epi64(argv, m, i); + _mm512_mask_storeu_ps(argv + 64, m, f); + _mm512_mask_storeu_pd(argv + 128, m, d); + return 0; +} diff --git a/config.tests/common/avx512/avx512.pro b/config.tests/common/avx512/avx512.pro new file mode 100644 index 0000000000..37cfb2ea54 --- /dev/null +++ b/config.tests/common/avx512/avx512.pro @@ -0,0 +1,12 @@ +SOURCES = avx512.cpp +CONFIG -= qt dylib release debug_and_release +CONFIG += debug console + +isEmpty(AVX512): error("You must set the AVX512 variable!") + +varname = QMAKE_CFLAGS_AVX512$$AVX512 +value = $$eval($$varname) +isEmpty($$varname): error("This compiler does not support AVX512") + +QMAKE_CXXFLAGS += $$value +DEFINES += AVX512WANT=$$AVX512 diff --git a/config.tests/x11/xinput/xinput.cpp b/config.tests/common/xlocalescanprint/qglobal.h index 1d717c0125..09b48af480 100644 --- a/config.tests/x11/xinput/xinput.cpp +++ b/config.tests/common/xlocalescanprint/qglobal.h @@ -31,21 +31,7 @@ ** ****************************************************************************/ -#ifdef Q_OS_SOLARIS -#error "Not supported." -#else +#ifndef QGLOBAL_H +#define QGLOBAL_H -#include <X11/Xlib.h> -#include <X11/extensions/XInput.h> - -#ifdef Q_OS_IRIX -# include <wacom.h> -#endif - -int main(int, char **) -{ - XDeviceButtonEvent *event; - event = 0; - return 0; -} #endif diff --git a/config.tests/x11/xvideo/xvideo.cpp b/config.tests/common/xlocalescanprint/xlocalescanprint.cpp index 087e42530e..4c84404a43 100644 --- a/config.tests/x11/xvideo/xvideo.cpp +++ b/config.tests/common/xlocalescanprint/xlocalescanprint.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2015 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** -** This file is part of the FOO module of the Qt Toolkit. +** This file is part of the config.tests of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage @@ -31,14 +31,26 @@ ** ****************************************************************************/ -#include <X11/Xlib.h> -#include <X11/extensions/Xv.h> -#include <X11/extensions/Xvlib.h> +#define QT_BEGIN_NAMESPACE +#define QT_END_NAMESPACE -int main(int argc, char** argv) +#ifdef _MSVC_VER +#define Q_CC_MSVC _MSVC_VER +#endif + +#define QT_NO_DOUBLECONVERSION + +#include "../../../src/corelib/tools/qdoublescanprint_p.h" + +int main(int argc, char **argv) { - unsigned int count = 0; - XvAdaptorInfo *adaptors = 0; - XvQueryAdaptors(0, 0, &count, &adaptors); +#ifdef _MSVC_VER + _locale_t invalidLocale = NULL; +#else + locale_t invalidLocale = NULL; +#endif + double a = 3.4; + qDoubleSnprintf(argv[0], 1, invalidLocale, "invalid format", a); + qDoubleSscanf(argv[0], invalidLocale, "invalid format", &a, &argc); return 0; } diff --git a/config.tests/common/xlocalescanprint/xlocalescanprint.pro b/config.tests/common/xlocalescanprint/xlocalescanprint.pro new file mode 100644 index 0000000000..a37a01f227 --- /dev/null +++ b/config.tests/common/xlocalescanprint/xlocalescanprint.pro @@ -0,0 +1,3 @@ +SOURCES = xlocalescanprint.cpp +CONFIG -= qt +CONFIG += console diff --git a/config.tests/unix/arch.test b/config.tests/unix/arch.test index c50bd8b30a..cfb47def4f 100755 --- a/config.tests/unix/arch.test +++ b/config.tests/unix/arch.test @@ -6,7 +6,9 @@ SRCDIR=$3 OUTDIR=$4 RESULTFILE=$5 TARGET=$6 -shift 6 +QMAKE=$7 +QTCONF=$8 +shift 8 if [ "$TARGET" = "host" ]; then VARPREFIX="CFG_HOST" @@ -44,7 +46,7 @@ done test -d "$OUTDIR/config.tests/arch" || mkdir -p "$OUTDIR/config.tests/arch" cd "$OUTDIR/config.tests/arch" [ -f Makefile ] && $MAKE distclean >/dev/null 2>&1 -OUTDIR=$OUTDIR "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "LIBS+=$LFLAGS" "QMAKE_CXXFLAGS+=$CXXFLAGS" "INCLUDEPATH+=$INCLUDEPATH" "CONFIG-=app_bundle" "$SRCDIR/config.tests/arch/arch$PROSUFFIX.pro" >/dev/null 2>&1 || echo "qmake is broken" >&2 +OUTDIR=$OUTDIR "$QMAKE" -qtconf "$QTCONF" -nocache -spec "$QMKSPEC" "LIBS+=$LFLAGS" "QMAKE_CXXFLAGS+=$CXXFLAGS" "INCLUDEPATH+=$INCLUDEPATH" "CONFIG-=app_bundle" "$SRCDIR/config.tests/arch/arch$PROSUFFIX.pro" >/dev/null 2>&1 || echo "qmake is broken" >&2 ARCH="" diff --git a/config.tests/unix/compile.test b/config.tests/unix/compile.test index 103321e451..9c0a7cb845 100755 --- a/config.tests/unix/compile.test +++ b/config.tests/unix/compile.test @@ -10,12 +10,15 @@ OUTDIR=$5 TEST=$6 EXE=`basename "$6"` DESCRIPTION=$7 -shift 7 +QMAKE=$8 +QTCONF=$9 +shift 9 LFLAGS="$SYSROOT_FLAG" INCLUDEPATH="" CXXFLAGS="$SYSROOT_FLAG" MAC_ARCH_CXXFLAGS="" MAC_ARCH_LFLAGS="" +QMAKE_ARGS= while [ "$#" -gt 0 ]; do PARAM=$1 case $PARAM in @@ -51,7 +54,9 @@ while [ "$#" -gt 0 ]; do CXXFLAGS="$CXXFLAGS $PARAM \"$2\"" shift ;; - *) ;; + *) + QMAKE_ARGS="$QMAKE_ARGS $PARAM" + ;; esac shift done @@ -67,7 +72,7 @@ test -r Makefile && $MAKE distclean >/dev/null 2>&1 # Make sure output from possible previous tests is gone rm -f "$EXE" "${EXE}.exe" -set -- "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG+=android_app" "CONFIG-=debug_and_release app_bundle lib_bundle" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile" +set -- "$QMAKE" -qtconf "$QTCONF" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG+=android_app" "CONFIG-=debug_and_release app_bundle lib_bundle" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" $QMAKE_ARGS "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile" if [ "$VERBOSE" = "yes" ]; then OUTDIR=$OUTDIR "$@" && $MAKE && SUCCESS=yes else diff --git a/config.tests/x11/xinerama/xinerama.cpp b/config.tests/unix/doubleconversion/doubleconversion.cpp index c795791806..4bf14a5b36 100644 --- a/config.tests/x11/xinerama/xinerama.cpp +++ b/config.tests/unix/doubleconversion/doubleconversion.cpp @@ -31,12 +31,10 @@ ** ****************************************************************************/ -#include <X11/Xlib.h> -#include <X11/extensions/Xinerama.h> +#include <double-conversion/double-conversion.h> int main(int, char **) { - XineramaScreenInfo *info; - info = 0; - return 0; + int flags = double_conversion::StringToDoubleConverter::NO_FLAGS; + return flags; } diff --git a/config.tests/unix/doubleconversion/doubleconversion.pro b/config.tests/unix/doubleconversion/doubleconversion.pro new file mode 100644 index 0000000000..ae435b9293 --- /dev/null +++ b/config.tests/unix/doubleconversion/doubleconversion.pro @@ -0,0 +1,4 @@ +SOURCES = doubleconversion.cpp +CONFIG -= qt +CONFIG += console +LIBS += -ldouble-conversion diff --git a/config.tests/x11/xinerama/xinerama.pro b/config.tests/x11/xinerama/xinerama.pro deleted file mode 100644 index 54d1af031b..0000000000 --- a/config.tests/x11/xinerama/xinerama.pro +++ /dev/null @@ -1,4 +0,0 @@ -SOURCES = xinerama.cpp -CONFIG += x11 -CONFIG -= qt -LIBS += -lXinerama diff --git a/config.tests/x11/xinput/xinput.pro b/config.tests/x11/xinput/xinput.pro deleted file mode 100644 index 8acaede355..0000000000 --- a/config.tests/x11/xinput/xinput.pro +++ /dev/null @@ -1,6 +0,0 @@ -SOURCES = xinput.cpp -CONFIG += x11 -CONFIG -= qt -LIBS += -lXi -irix-*:DEFINES+=Q_OS_IRIX -solaris-*:DEFINES+=Q_OS_SOLARIS diff --git a/config.tests/x11/xvideo/xvideo.pro b/config.tests/x11/xvideo/xvideo.pro deleted file mode 100644 index d4c63a0158..0000000000 --- a/config.tests/x11/xvideo/xvideo.pro +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG += x11 -CONFIG -= qt -SOURCES = xvideo.cpp -LIBS += -lXv |