From patchwork Wed Mar 8 16:57:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 660458 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp437484wrb; Wed, 8 Mar 2023 09:10:04 -0800 (PST) X-Google-Smtp-Source: AK7set/BEHCuvqpYh6fiEQs63vwJSBjzGBKGMqDxqXvVIC13vwYRkKA8WrLikjxi2S2DL5miNez4 X-Received: by 2002:ac8:5e10:0:b0:3bf:d254:bb9b with SMTP id h16-20020ac85e10000000b003bfd254bb9bmr34524424qtx.44.1678295404264; Wed, 08 Mar 2023 09:10:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678295404; cv=none; d=google.com; s=arc-20160816; b=UaO56B9CIzSjzNfYo9D5CLshD3MudiyziWD0HmJeAW6tgDhaCKKP71oF+ptuLXfDlo Io5fidrXGxd8bouc9zEEnq1wv3MoZXrHVHvXGXb74fYEwa4pn8/dS0E6Gl67HowgKbk5 dzHDjgezOMpXO3ULHxHO2CobRBbBT/V5hll9rT1ToKCO0lv4A76/NaCVGuemQn7fRiUP LqLEn3VLPq1K3QnCFHGeZ48ahqzO+ez6I3bsO8EReUBwbz+qOKTyTDDfauq+vvwob55s dNs1zW8TB+Lp0fE+u6S6CT6ZLqdZgTCrxyFwPrhlXCyOlU9OJoma8K7Muqsm4TnrAQbF RO2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=sY0PHhB7txcFinQr9jqv+K6VM2+QBoZXXTllrrkXLJM=; b=fgm8aMPbbEU+pcNqJN/yjmNQCVNW/L308Xi7ugogTkiJn7ojNn329H2276q5hOFsVe Reqd6xlUAoVqIn2MsXc46fzHrm/7/LiVpfMTXxoG/iFI0iCryaq4ptAqLKZ9TcEq6jaX 54SxAwxxqUNxChfN3JYJvyLG+WfhPpi57fKfKNMDRvhfnFVrb1e1ZswccK+nXgAFwr/A 3xEEXAbs6/3Ojjhqcc23852iI+LoG4ErMRJT0Bxaiq7+dOJV1iWTGWRz5pN7YmFdAK5+ jvqYhpt8j6SwT5rg4JxawkyvisE8miTlXp2shc0v/99UZh5jllEAZfNnQuFiBv5R7D0K 5Gqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m7-20020ac85b07000000b003bfe796bfb9si13470330qtw.319.2023.03.08.09.10.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Mar 2023 09:10:04 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZx86-0004M9-52; Wed, 08 Mar 2023 11:59:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZx82-0004GA-Du; Wed, 08 Mar 2023 11:59:02 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZx80-00041t-Nm; Wed, 08 Mar 2023 11:59:02 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 2CB25400F4; Wed, 8 Mar 2023 19:58:22 +0300 (MSK) Received: from tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with SMTP id E2FC413A; Wed, 8 Mar 2023 19:58:20 +0300 (MSK) Received: (nullmailer pid 2098296 invoked by uid 1000); Wed, 08 Mar 2023 16:58:15 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Richard Henderson , Paolo Bonzini , Michael Tokarev Subject: [PATCH 22/47] target/i386: Fix C flag for BLSI, BLSMSK, BLSR Date: Wed, 8 Mar 2023 19:57:25 +0300 Message-Id: <20230308165815.2098148-22-mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230308165035.2097594-1-mjt@msgid.tls.msk.ru> References: <20230308165035.2097594-1-mjt@msgid.tls.msk.ru> MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson We forgot to set cc_src, which is used for computing C. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1370 Signed-off-by: Richard Henderson Message-Id: <20230114180601.2993644-1-richard.henderson@linaro.org> Cc: qemu-stable@nongnu.org Fixes: 1d0b926150e5 ("target/i386: move scalar 0F 38 and 0F 3A instruction to new decoder", 2022-10-18) Signed-off-by: Paolo Bonzini (cherry picked from commit 99282098dc74c2055bde5652bde6cf0067d0c370) Signed-off-by: Michael Tokarev --- target/i386/tcg/emit.c.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/i386/tcg/emit.c.inc b/target/i386/tcg/emit.c.inc index 99f6ba6e19..4d7702c106 100644 --- a/target/i386/tcg/emit.c.inc +++ b/target/i386/tcg/emit.c.inc @@ -1111,6 +1111,7 @@ static void gen_BLSI(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode) { MemOp ot = decode->op[0].ot; + tcg_gen_mov_tl(cpu_cc_src, s->T0); tcg_gen_neg_tl(s->T1, s->T0); tcg_gen_and_tl(s->T0, s->T0, s->T1); tcg_gen_mov_tl(cpu_cc_dst, s->T0); @@ -1121,6 +1122,7 @@ static void gen_BLSMSK(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode { MemOp ot = decode->op[0].ot; + tcg_gen_mov_tl(cpu_cc_src, s->T0); tcg_gen_subi_tl(s->T1, s->T0, 1); tcg_gen_xor_tl(s->T0, s->T0, s->T1); tcg_gen_mov_tl(cpu_cc_dst, s->T0); @@ -1131,6 +1133,7 @@ static void gen_BLSR(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode) { MemOp ot = decode->op[0].ot; + tcg_gen_mov_tl(cpu_cc_src, s->T0); tcg_gen_subi_tl(s->T1, s->T0, 1); tcg_gen_and_tl(s->T0, s->T0, s->T1); tcg_gen_mov_tl(cpu_cc_dst, s->T0);