From nobody Tue Nov 4 15:26:28 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530216640657259.45732307116066; Thu, 28 Jun 2018 13:10:40 -0700 (PDT) Received: from localhost ([::1]:38304 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYdFX-0002zo-Rs for importer@patchew.org; Thu, 28 Jun 2018 16:10:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYdAQ-00074z-KN for qemu-devel@nongnu.org; Thu, 28 Jun 2018 16:05:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYdAP-00008S-Ff for qemu-devel@nongnu.org; Thu, 28 Jun 2018 16:05:22 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:46654) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYdAO-00005F-Oj for qemu-devel@nongnu.org; Thu, 28 Jun 2018 16:05:21 -0400 Received: by mail-wr0-x241.google.com with SMTP id t6-v6so6664963wrq.13 for ; Thu, 28 Jun 2018 13:05:20 -0700 (PDT) Received: from 640k.lan ([82.84.124.111]) by smtp.gmail.com with ESMTPSA id 127-v6sm6211110wmd.18.2018.06.28.13.05.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 13:05:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=a0agPKEsNAB2C2qkwtnEDQob0f31zBM/LulJ/RPkBic=; b=ZKo2ZIfJFKz0Q6mK8HwvsXcNwdVoHa3Eoo/frYh2VrV+5L45gP9trlG1Y0f29sOjhY lmZ8EUKftHiJeze30PlMmQ8gyOsf2qHo5JsM9xd/AoJV91Wu+DeHFqU28+OGwBG7UWjP zqaMhXu+kSl+9mqHHrRfxI5U5paJ6ivZGP3MEvrI76PIohuK+2iZB9szD/QMIgd6sCWF n6ETsSRYpNDsmXNqsxC0uARkTSEwe6YM+YaDIkneimyZq6GjDsD8BPDXGpSbLZ6cyhXZ 4riOy/ENW16CheNB9Av3biv0BZ0cTpc5dIGfb8mipzqfaBWX7fECM19cGXKw+2zZ8q6c rO7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=a0agPKEsNAB2C2qkwtnEDQob0f31zBM/LulJ/RPkBic=; b=tuO66EZyRJMXuKocNfmtillEusmCCEoWmZEpKa5vNeW+WeI0i+6IdHe2vjoR1FQB8g PAqnAIcy0uUlc0ML/ylARwSdjLAxQe1qvmUoXkkjzyxjLklKz1PbYcdJzuuGsSyOXu9t qAB/9qevoZ9x6Godcht2P8B/PlquaoRm+q4q/xLAAIBf+TJqbK5vZ4yZj4+38fLyGVVO PhtspY2sGOGRGcNUhKAiNSSx9iK6HlY0wuqRKTCp/6bdx5tDR4Y1x9NCjbLe6ySgs/5T S2ZBEWZjxwpZYk5FsHYNtlL6G0axUhXSWqbSkXYr86I8fz54hhAFNRTbrcBYfDpP2+l9 bn5Q== X-Gm-Message-State: APt69E1uU1TY3NPPDPQCHqNM435aS96FfzfAAP5Tk2WQBo9N2e/QbX6A LnMu7ZSmBCYrzb5BaGaOdA6tnFHx X-Google-Smtp-Source: AAOMgpedOHuBst9xbB9dN+P+ifYR90EhnszZBa7dUiclVx8mMq1PscklolSDGHoR+Fud7m4Ph/H99g== X-Received: by 2002:adf:ebc3:: with SMTP id v3-v6mr9793996wrn.33.1530216319378; Thu, 28 Jun 2018 13:05:19 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 28 Jun 2018 22:04:16 +0200 Message-Id: <1530216310-52873-7-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1530216310-52873-1-git-send-email-pbonzini@redhat.com> References: <1530216310-52873-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::241 Subject: [Qemu-devel] [PULL 06/60] target/i386: Fix BLSR and BLSI X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Richard Henderson The implementation of these two instructions was swapped. At the same time, unify the setup of eflags for the insn group. Reported-by: Ricardo Ribalda Delgado Signed-off-by: Richard Henderson Message-Id: <20170712192902.15493-1-rth@twiddle.net> Signed-off-by: Paolo Bonzini --- target/i386/translate.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index 697a918..c918494 100644 --- a/target/i386/translate.c +++ b/target/i386/translate.c @@ -4059,34 +4059,26 @@ static void gen_sse(CPUX86State *env, DisasContext = *s, int b, ot =3D mo_64_32(s->dflag); gen_ldst_modrm(env, s, modrm, ot, OR_TMP0, 0); =20 + tcg_gen_mov_tl(cpu_cc_src, cpu_T0); switch (reg & 7) { case 1: /* blsr By,Ey */ - tcg_gen_neg_tl(cpu_T1, cpu_T0); + tcg_gen_subi_tl(cpu_T1, cpu_T0, 1); tcg_gen_and_tl(cpu_T0, cpu_T0, cpu_T1); - gen_op_mov_reg_v(ot, s->vex_v, cpu_T0); - gen_op_update2_cc(); - set_cc_op(s, CC_OP_BMILGB + ot); break; - case 2: /* blsmsk By,Ey */ - tcg_gen_mov_tl(cpu_cc_src, cpu_T0); - tcg_gen_subi_tl(cpu_T0, cpu_T0, 1); - tcg_gen_xor_tl(cpu_T0, cpu_T0, cpu_cc_src); - tcg_gen_mov_tl(cpu_cc_dst, cpu_T0); - set_cc_op(s, CC_OP_BMILGB + ot); + tcg_gen_subi_tl(cpu_T1, cpu_T0, 1); + tcg_gen_xor_tl(cpu_T0, cpu_T0, cpu_T1); break; - case 3: /* blsi By, Ey */ - tcg_gen_mov_tl(cpu_cc_src, cpu_T0); - tcg_gen_subi_tl(cpu_T0, cpu_T0, 1); - tcg_gen_and_tl(cpu_T0, cpu_T0, cpu_cc_src); - tcg_gen_mov_tl(cpu_cc_dst, cpu_T0); - set_cc_op(s, CC_OP_BMILGB + ot); + tcg_gen_neg_tl(cpu_T1, cpu_T0); + tcg_gen_and_tl(cpu_T0, cpu_T0, cpu_T1); break; - default: goto unknown_op; } + tcg_gen_mov_tl(cpu_cc_dst, cpu_T0); + gen_op_mov_reg_v(ot, s->vex_v, cpu_T0); + set_cc_op(s, CC_OP_BMILGB + ot); break; =20 default: --=20 1.8.3.1