From nobody Mon Feb 9 09:28:39 2026 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.zoho.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; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1498050575634625.4617281582102; Wed, 21 Jun 2017 06:09:35 -0700 (PDT) Received: from localhost ([::1]:53848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNfNx-0007xz-NX for importer@patchew.org; Wed, 21 Jun 2017 09:09:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNfEA-0008BZ-Hn for qemu-devel@nongnu.org; Wed, 21 Jun 2017 08:59:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNfE8-0008TF-U3 for qemu-devel@nongnu.org; Wed, 21 Jun 2017 08:59:22 -0400 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]:33318) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNfE8-0008Sq-Mp for qemu-devel@nongnu.org; Wed, 21 Jun 2017 08:59:20 -0400 Received: by mail-lf0-x242.google.com with SMTP id u62so20947380lfg.0 for ; Wed, 21 Jun 2017 05:59:20 -0700 (PDT) Received: from localhost (81-231-233-234-no56.tbcn.telia.com. [81.231.233.234]) by smtp.gmail.com with ESMTPSA id z70sm4741443lff.66.2017.06.21.05.59.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Jun 2017 05:59:18 -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=4R87KcPOoL+7Y2wsdvgPeiuolpWrBD9es4URbgEk13A=; b=qITuyEPwrdK9pPB9t9hoJzXgp503rovCXj7rFCitgMlm2Ylvu3vJVLYlv3wxflnsQO jtW9v8ej+aPhD3EFswko3fwMlZ4PHDxx+u45/d5sWRQt855ZjUKTNR0DHx5uHhpKtYzQ 8tR3qHTPBI2VuOk4P9YJpOjveDieDYi43DVg2eU+WHKzTmYm1PRRBCivJnADlzElx1su HfQiHvJOrrPJSn0skvhxouiDEO1K9W7BA6gYRYk5KMW0mo7poIgLAwOSgifPiVWWrJZb duoVzWuWSQZW39Wet30zF6EE/ulgqrzyBNuAOkiQweazvBINsjsa7tBYUrxwWDAdiCci OAww== 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=4R87KcPOoL+7Y2wsdvgPeiuolpWrBD9es4URbgEk13A=; b=NtT7EEiJDVfIZXzxqkBf8Ivmor/iCWUrRGOXX0U8XzGwUwNXksmSsDPBvGhVTKuV2d PGrRfbb7/d4uKzPDG7lMsdfnNYHNHYB9IxtnBIjMNio0l97dQ6N3Dydkew2fd+YznxqT FpvYQu0LNBx31xRcR/jx6BGNNPkNfnyvKCEvzYRP6XyRYS8L+HfkoVD9Sz/ylbBjO/wQ y98jo/R0fWc3GuMXHQWbywTW3CLQZUM3rCpEV/9+KaiR+e7jQQrw5M8gyJYAwaP2bavl CZ4G7uyxX8lafP8YVfXKDuSQEt/IFVpIlBgmrfIRw4eueCBTrfQIVTQnVntvWxLs9mdq tDvg== X-Gm-Message-State: AKS2vOxKQCuNJPtB+ZgnPs2Zvf51iubQg5+c3S9iGogdtTUly+Pv2wjG 6AzVok/G5bkjG6ZQ X-Received: by 10.46.84.77 with SMTP id y13mr7181049ljd.133.1498049959164; Wed, 21 Jun 2017 05:59:19 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Wed, 21 Jun 2017 14:59:10 +0200 Message-Id: <1498049955-28646-3-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498049955-28646-1-git-send-email-edgar.iglesias@gmail.com> References: <1498049955-28646-1-git-send-email-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::242 Subject: [Qemu-devel] [PATCH v2 2/7] target-microblaze: dec_barrel: Use extract32 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: sai.pavan.boddu@xilinx.com, edgar.iglesias@xilinx.com, alistai@xilinx.com, rth@twiddle.net 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 extract32 instead of opencoding the shifting and masking. No functional change. Reviewed-by: Richard Henderson Signed-off-by: Edgar E. Iglesias --- target/microblaze/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 4136a8e..e959de7 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -670,8 +670,8 @@ static void dec_barrel(DisasContext *dc) return; } =20 - s =3D dc->imm & (1 << 10); - t =3D dc->imm & (1 << 9); + s =3D extract32(dc->imm, 10, 1); + t =3D extract32(dc->imm, 9, 1); =20 LOG_DIS("bs%s%s r%d r%d r%d\n", s ? "l" : "r", t ? "a" : "l", dc->rd, dc->ra, dc->rb); --=20 2.7.4