From patchwork Thu Mar 7 14:41:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 1053005 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="ZZne0/wM"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44FZ2Z4qsMz9s1B for ; Fri, 8 Mar 2019 02:15:50 +1100 (AEDT) Received: from localhost ([127.0.0.1]:53207 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1uTA-0003TH-By for incoming@patchwork.ozlabs.org; Thu, 07 Mar 2019 09:58:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1uDN-0006sV-HJ for qemu-devel@nongnu.org; Thu, 07 Mar 2019 09:41:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1uDM-0003aX-Ps for qemu-devel@nongnu.org; Thu, 07 Mar 2019 09:41:41 -0500 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:42845) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h1uDM-0003Zh-Jk for qemu-devel@nongnu.org; Thu, 07 Mar 2019 09:41:40 -0500 Received: by mail-pg1-x542.google.com with SMTP id b2so11406756pgl.9 for ; Thu, 07 Mar 2019 06:41:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=swairKUpkVUyv6vQDUxZREMTyQpkwikTQdcjVzA2r4A=; b=ZZne0/wMGGVwzNeAw9hh7z4Y4Dkwu9/icJlwFltEoqE1pO9tqjMd+LBkrNiq8jktBI eEkoov7+5688ALcz4rTIsO54MaKBMsCT5WDSNv9+Cn0n1x19oXV+zetMG8lBwy0SK86V ybmTF9AP0CXMVDpUWSvRaCW1YZgxpSmdL+nvWSJy4lZ7/hgw+X7jist7DYzSjYI1TTn+ fDVexlaArXtDN/ZoZFZTrb/P+HF5qfg8QAvTxasHKUOQVhMag7UIIgCuTtBuCVCQtroy XA7So2wIP7glU5QJo3Vg7+W6eTRiz4cqAOO0mf4GAQ+TyrBXuWRlMfQmYH31nDKw5kRE Dkfg== 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=swairKUpkVUyv6vQDUxZREMTyQpkwikTQdcjVzA2r4A=; b=Kn3cTHx+QZ2YYFls6WUoFK25yamnslju/ZiyqsxFSv4sqmIDm8TExev3oVPVd+UX/m +ZkAnzAM5oMYzCs0i+lnBrIeLJHJ/PF7vcI+e+7CldZqfyGu6G+kcon006aXbJGXQFsC m/EoFGmgVIe63KVwyUoqSKKR6feO8lxHtkMchDlVUuHz9cH9pMNl4TMQY+5AaFs5orqG cADV9nZPalZ6uJ0nqmNuFTuFplLoSmuZHI9Ek7E0CQQSiGtltXAow79jsbF44ofHsDFj movYnalcQgY/GjGTJy0T2NILaRRsNKDZqPPgUuHVofcVC5HOJczqxqdeLfm6Q4PM/Ppl UlCw== X-Gm-Message-State: APjAAAW7vEjbTNUXaZlP3tclzxXXV0NvLwn9eWINDefqrDjZYQrY8/Zw 1KAO0gGZD65Y1HdkyBBF3tsuEAZPUws= X-Google-Smtp-Source: APXvYqwYDmeizrqhs32t2mx3XnIFeSX5Oobzx5RCh/4fC8xWTeV+9s2t287RMzsyZz1b97M3WrNvlw== X-Received: by 2002:a62:57dd:: with SMTP id i90mr13163514pfj.154.1551969699261; Thu, 07 Mar 2019 06:41:39 -0800 (PST) Received: from cloudburst.twiddle.net (97-113-188-82.tukw.qwest.net. [97.113.188.82]) by smtp.gmail.com with ESMTPSA id p2sm6222838pgs.7.2019.03.07.06.41.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Mar 2019 06:41:38 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 7 Mar 2019 06:41:26 -0800 Message-Id: <20190307144126.31847-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190307144126.31847-1-richard.henderson@linaro.org> References: <20190307144126.31847-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::542 Subject: [Qemu-devel] [PATCH 9/9] target/arm: Simplify BFXIL expansion 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: Peter Maydell , qemu-arm@nongnu.org, david@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The mask implied by the extract is redundant with the one implied by the deposit. Also, fix spelling of BFXIL. Cc: qemu-arm@nongnu.org Cc: Peter Maydell Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/arm/translate-a64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 54fe94c436..39e0512d21 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -4043,8 +4043,8 @@ static void disas_bitfield(DisasContext *s, uint32_t insn) tcg_gen_extract_i64(tcg_rd, tcg_tmp, ri, len); return; } - /* opc == 1, BXFIL fall through to deposit */ - tcg_gen_extract_i64(tcg_tmp, tcg_tmp, ri, len); + /* opc == 1, BFXIL fall through to deposit */ + tcg_gen_shri_i64(tcg_tmp, tcg_tmp, ri); pos = 0; } else { /* Handle the ri > si case with a deposit @@ -4062,7 +4062,7 @@ static void disas_bitfield(DisasContext *s, uint32_t insn) len = ri; } - if (opc == 1) { /* BFM, BXFIL */ + if (opc == 1) { /* BFM, BFXIL */ tcg_gen_deposit_i64(tcg_rd, tcg_rd, tcg_tmp, pos, len); } else { /* SBFM or UBFM: We start with zero, and we haven't modified