From nobody Fri Dec 19 15:55:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1565962524; cv=none; d=zoho.com; s=zohoarc; b=LDAMWWXWpUGUC9C/FiEO4JCHnEmHorwjNszRZkdLhMjLolCbI7XmyHh6QJZ0v8F9mZ/ehh4tSmyaW3Rm0RKqj4yuuOYofh7nbiM8SvSUxJirnO9atJkZq6h1YuB/1RD/kCavNrEjVNKzzcVQLerxHzd6skZrqcHT9VVOy4NK5WA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565962524; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=2z9eRXxGkGDLfMKepMdpB0DZoxXwzKF1DXZHdT7+7v4=; b=lutck5lvGMJZ1oaMb3IkRCCuY8qnAfhba0XCA3DYZ6xeULSA2sIY2AN/v/lmc6tomoSBh+k52km8gpqI8fy+uquqOtbUP22f5BB6yK53Pe/0zwpq/bDPPoEDaWK4a8/nqgXio46tP/TB7sGX3CB3nDvUPPPrUW/8TERPDZT6kbA= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1565962524348146.67563392697457; Fri, 16 Aug 2019 06:35:24 -0700 (PDT) Received: from localhost ([::1]:56208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hycO2-0006I2-Ea for importer@patchew.org; Fri, 16 Aug 2019 09:35:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35431) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hyc73-0003Xt-Ob for qemu-devel@nongnu.org; Fri, 16 Aug 2019 09:17:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hyc72-0005lK-Pk for qemu-devel@nongnu.org; Fri, 16 Aug 2019 09:17:49 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:37991) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hyc72-0005kV-Jy for qemu-devel@nongnu.org; Fri, 16 Aug 2019 09:17:48 -0400 Received: by mail-wm1-x334.google.com with SMTP id m125so4047403wmm.3 for ; Fri, 16 Aug 2019 06:17:48 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id 4sm8705796wro.78.2019.08.16.06.17.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2019 06:17:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=2z9eRXxGkGDLfMKepMdpB0DZoxXwzKF1DXZHdT7+7v4=; b=JcGt2eOV0a+xUTT7te5LNFg+sF0Hbmz1RatopA65YqiCjcPARH5xKEaQV+uh+be/vt suRNg6IoEabN4Ct8zZh2FQCBE2RGAJwvlsy9qYcYvD3JEjR1N4GcSWCYscL2oIPuXUWZ +orwrP6ygI0WlzCL95hXT7K297rsEU8xcbJW9DbjvpKf+0NAqBvTKJAfxnUjf62bND2o T9gk+g6xVNO5LX3sTVm1WjTYSOLW0pyLxmNKfvGk/SJcGJDYJHbQJuWBJjtctZsCvyLu 0s03Y3euldlfJRcByfKuhgGjnyBgNYTvQ8zbTjhQ5feNBbQCqrJS4Db6+5L70G9WIyAW n0Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2z9eRXxGkGDLfMKepMdpB0DZoxXwzKF1DXZHdT7+7v4=; b=Cn/9bppDZtuPZQip0bI4XOg6iEovjA0HzGAjpbBx1Revpo6eOipLUGKTnDkhIRj07S NecO9FHaSSkSRejldzPrpCsLyZknwYaIHVRwhBu5Aj/1vMZxMZNSVTgdYF0hYdGtd2xM p6H/hvi6JnWhW8JqkO4UYJA8OlK8ZKLZ/bhUcNyXys0eg9qP6a4Fjoim7Gwbf6cbfM6M E4akzn78TFcYCM8K+5uueH1rvBO2rwIq4tsjAMIZ7uRk9+anplOwYUG7h4Dj6L9BqL+k E/FY6Sji7R76XcPTrZi8Lwn5o9GASh8lK1/vWoXVGfsHJn/vzGwbuq3pCE7Zr04roHkY UdLg== X-Gm-Message-State: APjAAAVDly7suwGxcjFEP+85iuihma5Ag9rVRaYui7Pmg1rQBtVwDEn0 cNfWA4klVC/lp0YbcIda0/sMYkGgMyjMAw== X-Google-Smtp-Source: APXvYqz0uzCnfQ105gpJZOEg9x3b9P+zA3WpKeJ3Y1PIlaxjV4Qr+0XEnQaCY0mWttKXif/9+UVSSA== X-Received: by 2002:a1c:2302:: with SMTP id j2mr7184869wmj.174.1565961467468; Fri, 16 Aug 2019 06:17:47 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 16 Aug 2019 14:17:13 +0100 Message-Id: <20190816131719.28244-24-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190816131719.28244-1-peter.maydell@linaro.org> References: <20190816131719.28244-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::334 Subject: [Qemu-devel] [PULL 23/29] 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Richard Henderson Extract is a compact combination of shift + and. Signed-off-by: Richard Henderson Message-id: 20190808202616.13782-2-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 34e65cd80c0..14d6b6d4d28 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -605,14 +605,7 @@ static void gen_sar(TCGv_i32 dest, TCGv_i32 t0, TCGv_i= 32 t1) =20 static void shifter_out_im(TCGv_i32 var, int shift) { - if (shift =3D=3D 0) { - tcg_gen_andi_i32(cpu_CF, var, 1); - } else { - tcg_gen_shri_i32(cpu_CF, var, shift); - if (shift !=3D 31) { - tcg_gen_andi_i32(cpu_CF, cpu_CF, 1); - } - } + tcg_gen_extract_i32(cpu_CF, var, shift, 1); } =20 /* Shift by immediate. Includes special handling for shift =3D=3D 0. */ --=20 2.20.1