From patchwork Thu Aug 8 20:26:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 170836 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp9060583ile; Thu, 8 Aug 2019 13:28:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqwU3qAL4PX2zZsGIFWq2w7ahX2UkJq1o0VkPCSg+GqMUrfjIiw1EGBJ6CMDOaxEwcNR4jaE X-Received: by 2002:a17:906:af7b:: with SMTP id os27mr6016445ejb.39.1565296085581; Thu, 08 Aug 2019 13:28:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565296085; cv=none; d=google.com; s=arc-20160816; b=aSWz8UPKevv9QtVwcQ1eGOqGzVPMC9oPsR5uCcj974oLAJ21Udf/UhoR27RTgjogM3 VOSoYMB9ynj1/l6hmcceG86qls8u35Qb4oOq4iOKFYTg6xdzP/ptO74+p1/OArhF79ES iA/N9TX+k1Nk3sosTbNUSRbHHh+ufU8Q3ziiKPuNOLL18wWYM+yFD7CnTILsSEj3W8o8 xKw6peFHfFm5gWzeR6MudM7Nvs7ZqOwTGeur0HkfEUjZRBnknS7Ab+NX+IspuCoNoxms zlYs8Sa8FHAZ+vwPPwTK34RDwKFVG1rNIJcpYmQ3EXvaszA3Mqsl0YbCU/PKV8JoY1Lm w0+g== 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=otP5Jhfl1E+0A9Fm71GI7ndCATRFA/GRNsznhHQJJms=; b=humm3nd5mAxKkr8I3CQv9FI/itBSZyd255ZPqXyg7Mw+jaj7B/7wPDB09mFfeOjFIX pdjoae51cvkinSvGHAEA9Q1c/JWTDicgMmsk7ltl4iRlEr2OfcLDOyEDQoAaf2SKl7bv /pnsp2TojJduGJA95wr+hXRw4ql64FvoihjsFhZ/VZvHQst4s4yXRJDyRVgSvuYAFjgc Ofo/MaTi4s1kBditIpwEfra0GkhOFr+8ZJ1ZkqLKzHQimhNjVhrqno225BX+o5SIHye6 YU+sRXnYlVaJ9vbTAZlqI62Oy12YOMisKHtQQBq0dZ0s+h69UOSgLqLhvCGKP2VI4vQb aScQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="U6D/k8pu"; 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 s45si37542596edd.112.2019.08.08.13.28.05 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Aug 2019 13:28:05 -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="U6D/k8pu"; 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 ([::1]:54970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvp12-00028V-Ix for patch@linaro.org; Thu, 08 Aug 2019 16:28:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59760) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvozO-0006xA-JI for qemu-devel@nongnu.org; Thu, 08 Aug 2019 16:26:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvozN-0001E8-Ma for qemu-devel@nongnu.org; Thu, 08 Aug 2019 16:26:22 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:45946) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hvozN-0001By-HO for qemu-devel@nongnu.org; Thu, 08 Aug 2019 16:26:21 -0400 Received: by mail-pg1-x541.google.com with SMTP id o13so44619955pgp.12 for ; Thu, 08 Aug 2019 13:26:21 -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; bh=otP5Jhfl1E+0A9Fm71GI7ndCATRFA/GRNsznhHQJJms=; b=U6D/k8pueOnINcKO96ewDohrHmZ87S9SdidjRs0w8n/eTVuJGDAiOHNgUnmrhpiRGP 0RIQ+LDvf7kDPtG6QBd+2OR7P7aVhpmAJm1A9BzZva7KSutWjNwzR7MWyitBzJhsjiLo X4svsBqMWpGXLlwgsher8u03wIP7xwcPPX6ncHlWCqt5mOJxoa1zDYxx2G98g8eqD1Hd 5jm/663k6yxKiDdxjUlRLuYS9gY8yz8rLibCJJtwasI703ZrQZLhM3HvycsF2Jj4LORs jbul/lBhoawVT4/LLWTCCSiubqe/G71gIiHi0TwqMGKsTKjxB/2FLh+Nqu/vrV5CasZC qVkA== 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=otP5Jhfl1E+0A9Fm71GI7ndCATRFA/GRNsznhHQJJms=; b=T/WNZ73Y0J3vSsJwAWlTUF1jeh0rBJuZ7cktHML0HUi9/b8quV7G6kGSKOfd9OO+rO v+KxynhPeM2aymmQo1i0qgzk8MNB2iun35hb2aFZ7N3fxvQUbSF2Jq5EeTM1io8SIpxT LBGgNI6bqtRUOVXtz/0sncGvy4RuFgtF+/wpFDcHJZZEoysvKXje1z+Gvy2VvFNZ6hEw 0qFpL5V7po/RxkqQXL6bRjoKJ8glKzI9V/NnVkc/2zibALNR0EO03InjKXo+KnC0jGg3 cmMMXCiWkG+2rhefjJ01zRlKBW0bosvRCpyz+wOQuwH6zBLrxYjyc52DuKZMaSdFj6cX 08VA== X-Gm-Message-State: APjAAAUNCFncZGa9hIma6qbyoxcrrZ6I/rLrtFSSe367uSjNQsjUIEdO kGa+ZL0QDimAxumALSLH/fiIgmxusWY= X-Received: by 2002:a17:90a:2008:: with SMTP id n8mr5763309pjc.4.1565295979981; Thu, 08 Aug 2019 13:26:19 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id v12sm2850146pjk.13.2019.08.08.13.26.18 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 08 Aug 2019 13:26:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 8 Aug 2019 13:26:10 -0700 Message-Id: <20190808202616.13782-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190808202616.13782-1-richard.henderson@linaro.org> References: <20190808202616.13782-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::541 Subject: [Qemu-devel] [PATCH 1/7] target/arm: Use tcg_gen_extract_i32 for shifter_out_im X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Extract is a compact combination of shift + and. Signed-off-by: Richard Henderson --- target/arm/translate.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) -- 2.17.1 diff --git a/target/arm/translate.c b/target/arm/translate.c index 846052acea..43e005d191 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -620,14 +620,7 @@ static void gen_sar(TCGv_i32 dest, TCGv_i32 t0, TCGv_i32 t1) static void shifter_out_im(TCGv_i32 var, int shift) { - if (shift == 0) { - tcg_gen_andi_i32(cpu_CF, var, 1); - } else { - tcg_gen_shri_i32(cpu_CF, var, shift); - if (shift != 31) { - tcg_gen_andi_i32(cpu_CF, cpu_CF, 1); - } - } + tcg_gen_extract_i32(cpu_CF, var, shift, 1); } /* Shift by immediate. Includes special handling for shift == 0. */