From nobody Thu Oct 30 15:21:20 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=gmail.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1525801207280628.96539030767; Tue, 8 May 2018 10:40:07 -0700 (PDT) Received: from localhost ([::1]:52591 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fG6ai-00067u-LD for importer@patchew.org; Tue, 08 May 2018 13:39:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fG6T2-00081b-Ao for qemu-devel@nongnu.org; Tue, 08 May 2018 13:32:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fG6T1-0005G6-F6 for qemu-devel@nongnu.org; Tue, 08 May 2018 13:32:00 -0400 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]:45855) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fG6T1-0005Fk-6c for qemu-devel@nongnu.org; Tue, 08 May 2018 13:31:59 -0400 Received: by mail-lf0-x244.google.com with SMTP id q2-v6so1854775lfc.12 for ; Tue, 08 May 2018 10:31:59 -0700 (PDT) Received: from gmail.com (81-231-232-130-no39.tbcn.telia.com. [81.231.232.130]) by smtp.gmail.com with ESMTPSA id j17-v6sm5494451lfb.40.2018.05.08.10.31.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 May 2018 10:31:56 -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; bh=PTC1iyn7xoSRCNuOuSH7/unSBQoeZHPOMBKvcAxsggU=; b=KpCRc7nzlDbIPS4ApRM08nKrq0RJYuVfLcmjFhMj6w1cTBNA81Vg2oyIroeXUA//Kp qzB1i0uKzMCCaC3Rd7MXRhXWScYrAEs3Mdgkr5bMBunMRKpWX1sFzTYunUBwdC4miq9L rxEvUyYUiCj/Na7q2BDZR5TkmP2jJM4GDRY0HfhVZglqVGD/n2m+jVQ4aLf3xp2jDrVq 0SZ1WzvbHLWuK/QzjnyvTrSr/2V6sKlX7Cwd4LCHPYxeR1EPV2yK30OjQq/4pjikeVfH JQpRNjid/vZUanzNbh2C3TMMsO2voHDiQcJexAZCK8VapDCmAubHo4RloHR79En9TnXE Lz/w== 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; bh=PTC1iyn7xoSRCNuOuSH7/unSBQoeZHPOMBKvcAxsggU=; b=sRdwO8f9+vCglaqDDS1CuOuzo7Xyd4Z/5tEkBaUfO78RVBZxKb1HdZu49Y7Zh2RODa wCt42LuRNelqR3ko6B5G6DodlPjJTTUdb7n9zeS3uzeFd2f4k6iwCJHgoNoy708YYX6F 4sKOqSH3R0F5AnUcM+oS4HSLkPAWQye3TGY/5wU3pw2PE+DeqG/k5fS553aDfvNl4Fuf rqw1YBlodhqgj1GQlJ3BhcGfzNAhUuf0/SsPkzwNSQDKO2FaKhTVEKlNu3YxO/Jpe2Iv pCS5Lg33URXqkBzenC183UZRzVGvtbKpQ7OL+qV5ay8mgQeJwDvEOqbghF5/ipG29E39 gXEQ== X-Gm-Message-State: ALQs6tAPK+ruUrLJ170bZ3TlvnlLQALlcYONQ4yFC2ip9dWTGMJc8SlF Opk7p2E/Dg43sTpaGhD3DQttKw== X-Google-Smtp-Source: AB8JxZpyv5GWtoTo5Zk/1wCNEaqNEiJSRERB6i/x/ZacNvAzrnqpSRNlCixR4kduqJPNsjzsyEgy3A== X-Received: by 2002:a19:d253:: with SMTP id j80-v6mr12521634lfg.88.1525800717708; Tue, 08 May 2018 10:31:57 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Tue, 8 May 2018 19:31:18 +0200 Message-Id: <20180508173152.29327-3-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180508173152.29327-1-edgar.iglesias@gmail.com> References: <20180508173152.29327-1-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::244 Subject: [Qemu-devel] [PATCH v2 02/36] target-microblaze: dec_store: Use bool instead of unsigned int 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: edgar.iglesias@xilinx.com, peter.maydell@linaro.org, sai.pavan.boddu@xilinx.com, frasse.iglesias@gmail.com, alistair@alistair23.me, richard.henderson@linaro.org, frederic.konrad@adacore.com 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: "Edgar E. Iglesias" Use bool instead of unsigned int to represent flags. Also, use extract32 instead of open coding the bit extract. No functional change. Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Edgar E. Iglesias --- target/microblaze/translate.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 33f21aa5b7..6fe679ca6d 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -1027,14 +1027,15 @@ static void dec_store(DisasContext *dc) { TCGv t, *addr, swx_addr; TCGLabel *swx_skip =3D NULL; - unsigned int size, rev =3D 0, ex =3D 0; + unsigned int size; + bool rev =3D false, ex =3D false; TCGMemOp mop; =20 mop =3D dc->opcode & 3; size =3D 1 << mop; if (!dc->type_b) { - rev =3D (dc->ir >> 9) & 1; - ex =3D (dc->ir >> 10) & 1; + rev =3D extract32(dc->ir, 9, 1); + ex =3D extract32(dc->ir, 10, 1); } mop |=3D MO_TE; if (rev) { --=20 2.14.1