From patchwork Fri Feb 19 20:04:49 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: 8363601 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1B7E1C0553 for ; Fri, 19 Feb 2016 20:07:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7682320450 for ; Fri, 19 Feb 2016 20:07:15 +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 D1FBB2044C for ; Fri, 19 Feb 2016 20:07:14 +0000 (UTC) Received: from localhost ([::1]:55011 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWrKc-0007FI-2m for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Feb 2016 15:07:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWrIo-0004Es-VY for qemu-devel@nongnu.org; Fri, 19 Feb 2016 15:05:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWrIo-0007NU-0s for qemu-devel@nongnu.org; Fri, 19 Feb 2016 15:05:22 -0500 Received: from mail-pf0-x229.google.com ([2607:f8b0:400e:c00::229]:35453) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWrIn-0007NQ-Ph; Fri, 19 Feb 2016 15:05:21 -0500 Received: by mail-pf0-x229.google.com with SMTP id c10so58116879pfc.2; Fri, 19 Feb 2016 12:05:21 -0800 (PST) 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=Br3SlS0i3NXuePs2VKkH69xF4dgOiNep8ieHL5AhvWs=; b=BrcfpF72VB+fjTgFTGZRRSPy+87HI8AwhZ/K5sS3mqUUI//xvGTqPNamlupS/35zAr qYD0WJAYZ3z+6AixJdn1NagvBwbh3oQRplw+JVKQdPH/Rj0OhAW2ohe4oHcGArXLcbAp B4T2Znlze0G5iysTsc5ZFGEirI/+UjWSPbJQgEfteD5KE3GIugXakTFQYkO2rxzEl7tc vUzYQQvBf01+zj1PtJMqlrQzYaRQ278DyWCE8t1wJpKCsIyhwgC19S8qOFMcStk9s2If 9srmD0nXYrZo0cKuRXyMxSaSJtFbxpCZcPHBzyOu6UiMkzjoWwiP6mFZGa45DoW2+l22 SkiQ== 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=Br3SlS0i3NXuePs2VKkH69xF4dgOiNep8ieHL5AhvWs=; b=TyxmcACA7etVlI+VpBd41UniO70axmDGbIEXZs93CKnkQlVM6FaNMmPj7uXhvonEA3 JzamXqjCTXs1jgFiC6kuOi3R8Dyro50YikHD8fhzMp2RsCxWG8mD5bW2U4JuIl9TuP20 rYbvdngkld5/laLAHHrHaBn7lP1wDCenrMwfOw08I23BUuHPm8UYwbS2j3eYa/wBS13a SbtNdWXDpPcUD/zTNNP5INAh3MgWRh0iWhuElrsmbumAuJxIXjWKIiEP9MbAac4BXpwp T81gSKUaA5DU2P3tryiIDoE+rhtwmUCG5t425y+9eQMwUAndm0iJYnVHHdOhOx9dQPua K4jQ== X-Gm-Message-State: AG10YOQuN8cAbTcpK5fr8i4ty5UXT4E2CEYirWP9wZfQrSjbpcocdp4cfwQQFoXidkxdEg== X-Received: by 10.98.16.150 with SMTP id 22mr20698221pfq.128.1455912321118; Fri, 19 Feb 2016 12:05:21 -0800 (PST) Received: from localhost (ec2-52-8-89-49.us-west-1.compute.amazonaws.com. [52.8.89.49]) by smtp.gmail.com with ESMTPSA id x1sm19627396pfi.42.2016.02.19.12.05.19 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 19 Feb 2016 12:05:20 -0800 (PST) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Fri, 19 Feb 2016 21:04:49 +0100 Message-Id: <1455912292-23807-6-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455912292-23807-1-git-send-email-edgar.iglesias@gmail.com> References: <1455912292-23807-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: 2607:f8b0:400e:c00::229 Cc: edgar.iglesias@xilinx.com, serge.fdrv@gmail.com, qemu-arm@nongnu.org, alex.bennee@linaro.org, rth@twiddle.net Subject: [Qemu-devel] [PATCH v2 5/8] target-arm/translate-a64.c: Use extract32 in disas_ldst_reg_imm9 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org 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 7f65aea..bf31f8a 100644 --- a/target-arm/translate-a64.c +++ b/target-arm/translate-a64.c @@ -2117,8 +2117,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) {