From patchwork Fri Feb 12 14:33:58 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: 8292381 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 C6C8BC1F0D for ; Fri, 12 Feb 2016 14:38:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 300D1203C1 for ; Fri, 12 Feb 2016 14:38:50 +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 902842039E for ; Fri, 12 Feb 2016 14:38:49 +0000 (UTC) Received: from localhost ([::1]:33144 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUErw-0003Wi-VT for patchwork-qemu-devel@patchwork.kernel.org; Fri, 12 Feb 2016 09:38:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUEq8-0000Pj-Pd for qemu-devel@nongnu.org; Fri, 12 Feb 2016 09:36:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUEq7-0002fa-VQ for qemu-devel@nongnu.org; Fri, 12 Feb 2016 09:36:56 -0500 Received: from mail-pa0-x241.google.com ([2607:f8b0:400e:c03::241]:34008) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUEq7-0002fT-OD; Fri, 12 Feb 2016 09:36:55 -0500 Received: by mail-pa0-x241.google.com with SMTP id yy13so3897661pab.1; Fri, 12 Feb 2016 06:36:55 -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=yj2a9k8XllulEq7e4u0T/RMf086u2rLFRwtS+LNNAn8=; b=ssnZDgqCEBtVCLmFHa98OdQWJIW5OgZoZ7ukWkleHRy3AuV/I11+G/c5eqFkHh/AXQ rmcgwXohkAbQNRnL8JMVmhKzhbHYy5Z/vRJv+gL7xTua96GBVV7eLvOvyj5xb3CK7D1g iu2ibkH2CzdegvJ4Jg3sndzYH5Mqbk+ftGZHWDMIGbTLM8Nm+WWTYv1andDknpIvCoTL KKxgcVtn1bW+V0zBqU9BhSlbf15pCHX7T2FYMBalQ4Zftx20mGQ7SMu+Itdv2oc6YSVz vPImAlMJOafsbPY9I4Dt0df5vkGqpt0FDYNxNPag8oNDT5eFX90FcPNS1dxg4ZrBXtq3 krsQ== 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=yj2a9k8XllulEq7e4u0T/RMf086u2rLFRwtS+LNNAn8=; b=exfX3gTs3Cjr3qWyvJyYsTcVHh9vrztQwIbWJau9Y6Izwc7UHlTQ2SWzgbsZ7rtTSJ LWvK62pvStSyLfsKzRiYrz7ENzNEildIypz/4xl7+RNd2wKcVgpoQYO7tg4dMzcyD4dC ezTV67K/wCPCIjA1NgKLrxe70ZzHXvdr/SQARlmCLcyTtjhQJtpj7nu3BJJ1wEEDE5T/ m/4SvBVQl4imHJCpV/efJngdEI+2q3xuZ63pzsm6njxAQNa09OIcQ/yuAG8IRG+b8zyG 4ZOd6copbbw5C4AZGMMqIkeXiHJl+0p48XxF0WBr88ORrXV9Ttd2vba3JXoxLwrUml+Q scuQ== X-Gm-Message-State: AG10YOSgvkTjiDwhjBXeCgG8XcAhSlkZqNtY1m3b1YNyik6VcTVu3vS66kC4yr0yHpeaoQ== X-Received: by 10.67.12.175 with SMTP id er15mr2607069pad.70.1455287815048; Fri, 12 Feb 2016 06:36:55 -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 1sm20015582pfm.10.2016.02.12.06.36.53 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 12 Feb 2016 06:36:54 -0800 (PST) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Fri, 12 Feb 2016 15:33:58 +0100 Message-Id: <1455287642-28166-6-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455287642-28166-1-git-send-email-edgar.iglesias@gmail.com> References: <1455287642-28166-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:c03::241 Cc: edgar.iglesias@xilinx.com, serge.fdrv@gmail.com, qemu-arm@nongnu.org, alex.bennee@linaro.org, rth@twiddle.net Subject: [Qemu-devel] [PATCH v1 5/9] 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. Signed-off-by: Edgar E. Iglesias Reviewed-by: Sergey Fedorov --- 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) {