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: 159854 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp7531238jad; Thu, 7 Mar 2019 06:59:43 -0800 (PST) X-Google-Smtp-Source: APXvYqyby8d+XuxLi/5eX1yPgUoj7JK/OUsyuL7GwrL5JNm9xb7elz+/2qVxG4k+y5WXXD/hy55M X-Received: by 2002:a25:cc1:: with SMTP id 184mr11574103ybm.395.1551970783046; Thu, 07 Mar 2019 06:59:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551970783; cv=none; d=google.com; s=arc-20160816; b=qfqZyql49NsxP837ZZl/+Aid7NdKGTK4boNKX+88ptY0vgIesb/S+ekm7p8mqs7N49 5uvjIENZ1uFLT7/Zct6HDmnbaUGxA8UwyWyJ4wV9b4p+jOdBsuAdNPdXKIMsFFNq8lNU Ia+IpZeKMnsgzgbhuUBpXAK894JAZGf08Mu0Vl8QduCm2DohHg0qLqc14/4hUXqqq/2J xt1VkXfxddRD0FDd/u9Dp58HhYWNKlrdmO7gXkeQVZPcpTH1OziJElDgpbTKpjHbj9H/ VrOODVHR7PUsAWQ7n1Vy46gFzuET7pGs5Gmo+OK5d/fbCsFnv7Et59xXiTUalWespCd9 AsWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=swairKUpkVUyv6vQDUxZREMTyQpkwikTQdcjVzA2r4A=; b=peVo6uxygbhFL0yUe3FpF2V6EWVc124eoonAkKAZ97bswIS+LppFTQ632/HgR6iO/L 7FV72Un2Lvz5Ix21nxwUpeFQqza7OA6/AkwrbOCUklaFsVlooGHMA53n2tZ4amm/KvOk 56LnUlJBxg30If7cJqNmXTGc2DsiumLlKa64rYB8UKzkSk5PDqoW8u4VkLt3dQocBAZw 0PIoI6r212bTWoo4dd4eeYwomfe1qjqUdFoXGhSPkA7iCayh46wHt/BfkFePsF9Ckx59 BVhJYJDkGfWgkD2GHie2z7KpEIkGVVAfibUihnJXO60CLbjdHrFASvCFi7jna2hSy8ss rXdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="ZZne0/wM"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 203si2729244ywl.14.2019.03.07.06.59.42 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 07 Mar 2019 06:59:43 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="ZZne0/wM"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:53219 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1uUo-0004ZP-Fl for patch@linaro.org; Thu, 07 Mar 2019 09:59:42 -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-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+patch=linaro.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 --- target/arm/translate-a64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.17.2 Reviewed-by: Philippe Mathieu-Daudé 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