From patchwork Tue May 14 01:11:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 164094 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp2112105ili; Mon, 13 May 2019 20:29:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxFgnjWWVZmyfgnhUFu43fEvbbIX3fFReweiLWUd7qEUSTOCno/LB0EZNIyhHlov96oayCE X-Received: by 2002:a50:e40f:: with SMTP id d15mr34117745edm.0.1557804585516; Mon, 13 May 2019 20:29:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557804585; cv=none; d=google.com; s=arc-20160816; b=LNK8zxj3X6rnRum3XSkLU+c2RLMZf8WyQ1U1dkOpjQD58uXmggbOwA68p6JJBytpyS lfo4RqL+9igJXF9e90jFCmZKRNU1ScQMKXAYoevz5FvMgvAuObVDF8fHvnPnhNHt6SuF mTbOtZOK7NDI5srtg2Cw7xm9Shsq80OFcGNRIu0EA3Be2JNJCWm2YeZArTmhVCOfZsE9 OKZ0/xWC1Z8qRv7yGrfwyLUSGXPbwrojgiZwG50iGkPbt1+5jgazyeqJ3JNlfeORhFpO 7AinwdN9ShV4AJFKzUdeQC8ZpmvQZbmFolzu53yEfv3r/2IlYBj5nXxskp3U6tVB5rmQ ITvA== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=UDhIE0FmHFjvTg+Yc2t3Xw+YfnUzd/HuDHfr9sdMw70=; b=boEqugiwtAgHAmo2Zm0FSZ5mrnPnQ29Rvoizul6II78ypd0ManF70+fVJzNY995Xf3 kSc6vZoq76tW+yOli7fP7e6pEzZ4+DKNsvc4wW00zaiSaG2GnkyWZgPBexYQh8/Z5/ZX CN6FOwYUXM8DcL38V9FZSo9VK3Uz/AbTO5+fFuSpK1vxf8MPegpl/1fWehG5HC49l4pX gCEAd1/OqIASbx3rFErp4HsFXs9DLSVe4Md8bRwq7mZ5MhuHWtmjzRzfavcyApc5T9F9 3exFVuCoypU6vztfH79sx6d5zC4R6MnOmsV83yCwKFHqD898FZ9e3sV4FvNxRmq0ge17 BxRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=XJqEkukh; 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 n11si1018424edv.199.2019.05.13.20.29.45 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 13 May 2019 20:29:45 -0700 (PDT) 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=XJqEkukh; 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]:38394 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQO8O-0005bE-H9 for patch@linaro.org; Mon, 13 May 2019 23:29:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQO7A-00051J-Ge for qemu-devel@nongnu.org; Mon, 13 May 2019 23:28:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQLz9-0005u8-Sz for qemu-devel@nongnu.org; Mon, 13 May 2019 21:12:43 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:42740) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hQLyw-0005Tw-Qf for qemu-devel@nongnu.org; Mon, 13 May 2019 21:11:53 -0400 Received: by mail-pl1-x641.google.com with SMTP id x15so7328868pln.9 for ; Mon, 13 May 2019 18:11:37 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=UDhIE0FmHFjvTg+Yc2t3Xw+YfnUzd/HuDHfr9sdMw70=; b=XJqEkukhImvF+TMIP67St4SDlllZ5Gc2UsTtGWU+hJbow/M4b0GfG058/m4nUfF/oy Td0MXABa9a01ph2dNKp5E/6IjlZ2hFzeoSBo91QSWM2SIaMWRlsKp5VrV/5JsiVN/+Nl ATrVUqy+pmk3aTcF53hTGTFbRhhrjKX8s+9DnNoVsR0kh7sWrBBwxVg2BEbwbkDgH6Qp PlgT4OBPBwzAERJul400rlCdI7/2VPc0bamuk7xRrMahHOBlEWxPfZL/SvzR6tFMtAJl NIzqzADn2sWWxqxK2Sh6v2QNUUYoVKxFJpTYlmGhpLtwXvwMmiBtE6wtAvmeK2YttNUS KvLw== 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:mime-version:content-transfer-encoding; bh=UDhIE0FmHFjvTg+Yc2t3Xw+YfnUzd/HuDHfr9sdMw70=; b=EFGWJJOehLcuPri7Ngk5dQdCFmUGCuJX2jjc7ayISr/d1tIuvtErkdzLM6+45qXGDq kmJO93dWNFxIo+IGkWEDLw5+1PB+6UXv1c/fQT8gIKBJwyvwnnIzyWh3fX3LG+eJNye4 n4S+kmaifNg2p8mIJ4bz7YQ82XfTufUo27GWbEnlmtwORQ0iGUletvLpO15aqflKURQ1 qAIm4SbdRTKUBuCo9+5phgmmP084N84gc5gl+URxwD/g5goFgQF8rOXr96FvMvYkGYyF DwulkjKCMrjZB+LeyRBwEK/mPK0+o822zKz424nKIsaDElQ0ZmJ4JJ937DrwD0cLI58N BqSA== X-Gm-Message-State: APjAAAWocFXpLXVr2yqPTDD89aTSEszgwNBq2ZpQoyKTENupBke2xNVh htVXJ/n+n5Mo9aZ6tEPz/mkWymZoLHU= X-Received: by 2002:a17:902:fa2:: with SMTP id 31mr35551538plz.128.1557796296078; Mon, 13 May 2019 18:11:36 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id b67sm20029147pfb.150.2019.05.13.18.11.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 May 2019 18:11:34 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 13 May 2019 18:11:29 -0700 Message-Id: <20190514011129.11330-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190514011129.11330-1-richard.henderson@linaro.org> References: <20190514011129.11330-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::641 Subject: [Qemu-devel] [PATCH 2/2] 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@linaro.org 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. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index c4bee74ce5..472d898096 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