From patchwork Wed Sep 2 17:00:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 274803 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51D2CC433E2 for ; Wed, 2 Sep 2020 17:02:24 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1BA1A2067C for ; Wed, 2 Sep 2020 17:02:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rvkRQQvn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1BA1A2067C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDW9P-0001yB-5k for qemu-devel@archiver.kernel.org; Wed, 02 Sep 2020 13:02:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45354) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDW8Q-0000Ew-Db for qemu-devel@nongnu.org; Wed, 02 Sep 2020 13:01:22 -0400 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:42994) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDW8O-0000I3-BS for qemu-devel@nongnu.org; Wed, 02 Sep 2020 13:01:22 -0400 Received: by mail-pl1-x643.google.com with SMTP id j11so31339plk.9 for ; Wed, 02 Sep 2020 10:01:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gZugdAc0YYQQQMUJH814Yqj9KG0APjmY2BrDJE6YAjA=; b=rvkRQQvnFKYlB9Fk9yNrnqjpzSTP7BNzoPCS7ACQ1zsJigcJytrv4b9rBkKsPRUD2+ 1tsZR9dfiKMnC1FVyJyTAzJVHH6oQsl3epmNZIxSkvL1aIMT4AZWPBniRVIhy1CgP/s6 6N9QO0U84pHwkBSASHBXtk/TWM9LVrrIfZ0zzy9aIjhMGj6r7+zqNzOKPD0hXHN+21f6 vjQmCS3LCBPmYKxlYUtgGomE0cuhI6q5+9SluMxlIhwppPDoofFBojyhz+ED1D/ge2Io oJMHjWJknPaAwOkkaUNhrI9LQrhVFZC7NHCPBNFVug3f2UJGoi7EC8pFY+u+/a2CO96+ XlnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gZugdAc0YYQQQMUJH814Yqj9KG0APjmY2BrDJE6YAjA=; b=pI7nFviyhvwNbptTWTbiFPplu2heBU0PRCuY335vHhQuDpVZ0xtOJ4RvBoM32BHLMo 1Nk5QehcPiHNeEnZXhwPm4lMgDO0/ceeJ7VEGmR6UV2IQl+JNOCktXysVSvE/yYctz/a 8QA3Uo5ntZSxAge70gEkHMsosQkKTFFv0zmVcspdwC6oRw4eJKM9gwL0933+rXM8M5M1 7F6CB/2Hf4cSQZ2iVAPavE0QNGfW+PiayDLlXRq18fnq8Q3OsgVC7m4VIIfyMrdhy3Nc +11aLy1/pKf3eng/sDjrxDxftl87ncW69aals0Pd+C14jqpn7v6KkNuelwhIgql2dCjq Urnw== X-Gm-Message-State: AOAM530ldhCI54zIm+48XdzmBDSP2d4Z//lSvcR+hLZeFcjN1Zj7RseK CxO2tOUYlxPCtVCFybOGfJOFby3Ny94= X-Google-Smtp-Source: ABdhPJyQaWqgXwZIJUlgmFK8GZFOYxD6y4pov31ZKOfQ5JGByy8/1rKhOZP0s13INLg5aef+VHvpMA== X-Received: by 2002:a17:90b:88d:: with SMTP id bj13mr2981044pjb.80.1599066078441; Wed, 02 Sep 2020 10:01:18 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id x4sm40527pfm.86.2020.09.02.10.01.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 10:01:17 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH 3/6] ci: Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 Enable msys2 ci in cirrus Date: Thu, 3 Sep 2020 01:00:51 +0800 Message-Id: <20200902170054.810-4-luoyonggang@gmail.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20200902170054.810-1-luoyonggang@gmail.com> References: <20200902170054.810-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::643; envelope-from=luoyonggang@gmail.com; helo=mail-pl1-x643.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --- .cirrus.yml | 23 ++++++++++++++++ scripts/ci/windows/msys2_build.sh | 35 ++++++++++++++++++++++++ scripts/ci/windows/msys2_install.sh | 41 +++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 scripts/ci/windows/msys2_build.sh create mode 100644 scripts/ci/windows/msys2_install.sh diff --git a/.cirrus.yml b/.cirrus.yml index f287d23c5b..d377c28412 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -40,3 +40,26 @@ macos_xcode_task: - ../configure --cc=clang || { cat config.log; exit 1; } - gmake -j$(sysctl -n hw.ncpu) - gmake check + +windows_msys2_task: + windows_container: + image: cirrusci/windowsservercore:cmake + os_version: 2019 + cpu: 8 + memory: 8G + env: + MSYS: winsymlinks:nativestrict + MSYSTEM: MINGW64 + CHERE_INVOKING: 1 + printenv_script: C:\tools\msys64\usr\bin\bash.exe -lc 'printenv' + install_script: + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig" + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && pacman -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Sy --noconfirm" + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --needed --noconfirm -S bash pacman pacman-mirrors msys2-runtime" + - taskkill /F /IM gpg-agent.exe + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Su" + - C:\tools\msys64\usr\bin\bash.exe -lc "sh scripts/ci/windows/msys2_install.sh" + script: + C:\tools\msys64\usr\bin\bash.exe -lc "sh scripts/ci/windows/msys2_build.sh" diff --git a/scripts/ci/windows/msys2_build.sh b/scripts/ci/windows/msys2_build.sh new file mode 100644 index 0000000000..0363ef402a --- /dev/null +++ b/scripts/ci/windows/msys2_build.sh @@ -0,0 +1,35 @@ +export QEMU_DIR=$PWD +mkdir ../qemu-build +cd ../qemu-build +$QEMU_DIR/configure \ + --python=python3 \ + --cross-prefix=x86_64-w64-mingw32- \ + --enable-gtk --enable-sdl \ + --enable-capstone=git \ + --enable-stack-protector \ + --ninja=ninja \ + --enable-gnutls \ + --enable-nettle \ + --enable-vnc \ + --enable-vnc-sasl \ + --enable-vnc-jpeg \ + --enable-vnc-png \ + --enable-membarrier \ + --enable-slirp=git \ + --disable-kvm \ + --enable-hax \ + --enable-whpx \ + --disable-spice \ + --enable-lzo \ + --enable-snappy \ + --enable-bzip2 \ + --enable-vdi \ + --enable-qcow1 \ + --enable-tools \ + --enable-libusb \ + --enable-usb-redir \ + --disable-libnfs \ + --enable-libssh \ + --disable-pie +make -j$NUMBER_OF_PROCESSORS +# make -j$NUMBER_OF_PROCESSORS check diff --git a/scripts/ci/windows/msys2_install.sh b/scripts/ci/windows/msys2_install.sh new file mode 100644 index 0000000000..3a5392cd99 --- /dev/null +++ b/scripts/ci/windows/msys2_install.sh @@ -0,0 +1,41 @@ +pacman --noconfirm -S --needed \ +base-devel \ +git \ +mingw-w64-x86_64-python \ +mingw-w64-x86_64-python-setuptools \ +mingw-w64-x86_64-toolchain \ +mingw-w64-x86_64-SDL2 \ +mingw-w64-x86_64-SDL2_image \ +mingw-w64-x86_64-gtk3 \ +mingw-w64-x86_64-ninja \ +mingw-w64-x86_64-make \ +mingw-w64-x86_64-lzo2 \ +mingw-w64-x86_64-libjpeg-turbo \ +mingw-w64-x86_64-pixman \ +mingw-w64-x86_64-libgcrypt \ +mingw-w64-x86_64-capstone \ +mingw-w64-x86_64-libpng \ +mingw-w64-x86_64-libssh \ +mingw-w64-x86_64-libxml2 \ +mingw-w64-x86_64-snappy \ +mingw-w64-x86_64-libusb \ +mingw-w64-x86_64-usbredir \ +mingw-w64-x86_64-libtasn1 \ +mingw-w64-x86_64-libnfs \ +mingw-w64-x86_64-nettle \ +mingw-w64-x86_64-cyrus-sasl \ +mingw-w64-x86_64-curl \ +mingw-w64-x86_64-gnutls \ +mingw-w64-x86_64-zstd \ +mingw-w64-x86_64-glib2 + +cd /mingw64/bin +cp x86_64-w64-mingw32-gcc-ar.exe x86_64-w64-mingw32-ar.exe +cp x86_64-w64-mingw32-gcc-ranlib.exe x86_64-w64-mingw32-ranlib.exe +cp x86_64-w64-mingw32-gcc-nm.exe x86_64-w64-mingw32-nm.exe +cp windres.exe x86_64-w64-mingw32-windres.exe +cp strip.exe x86_64-w64-mingw32-strip.exe +cp objcopy.exe x86_64-w64-mingw32-objcopy.exe +cp ld x86_64-w64-mingw32-ld.exe +cp as x86_64-w64-mingw32-as.exe +cp sdl2-config x86_64-w64-mingw32-sdl2-config From patchwork Wed Sep 2 17:00:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 274802 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E33FC433E2 for ; Wed, 2 Sep 2020 17:03:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0D49D2067C for ; Wed, 2 Sep 2020 17:03:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MYpzGK9K" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D49D2067C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDWAY-0004ZS-7z for qemu-devel@archiver.kernel.org; Wed, 02 Sep 2020 13:03:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDW8W-0000Si-LI for qemu-devel@nongnu.org; Wed, 02 Sep 2020 13:01:28 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:41295) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDW8U-0000Il-M9 for qemu-devel@nongnu.org; Wed, 02 Sep 2020 13:01:28 -0400 Received: by mail-pg1-x541.google.com with SMTP id w186so2837221pgb.8 for ; Wed, 02 Sep 2020 10:01:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=E3tqAQ40jh0sPTD1d9xIkZ9WYrXugWo7nhLWb57uF6Q=; b=MYpzGK9KlMiUrXXFF850wn8h65J7d8mGHdjaCNe9s6Z3umbJDiz5FKpa9albrVTQZJ TjLYEbUcziIIRoY9B9KMAXMN5BzxD4BHa8S4d17NcR+S34esqStWL+gDdcLbgSCOhor3 fce9twXlIILn18nyByZ+0wzaS/2p8+oU1O3xekBlkDOYkPhOn5ZrclK+e/EOThk0RB5A LXU8fScQa7kjwuSYxISbUoJxvYAzuMigiSLSMuXhPrHqu99vCiyvn7xnIfMijHRzCqBH tjp57A+03oc8q4V+JzpsNtSd/PMBeSOqHX1DcX+Qwr2zajRykN8OOBzh3rX4WJ9+tkPD B9DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=E3tqAQ40jh0sPTD1d9xIkZ9WYrXugWo7nhLWb57uF6Q=; b=Qiqos/0pC4SeoQnCT1c8G3HZxsKQ9Q8VitSoy9FXJ6VkPYD1M+U44pI+o5V+XjhnSg Ja6uR19fmr3bmIu2zoIf6gWCjnQ6ESOLl6SrVAKXwOXPsXcTuE/1DDu8ziKL30NWOeiK Mi6qha52K1ydajJUJUgFPYmhho7oHiTblY3mnxzMP7/q0z7cI9S9lipFhaa7OivjjSRA aDQw9cWLLuCzg250ohmLDuI2VgASDYWPR4nwkr1MQ5RmlVBiob0dLIcCinskRQsr6wVO p60ecS3SROKrxZw6i0vyWG51y0l8TUxQuJx5UI07RUubgvh7Ln37IHfaoF2ZTQM+3v6r mYuQ== X-Gm-Message-State: AOAM530mh56lzxKfW+qAAxog/xg1MFojQyuz0UkobRNPKsqviVH3Cx5N wH4yQyhuAW2frIdS7gIgcjrtNqqSHRI= X-Google-Smtp-Source: ABdhPJw/nrFFE2q++6Z+N+Bkp6OL8Li2KvrhrfpqIcZQNu6pFURuIWQTh7jdlku6MPOnmv20zWe1LQ== X-Received: by 2002:a62:2e81:: with SMTP id u123mr3968934pfu.304.1599066080665; Wed, 02 Sep 2020 10:01:20 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id x4sm40527pfm.86.2020.09.02.10.01.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 10:01:19 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH 4/6] tcg: Fixes dup_const link error Date: Thu, 3 Sep 2020 01:00:52 +0800 Message-Id: <20200902170054.810-5-luoyonggang@gmail.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20200902170054.810-1-luoyonggang@gmail.com> References: <20200902170054.810-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::541; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x541.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Rename function dup_const to dup_const_eval for avoid confliction with macro dup_const The link error on msys2 Linking target qemu-system-alpha.exe C:/CI-Tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libqemu-alpha-softmmu.fa.p/tcg_optimize.c.obj: in function `tcg_optimize': E:\CI-Cor-Ready\xemu\qemu-build/../qemu.org/tcg/optimize.c:1106: undefined reference to `dup_const' C:/CI-Tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libqemu-alpha-softmmu.fa.p/tcg_tcg-op-vec.c.obj: in function `tcg_gen_dupi_vec': E:\CI-Cor-Ready\xemu\qemu-build/../qemu.org/tcg/tcg-op-vec.c:283: undefined reference to `dup_const' collect2.exe: error: ld returned 1 exit status Signed-off-by: Yonggang Luo --- include/tcg/tcg.h | 6 +++--- tcg/tcg-op-gvec.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 53ce94c2c5..7f6fe8454b 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -1251,15 +1251,15 @@ static inline int tcg_can_emit_vec_op(TCGOpcode o, TCGType t, unsigned ve) void tcg_expand_vec_op(TCGOpcode, TCGType, unsigned, TCGArg, ...); /* Replicate a constant C accoring to the log2 of the element size. */ -uint64_t dup_const(unsigned vece, uint64_t c); +uint64_t dup_const_eval(unsigned vece, uint64_t c); #define dup_const(VECE, C) \ (__builtin_constant_p(VECE) \ ? ( (VECE) == MO_8 ? 0x0101010101010101ull * (uint8_t)(C) \ : (VECE) == MO_16 ? 0x0001000100010001ull * (uint16_t)(C) \ : (VECE) == MO_32 ? 0x0000000100000001ull * (uint32_t)(C) \ - : dup_const(VECE, C)) \ - : dup_const(VECE, C)) + : dup_const_eval(VECE, C)) \ + : dup_const_eval(VECE, C)) /* diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c index 3707c0effb..cbb6cd04bc 100644 --- a/tcg/tcg-op-gvec.c +++ b/tcg/tcg-op-gvec.c @@ -359,7 +359,7 @@ static inline bool check_size_impl(uint32_t oprsz, uint32_t lnsz) static void expand_clr(uint32_t dofs, uint32_t maxsz); /* Duplicate C as per VECE. */ -uint64_t (dup_const)(unsigned vece, uint64_t c) +uint64_t dup_const_eval(unsigned vece, uint64_t c) { switch (vece) { case MO_8: From patchwork Wed Sep 2 17:00:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 274801 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A292C433E7 for ; Wed, 2 Sep 2020 17:04:55 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 113232067C for ; Wed, 2 Sep 2020 17:04:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Bp3QDYZk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 113232067C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDWBq-0006tr-7G for qemu-devel@archiver.kernel.org; Wed, 02 Sep 2020 13:04:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDW8V-0000Ri-VR for qemu-devel@nongnu.org; Wed, 02 Sep 2020 13:01:28 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:42650) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDW8S-0000IY-SL for qemu-devel@nongnu.org; Wed, 02 Sep 2020 13:01:27 -0400 Received: by mail-pf1-x443.google.com with SMTP id 17so3167908pfw.9 for ; Wed, 02 Sep 2020 10:01:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u7amQF5+q+U5pyEjmTJks994NcpROaetfXoezQ8sulo=; b=Bp3QDYZkDWAFIC5efp20wcNZ+OgfGQ8P6EY3Hoz+xXikKTAMZO2J7LziiCEVW6BQy1 QABQXpmxofN0ykvY0yQo5mvklix0N0jZGpibP6I4I/UqikUtWGLCnPIPEoyR7QA2CT3G FbaEoTjRBSs2wdnaFq90i8ugkeUMKwX73KYhuuKNhRYFufEzk30s5R5rOwfQZHDHHPvx iJTQWgaDJn04pZvR3JaRGcULBbA/IA3etfDFTp5A59l1O2+uYgmYFhOf0M/RhljOaRBR qlmc7d6eroHTeNCIOpx9ys8oUc4khV6giEeE51XNVW1xyuvy1lDA7R5Lrf9zzaLslNbd TYvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=u7amQF5+q+U5pyEjmTJks994NcpROaetfXoezQ8sulo=; b=APl3rSNKUcEJrD99Ko10QEIDAXMyo28S0xETVUvMUaatVZD0iKTuQ52zp1RfQT/D4I Z1GLSNcdgurbpkleb5v7h5q7Z18Ob9Xs2EljwX/KEvwM71onHlcOfJcSS+yq1mKKYI8k 3tswgCS/SAsocsiMYrZFEEv/H/poIe5rOt1IUPNteILE7mkTS2wjSHHh+VIyOsE5YfSl 75g1LBVxxT06+TMEkqyW71rEUMHxRsb+2YlZ9nCqCMfrjxCFPpX8sZVvLIxcC3g9pFq9 aRyqEQEm0Ytl5A8b8O4Yer65dphRTcT4s2GVjiau5lAxAbbYe103BIcE5IQJttKDkOHK g9oA== X-Gm-Message-State: AOAM533rl9sMh9BcZcNfz9yZwwEpSfbQZXDVVew1cnq0iyJzLU93HUC2 NLyEgf+sFuHmgJeg1YPatXmzpJ0FE/E= X-Google-Smtp-Source: ABdhPJxDw9pl3N5Wby6b52DGngWNm9jBMjySuqs/jE0KWAavhEBacW6L0LsxEeFbbuYH6u4Sgn2+Qg== X-Received: by 2002:a65:4689:: with SMTP id h9mr2566983pgr.50.1599066082825; Wed, 02 Sep 2020 10:01:22 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id x4sm40527pfm.86.2020.09.02.10.01.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 10:01:22 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH 5/6] tests: handling signal on win32 properly Date: Thu, 3 Sep 2020 01:00:53 +0800 Message-Id: <20200902170054.810-6-luoyonggang@gmail.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20200902170054.810-1-luoyonggang@gmail.com> References: <20200902170054.810-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::443; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" SIGABRT should use signal(SIGABRT, sigabrt_handler) to handle on win32 The error: E:/CI-Cor-Ready/xemu/qemu.org/tests/test-replication.c:559:33: error: invalid use of undefined type 'struct sigaction' 559 | sigact = (struct sigaction) { | ^ Signed-off-by: Yonggang Luo --- tests/test-replication.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test-replication.c b/tests/test-replication.c index e0b03dafc2..9ab3666a90 100644 --- a/tests/test-replication.c +++ b/tests/test-replication.c @@ -554,6 +554,9 @@ static void sigabrt_handler(int signo) static void setup_sigabrt_handler(void) { +#ifdef _WIN32 + signal(SIGABRT, sigabrt_handler); +#else struct sigaction sigact; sigact = (struct sigaction) { @@ -562,6 +565,7 @@ static void setup_sigabrt_handler(void) }; sigemptyset(&sigact.sa_mask); sigaction(SIGABRT, &sigact, NULL); +#endif } int main(int argc, char **argv)