From nobody Wed Oct 29 11:50:24 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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1525339478956979.761836004792; Thu, 3 May 2018 02:24:38 -0700 (PDT) Received: from localhost ([::1]:54855 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fEATU-0004Hd-SU for importer@patchew.org; Thu, 03 May 2018 05:24:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fEAOg-0000eQ-Ay for qemu-devel@nongnu.org; Thu, 03 May 2018 05:19:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fEAOf-0004wy-3P for qemu-devel@nongnu.org; Thu, 03 May 2018 05:19:30 -0400 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]:39272) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fEAOe-0004wi-Rd for qemu-devel@nongnu.org; Thu, 03 May 2018 05:19:29 -0400 Received: by mail-lf0-x243.google.com with SMTP id j193-v6so24916587lfg.6 for ; Thu, 03 May 2018 02:19:28 -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 l24-v6sm1345254ljg.19.2018.05.03.02.19.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 May 2018 02:19: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; bh=sWsPh/S12fhcwDs0f8TOCc4LsvcvG3NnPTdyy+8T4Ck=; b=coQB/QO5LTZr0hjhmDVocY/I3p9RtT+DWm0OkkxHxPa1cKCxgaCVMlwY6hCEFCjijr NioaSDy9/KvwyI/46fKeN5hPDDcfo3wKYj166hFqhtPkpp0rrYM1lEtBU7ee7VOdP4fq 6KTcWlj2EojEhqZc0fR52RBTAqJD5YQXRO90ZYxPlNsUss1Q3uB/V2YRIUKofEMyd6ke fDFl2Bq5skTQQrgd8CIyN4qEPAsVGNyiSlUYrIMFcyjKw6bKAsQBGHrsXjyiEyF7v5D7 JcynjS0AozsGpkn1erepcZqssioEJYhWnqLj1vu4mqytjQtl6i0lRuNw5MNxwuZEKZ91 Sixg== 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=sWsPh/S12fhcwDs0f8TOCc4LsvcvG3NnPTdyy+8T4Ck=; b=T2YsB0GliLNbcEe6xBablaazEObX8MBJaFFF3oTPZEOLT2ZLgzEFCEONDKdsw/3Ji1 WjIrhd6dTymSOPa4zNbRZquDKPKvhyIMtMNWcRMSwaOAyO8ou6QLNmw+JOz+RQwLUkIc 9pmklpjw6wKJf1ZdCXO42TDp6+M7F3ZYBMvpF5mEtCKb1EBqt/mseiCcBxNzZnAzfYTR TzLoCAK8z1gBvs2SrGmXlb8s/WMUv78PmrRaAqv91LOy/jo4Ghi9wyGLbUB44wNWYZ2q GpielR4PpBursWH/placCXrew5YpA43TAGdoVvX1KvY9miTvfV1IsPOFny1VGOHJYMQn /FJw== X-Gm-Message-State: ALQs6tAKPDDOQC27YeUcBnx7y1hD8O6Y9Zl+K3fR2hnkO3kg+1aCxi2q 0l/on/PLihufD9wTirYd+/pSOw== X-Google-Smtp-Source: AB8JxZpn0wccQIDnfeJWS5qTO6B8b9noKbHDm+yWwsSA1gizMDyxOhwT815uHZLPq52fdfJZNnp2OA== X-Received: by 2002:a2e:880a:: with SMTP id x10-v6mr15294519ljh.45.1525339167324; Thu, 03 May 2018 02:19:27 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Thu, 3 May 2018 11:18:55 +0200 Message-Id: <20180503091922.28733-3-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180503091922.28733-1-edgar.iglesias@gmail.com> References: <20180503091922.28733-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::243 Subject: [Qemu-devel] [PATCH v1 02/29] 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 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. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson --- 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