From nobody Tue Oct 28 11:39:35 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1599122155; cv=none; d=zohomail.com; s=zohoarc; b=nPfOXtUs7Bi0O+olVpxRZqjgy0k1o0KJgUIt3C8vJL2QZRVW7Lv+T9pE15qa3fsoiqR8nnQRkCq5HYMC5NEk8f+EQZlgycuC+Yblgbgq8q4gCQtpV5SJ9aZetgmMcnQVkB7lbRoSg25SSGPWDXeQGXhwuEDaII0C6z0pZB43NPU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599122155; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fCP0cNZ4D2nuzBkSSr3MTW3OAB9zlS/A3EmERAQOTPw=; b=P/i/o9ogHpjSaWG1rexAZNYTVGLwxaSD+fwRHKLUvkECjJhGOqBK61NtCAnOEJno7Vo5bd6JluVhd1NQ7COyzrPNdxMyRTN5ZuO1QVPeVPu/QVxQATSHaVRBjXhDb+HaKM7Bv8cY/rrjtZCcxYF37kaVlJFnXPthODBZqGdtKsg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1599122155801715.2059441011576; Thu, 3 Sep 2020 01:35:55 -0700 (PDT) Received: from localhost ([::1]:42242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDkio-00055Z-W3 for importer@patchew.org; Thu, 03 Sep 2020 04:35:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDkfC-0007lN-Mr for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:10 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:35876) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDkfA-0001W7-R4 for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:10 -0400 Received: by mail-pf1-x442.google.com with SMTP id m8so1734543pfh.3 for ; Thu, 03 Sep 2020 01:32:08 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id e7sm1759201pgn.64.2020.09.03.01.32.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 01:32:06 -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=fCP0cNZ4D2nuzBkSSr3MTW3OAB9zlS/A3EmERAQOTPw=; b=RsHWqg2RXKdG7w1y6mIg4rgQUXKqu+OyjzxIdA+OyTN8bouQU+EdPpHIn4zF3Rd1D/ kfQtJuLwcL7uqpyP4jupzKHGEORhQjpbXb6ysDXaLyLV0yCr2KdmjHYr/RGEyBOr50nA gUvliVq+PPyj0xrKPoZocHEaaOm36J1RP5QZFyjH3DRyBoyWj0AeO5dJXpwMh7kb/oUS J3VY/SPwwM+ILCRRsVHQ14VyoiJhvHK2HjIonA9tG8+8TOiBdXzelniBxWfJ9kdP3tkC XHXX5EZR1Mzs9EF9qPmrx+gL8JZf41sHplhRvsxUEb0SATMjOGeXJS6dYW1tVMohCmEe f81Q== 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=fCP0cNZ4D2nuzBkSSr3MTW3OAB9zlS/A3EmERAQOTPw=; b=ugfaWYYe71Fcf6Viq8GnOuxQcEyBXIQd/L57G1LBUfV10PMzSJk/+t8DNQ3LKnz5OW pV1uqz6ZhgBfptDmyLu4oJBqVYO06J6x6v3ZoUDF1lZnssZgkQ9vQbeKXrPsVNdsFXiJ Ws8toZydFFfeGCrjfIHAPfIpAJyBCxEgI92jVOobWTAWAfAXNQ3pGoImuUth57uI/IyT 9R3iXoOeImfLCd0EzFG45mBvF3kRSWTvVfNWRTBfrwy86wWixcGIDwfR+8vYuOhPIJxr 789vBo7I9u7JCyxym9iS7LC3qiPBNOuBo0+ecRCqK6hJOiAm0bVmxjMTeGUxNHcDQ+w3 GHgw== X-Gm-Message-State: AOAM531SxgeO37wzzrUf7kp4QdmCVIf18UkExkfcwZ/F+PGvq7TcqdzJ CiCY4zl+k6vwSSkKaPF+ioaWOuNKr3/KXLRG X-Google-Smtp-Source: ABdhPJwB3L4tLXw8mkrTnDYTokXYotLrDFHhiVJdP8Swf25X2QOqerGeHWuB08gT2yU4nK6oF1j/EQ== X-Received: by 2002:a17:902:6ac9:: with SMTP id i9mr2846337plt.128.1599121927044; Thu, 03 Sep 2020 01:32:07 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v4 03/12] tcg: Fixes dup_const link error Date: Thu, 3 Sep 2020 16:31:38 +0800 Message-Id: <20200903083147.707-4-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200903083147.707-1-luoyonggang@gmail.com> References: <20200903083147.707-1-luoyonggang@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::442; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x442.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @gmail.com) Content-Type: text/plain; charset="utf-8" Rename function dup_const to dup_const_eval for avoid confliction with macr= o 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-v= ec.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, ...); =20 /* 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); =20 #define dup_const(VECE, C) \ (__builtin_constant_p(VECE) \ ? ( (VECE) =3D=3D MO_8 ? 0x0101010101010101ull * (uint8_t)(C) \ : (VECE) =3D=3D MO_16 ? 0x0001000100010001ull * (uint16_t)(C) \ : (VECE) =3D=3D MO_32 ? 0x0000000100000001ull * (uint32_t)(C) \ - : dup_const(VECE, C)) \ - : dup_const(VECE, C)) + : dup_const_eval(VECE, C)) \ + : dup_const_eval(VECE, C)) =20 =20 /* 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, uint= 32_t lnsz) static void expand_clr(uint32_t dofs, uint32_t maxsz); =20 /* 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: --=20 2.28.0.windows.1