From patchwork Mon Oct 23 16:09:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 737251 Delivered-To: patch@linaro.org Received: by 2002:adf:dd81:0:b0:32d:baff:b0ca with SMTP id x1csp1610801wrl; Mon, 23 Oct 2023 09:11:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH6pfqk8EcM6Npy/XQEW0NELUKRcKvRboQhFZLjzqBWGFrXCluz12DyhZg6XxEXXLUL7CgR X-Received: by 2002:a05:622a:19a3:b0:418:f63f:7fd with SMTP id u35-20020a05622a19a300b00418f63f07fdmr11351617qtc.6.1698077464633; Mon, 23 Oct 2023 09:11:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698077464; cv=none; d=google.com; s=arc-20160816; b=IiSXZ50tk6u9ZNOpQEmrIqY2AHCOumN6DlZBp7abUHe4HXh8hXSrK0egAV3jViDcm0 nBwrLuXryYTpL/SGeKeziNVFRAxcwCGI83AFvHP1Y4+0Ga0X8xj5GEyNfFAMJsG+ZI8k FihiJTZ6TLtxGtoxz2pajrURa60RIqvAA+9UeqrRmwvykuWms7mQhDj5NfwH7dngPhZW /KmPYU7o2Nar70zhgFB4i9eI9YL4/63KMo1T04e/7IhoETiPw4A2Lzo8y0PEAPeWPVAt C65suLWrxCSBTjdtMCiGpy4ACli06fEMVcd5DQ5NhQ/Up5qBNC+ufaz7MHh9E/wQAk+I WKkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5hoUi02NxWDs20ifpWCQFnAQBxqhpEhCw6XqoL6TeI0=; fh=cx5u7DKGOSTAVM/PLQsESwV3vheqaKcswhPCHwmEH8k=; b=ehlUvlKvXkevGpnzy8QFwN9aZ8Otqs8ca1zmtA/e8YlzlAIXo2QlSVwPRYvYgrxG/L aKbfXJw6/zG1IMpsiN/ZnADJX1KF7A6MN2ZqZ4t5gG6OGpzzJe8L+LOOm9V1zfdBUwqq EOxKK0cmmTKvmODXR9/cNjIP2Qou7YL4HVAHJbInbBc+5jyDIDBNhaWsBAUP0eO9tWF+ GA9UN7kutJmVhc6eJuJsjo1WjBJUy+p8ou+R0GWiI/QYvTHkoi2PtWr/7rl1agVyW7lm VbS2XMcuu53EhEqQtJd6jJoc7T9V/ivRFXqVGCThFMZ0p9CjBi8w1u9yRlnb5fumqMXm E65Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H2IjsxDF; 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=pass (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 t12-20020a05622a148c00b00417f199f9e5si5938841qtx.738.2023.10.23.09.11.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Oct 2023 09:11:04 -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=pass header.i=@linaro.org header.s=google header.b=H2IjsxDF; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1quxVq-0002Qi-Rt; Mon, 23 Oct 2023 12:10:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1quxVn-0002Hq-CV for qemu-devel@nongnu.org; Mon, 23 Oct 2023 12:10:40 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1quxVk-0001qo-RA for qemu-devel@nongnu.org; Mon, 23 Oct 2023 12:10:39 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4084095722aso28443385e9.1 for ; Mon, 23 Oct 2023 09:10:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698077435; x=1698682235; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5hoUi02NxWDs20ifpWCQFnAQBxqhpEhCw6XqoL6TeI0=; b=H2IjsxDFZbt3VkZxUwFMpgUbFescPikobcRuf8JlJl72FyUnxSIXa8ZLQlH0Zi6Lct YbrjSUxBL30VipBNauKSHHEnxnDRlazpfcWOSC0s9dIjdeZmbVeg6t8GLGqJ/Q3Z2qsb q5gyD+gLX4Fct79aiR8HXTZMAboe32HC5yZuO92FJ/k+TS4IauO6gsa+zCXm2HDl4GQF IWW0W7qqr1S96RxrHjSECXgoQOb0i3BURG0/BXMjZ8uJLn0WYg1cA7Lv9LaHIFQ29/e0 GClBE09b1cXSRMhPggcxwpDY1/k7007cJ4RQXSPOhErFo90sFbPFe+t8zTsNNm0kjHsD GDeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698077435; x=1698682235; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5hoUi02NxWDs20ifpWCQFnAQBxqhpEhCw6XqoL6TeI0=; b=dQh5z7ifdxsapbS7bw/n8np8zBoyESf+LFDSoU6xqvcO1m3kCW6zB2piiaBARLpXm1 Q8b26AHhpBV6cRpxOGrC4jbJy4sWNh5oCFmLU+TttCW/Lv6662SXccM2hi0usDtOpXI2 CuQ4f0JQsKErKSgluHvjvLhflqmnYcmJC5r8bcKXSFA3oiiTqFBGF6rgccWoiqhxqxTW VaKp/DAjSw2taRdSCdP4YeZUzh2Swohnz6GWrKW6RW4JS05C8k/iyCVs8u+a3sgYmUSL P6lHpoBIklxEQUFB1W3AWeRRx7wTChsKH0mHET8QeHpbT2JGcB6IjBbyAeSPRpgDFC7c jinA== X-Gm-Message-State: AOJu0YzAx/+4hoT2fTma1Pafqusilntv4FRJVUmxeap0gzIlZ6LWd/jX iOAe5zMnRa7yFXXNtUUHQeDoN5RDg6wJ8peoD8w= X-Received: by 2002:a05:600c:310d:b0:405:359e:ee43 with SMTP id g13-20020a05600c310d00b00405359eee43mr7808740wmo.1.1698077435158; Mon, 23 Oct 2023 09:10:35 -0700 (PDT) Received: from m1x-phil.lan (thr44-h01-176-170-216-159.dsl.sta.abo.bbox.fr. [176.170.216.159]) by smtp.gmail.com with ESMTPSA id bh9-20020a05600c3d0900b003feae747ff2sm14712349wmb.35.2023.10.23.09.10.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 23 Oct 2023 09:10:34 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Edgar E. Iglesias" Subject: [RFC PATCH 8/9] target/cris: Use tcg_gen_sextract_tl Date: Mon, 23 Oct 2023 18:09:43 +0200 Message-ID: <20231023160944.10692-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231023160944.10692-1-philmd@linaro.org> References: <20231023160944.10692-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Inspired-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- RFC: please double-check bits --- target/cris/translate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index 65b07e1d80..3a161f8f73 100644 --- a/target/cris/translate.c +++ b/target/cris/translate.c @@ -336,8 +336,7 @@ static void t_gen_cris_mstep(TCGv d, TCGv a, TCGv b, TCGv ccs) */ t = tcg_temp_new(); tcg_gen_shli_tl(d, a, 1); - tcg_gen_shli_tl(t, ccs, 31 - 3); - tcg_gen_sari_tl(t, t, 31); + tcg_gen_sextract_tl(t, ccs, 3, 1); tcg_gen_and_tl(t, t, b); tcg_gen_add_tl(d, d, t); }