From patchwork Fri Apr 29 12:08:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 8980481 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9BC3D9F39D for ; Fri, 29 Apr 2016 12:11:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 02F7220212 for ; Fri, 29 Apr 2016 12:11:44 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E39CB201ED for ; Fri, 29 Apr 2016 12:11:42 +0000 (UTC) Received: from localhost ([::1]:53880 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aw7Gk-0007IR-Cb for patchwork-qemu-devel@patchwork.kernel.org; Fri, 29 Apr 2016 08:11:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aw7E7-0002jF-0F for qemu-devel@nongnu.org; Fri, 29 Apr 2016 08:09:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aw7Dv-0001vI-75 for qemu-devel@nongnu.org; Fri, 29 Apr 2016 08:08:49 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:35505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aw7Dt-0001nj-Tv; Fri, 29 Apr 2016 08:08:43 -0400 Received: by mail-wm0-x241.google.com with SMTP id e201so4518042wme.2; Fri, 29 Apr 2016 05:08:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=e9u2M5xrqqnukuPaXmN4zeocEKPjXuFuKmTwI/16FZY=; b=k3kO9veGn4NacxAauAvPryuaThPtdp35Ozvn3VK92b+uDnpd0uNHPWoasy76Ke9mV4 tarhIK4NOyI/nNNL4Yvw1+k4CqluXvtpTOlIz5orc+sf2wTQILqc2stAVlAP77+LYfHU i2w/ZO+9569yt3a35aVaR5NPBepiKRZ3/JMcb61iBIT4GsZ8oRMCerfmGULfnd/woBKA PFQCGWUwpacVUjIN7mrd+vH6JqGQ5vhJUx8E9eiO1gYzN10bC7K384DaL8CtM8xZjCUD y1mbwU2ojaSraYlgoF8gluwvElBSp+y+otiRkhEEs6cNlcG7Dk3tV5TYzwQoPAbb7aDR GfCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=e9u2M5xrqqnukuPaXmN4zeocEKPjXuFuKmTwI/16FZY=; b=UxYk4ecKc86YIbiMM5sIwwacZwlc13O9De6a9bjXz8C7VYKOWnlZ4qmDvq+2BnYr4C grPlGX9By2JRzOxcRtLYxRZXVTJGHKe0ep3nFH3pQYb5P0nUNszzpQCdVSh9RfYHhqyF D/3WRnBffUrYNP4jh9xFhdKP6b7bSZEGs9h0/KrkXWAkPtXelEAyg9/7tELF0TjqqPUO pL2wVMIckVpfYLzu7fbs4eZeHNFwGpVzk3MnKgvtxYY34xpHCGpkb97ut7kXVyjIIBEE hN+c4qd0xC10+k7hHicus7Wj8R3opAtY4GlRtEVRl5ogizPL/J/v7PgrXc0fSarrQMdO HMXg== X-Gm-Message-State: AOPr4FXhkcWB/LNpNiBg2KocUg5Js8bLAJR6gC+/82lxlJwMCX+ZOSbWhCAWFMELfxdIPA== X-Received: by 10.28.25.67 with SMTP id 64mr3659147wmz.10.1461931692368; Fri, 29 Apr 2016 05:08:12 -0700 (PDT) Received: from localhost (81-231-233-234-no56.tbcn.telia.com. [81.231.233.234]) by smtp.gmail.com with ESMTPSA id gt7sm14512412wjc.1.2016.04.29.05.08.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Apr 2016 05:08:11 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Fri, 29 Apr 2016 14:08:02 +0200 Message-Id: <1461931684-1867-6-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1461931684-1867-1-git-send-email-edgar.iglesias@gmail.com> References: <1461931684-1867-1-git-send-email-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::241 Subject: [Qemu-devel] [PATCH v3 5/7] target-arm/translate-a64.c: Use extract32 in disas_ldst_reg_imm9 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, serge.fdrv@gmail.com, qemu-arm@nongnu.org, alex.bennee@linaro.org, rth@twiddle.net Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Edgar E. Iglesias" Use extract32 instead of open coding the bit masking when decoding is_signed and is_extended. This streamlines the decoding with some of the other ldst variants. No functional change. Reviewed-by: Sergey Fedorov Signed-off-by: Edgar E. Iglesias --- target-arm/translate-a64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c index b13cff7..5c8dddb 100644 --- a/target-arm/translate-a64.c +++ b/target-arm/translate-a64.c @@ -2128,8 +2128,8 @@ static void disas_ldst_reg_imm9(DisasContext *s, uint32_t insn) return; } is_store = (opc == 0); - is_signed = opc & (1<<1); - is_extended = (size < 3) && (opc & 1); + is_signed = extract32(opc, 1, 1); + is_extended = (size < 3) && extract32(opc, 0, 1); } switch (idx) {