From patchwork Mon Mar 6 00:39:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 659185 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp1575162wrb; Sun, 5 Mar 2023 16:51:48 -0800 (PST) X-Google-Smtp-Source: AK7set/Ezjqks77jUAlJh7eJq5xeEJERJdrpgDBiwYypYAXVd2gCGaGUao/YhlGFxHK14aqigt+O X-Received: by 2002:a05:622a:13c7:b0:3bd:1914:3c88 with SMTP id p7-20020a05622a13c700b003bd19143c88mr22905770qtk.22.1678063907776; Sun, 05 Mar 2023 16:51:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678063907; cv=none; d=google.com; s=arc-20160816; b=a9A2cfvda9NrfteMQicDi6jtKoG7tz/aT9G0lJNlnRXy3lCC6k8N6rf9iW7cbBgTsI /MQM9iQP+JRPoJKaVrNENsQiqTfpnCR1cP0T6Ggju9vQXSN5u4TKLr2xJvVGn+Y1QkQz YWVEpXQ3/FUVzgFNLEHv18MXI39Ow3G3sYnd2tMKetfizNEWkUMb2tTMfDtBOsm55gEH kN6s+FO1uapPll/BErGHOLYQaotpcKrIqiU8V+KuifE9gdhuBq+ROPNPueocI+KegFtN Xnzexj9hJ6FzvrPlOvpTgNuGz+HEBXep7WxtDZZQn9Kve8NLLCx4NVNJy2CpIpFBIqwo YZwg== 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=XdoIg7z+EU1qAkUBw1OLkChzjjlmMvLO++FZ80hImps=; b=RK7jLj4OZ+IhMusCbr98EJd7isKmu8tZQSLBe+8jlHM+WaXGMPEwtWsoRnqL/ZLx7E jTADpUR1ZYWz6IFLgdHoo6fLYvp+AhzTP4sJlmxi6hdzfLGRBJzOrkvEzx123eIX4K4C Nylb6X7dHiRJ0peyC2W+OibbECnzESMhYHefWtZVQbRWCKTZjdg80W9I/TsjrGxBMZn1 zbvwSETkUT0JFhhnJNoh4nSmuPMmZjSCsut9juWDyN2uQRn+0RkhSaz7QBCvA4jjXWuw yzfD7WUH/oId+flTi/mzplSp63aiC87AFMwMlng6xyza8/caJJKBj+JP8t+IA16/ZvqZ 4g7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="o/hvmtQC"; 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 u13-20020a05620a454d00b007107e3bb636si6687967qkp.191.2023.03.05.16.51.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Mar 2023 16:51:47 -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=pass header.i=@linaro.org header.s=google header.b="o/hvmtQC"; 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 1pYz12-0002IH-NF; Sun, 05 Mar 2023 19:47:48 -0500 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 1pYz0o-0001E3-BD for qemu-devel@nongnu.org; Sun, 05 Mar 2023 19:47:35 -0500 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pYz0m-00083q-6p for qemu-devel@nongnu.org; Sun, 05 Mar 2023 19:47:33 -0500 Received: by mail-pl1-x634.google.com with SMTP id n6so8523978plf.5 for ; Sun, 05 Mar 2023 16:47:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678063650; 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=XdoIg7z+EU1qAkUBw1OLkChzjjlmMvLO++FZ80hImps=; b=o/hvmtQCKqgMYfwV9tUUwu0WCUmmArWgYzdwdsCeFPWM8lLjQHQz/0ZVnaaKLyoAiV ELWc7kx4gPh2WWvJ0jvnG/Vu8SQyulCOwCBDG8Iy9pEEzzjSltZoCHklmQQH4vBgmdSr 1lo3RLc8A5dGdkNq1qUZbYaEi9sJK4sB1HAC/s685gRSFlnfPVVEDTiyUKsV549wtlle vPcsxn1PWpX0Nq5lLd9mjaapF5I1Y8XBxaotO69bNOjG3/nI7U2OwNp0WotjDoSvFftu 5rCxbx/92Jtc2nROXRFwJBy2lrumC+QmLUV6z0FMZ8KnxOiT+j5uIntKqp6NpLhxC2wn KRig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678063650; 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=XdoIg7z+EU1qAkUBw1OLkChzjjlmMvLO++FZ80hImps=; b=DLDg471EDEeZihhs/3w4G8GYjA7BHEUXtSVpP+ci0coTBMJYbCXJ64mjKloExPOru4 K2GsO56FEpyJSfOT8J7WaH3ywFlzFItHsniJi/AaQJHN8fwbb5HGvCZh/td8yQe683Ge vOJpnuzOT/AjG3nw+uABzXFBC/I/v1FadHv2v0X42YoFLGpWXuOZ04BFAgE9VUvprzfE nfBVBEAXaXFVsS5X7KhCSWFUEkutfKztxNKR6aEn5Qi/IXTvLUaIRL2xq2pCFFNLz/9j Y4nAQUW0sxnW142tmJIh81SFFhWgF+CGf0wB1UCl2OGBGki3I52yU3X87918xWDTiuLA vddQ== X-Gm-Message-State: AO0yUKWUV4SlpqssN2z36zyYdYrq1MJo7VIpJXHLdMKVnKgJI85c0eZh NcwQ93P7Fz9kWz4x9KbDe9qGIDqtgeX6Wgbv1OiFRw== X-Received: by 2002:a17:90b:3b86:b0:234:a299:b50a with SMTP id pc6-20020a17090b3b8600b00234a299b50amr9307061pjb.2.1678063649950; Sun, 05 Mar 2023 16:47:29 -0800 (PST) Received: from stoup.. ([2602:ae:154a:9f01:87cc:49bb:2900:c08b]) by smtp.gmail.com with ESMTPSA id mv15-20020a17090b198f00b0023087e8adf8sm4971492pjb.21.2023.03.05.16.47.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Mar 2023 16:47:29 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, Max Filippov Subject: [PULL 83/84] target/xtensa: Split constant in bit shift Date: Sun, 5 Mar 2023 16:39:53 -0800 Message-Id: <20230306003954.1866998-84-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230306003954.1866998-1-richard.henderson@linaro.org> References: <20230306003954.1866998-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.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=ham 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 Reviewed-by: Max Filippov Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 2903c73f8e..f906ba7ed5 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -2047,8 +2047,8 @@ static uint32_t test_exceptions_retw(DisasContext *dc, const OpcodeArg arg[], static void translate_retw(DisasContext *dc, const OpcodeArg arg[], const uint32_t par[]) { - TCGv_i32 tmp = tcg_const_i32(1); - tcg_gen_shl_i32(tmp, tmp, cpu_SR[WINDOW_BASE]); + TCGv_i32 tmp = tcg_temp_new(); + tcg_gen_shl_i32(tmp, tcg_constant_i32(1), cpu_SR[WINDOW_BASE]); tcg_gen_andc_i32(cpu_SR[WINDOW_START], cpu_SR[WINDOW_START], tmp); tcg_gen_movi_i32(tmp, dc->pc); @@ -2080,10 +2080,10 @@ static void translate_rfi(DisasContext *dc, const OpcodeArg arg[], static void translate_rfw(DisasContext *dc, const OpcodeArg arg[], const uint32_t par[]) { - TCGv_i32 tmp = tcg_const_i32(1); + TCGv_i32 tmp = tcg_temp_new(); tcg_gen_andi_i32(cpu_SR[PS], cpu_SR[PS], ~PS_EXCM); - tcg_gen_shl_i32(tmp, tmp, cpu_SR[WINDOW_BASE]); + tcg_gen_shl_i32(tmp, tcg_constant_i32(1), cpu_SR[WINDOW_BASE]); if (par[0]) { tcg_gen_andc_i32(cpu_SR[WINDOW_START],