From patchwork Mon Mar 6 00:39:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 659204 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp1575501wrb; Sun, 5 Mar 2023 16:53:07 -0800 (PST) X-Google-Smtp-Source: AK7set8DpE9TXC7x8NJUED3Qm2IgWUz3GtroYJg6fC5xmjdDEzzLSPwkj2tCcIxgRHqRYS9IHgor X-Received: by 2002:a05:622a:44a:b0:3bf:dd1b:11a0 with SMTP id o10-20020a05622a044a00b003bfdd1b11a0mr16427859qtx.17.1678063987224; Sun, 05 Mar 2023 16:53:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678063987; cv=none; d=google.com; s=arc-20160816; b=xq2ibbeFPXZAYJnr3HgqA1SkG+c4i2/i3N65VilgniEPWoS9beDI+Z7bAk6NKBkk8J MkiTCafhrvYCUbA/VmzLxfUGno2aRO6toQkNKy+khfw45+PEPgsjANT5J6P1IhkA0cUn w46xgjKAWHqG29YP3WQXBZIsU1SzBysRaroRRoTZb1UOLrBIJj/jfOnEeQEMo/kMqMLZ khspeinlQyLCBpG7tZyDxifgjfJVTlCxJVVICDNX5b5/gDNPvC1rSWxBgA9wJlxBElDK BLyHOLRPETuZDhHmWpC/jDIBda4ZtJSSALAG24SDLGm07RsLKnzLKaVHAnwVXtttfas+ myXA== 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=HyGMrsQTYruCIAiU5aChMmQRcQ7d0Js3zv9Ml813lNc=; b=lXcVJMuU5EW8kpl+0A8UvE8lm1K5mqv/XnS31HBVeODnIp2RXTID8/f4ekVUGEeziF h8vLu9kxnJbbI4D0e7K4wOCuSsOamOaQSCr97OFcv4GR3p4y4odcx/3g1JAFyMu2u36Q 8MIBLzhFwNXbRhAu58dWFyTO46KI80jkB0a19JRqOFpFE6hoC4B1w7ayT2lKvr62qXKp qKKXxrZxgsv4TbfRiKZskKGnEe/hfyelAoKEvCh4nqrRjIeIfIwgXg93gqmI6QMSGor2 xiiZaYXAy+WJtp6HJOa3X7LDVHcZkXanR2MusCHWlPMR+gVOU9WacN958D3dNgPbaaRH 1fHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fDdcjmKP; 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 m2-20020a05620a24c200b007429b95c2dfsi7043612qkn.477.2023.03.05.16.53.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Mar 2023 16:53:07 -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=fDdcjmKP; 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 1pYz14-0002Vo-Qe; Sun, 05 Mar 2023 19:47:54 -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 1pYz0m-0000uY-E7 for qemu-devel@nongnu.org; Sun, 05 Mar 2023 19:47:34 -0500 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pYz0j-00083a-P9 for qemu-devel@nongnu.org; Sun, 05 Mar 2023 19:47:31 -0500 Received: by mail-pj1-x102e.google.com with SMTP id oj5so8146011pjb.5 for ; Sun, 05 Mar 2023 16:47:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678063648; 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=HyGMrsQTYruCIAiU5aChMmQRcQ7d0Js3zv9Ml813lNc=; b=fDdcjmKPEP5xklk0QJ10lfYmeCmQ1qsEdPQp0EFZnqJoIIaw8Pes2T2MXoQQJIimXQ VVSUmFUFMlTg3nArrCeDBvEdFZV2q6v2r2AQxbXAKLuA1O9XXNn8VqF5R8G9+HJ0FxBu cqYNkal5tS2LVqrCS2WmEQPURqMULg8OJdB3/oTqQQuW9YA7OXfcAmOz7T7qIWJSE/6X zCRZi3yoMramDFohSG7lrmXwF+VkvT+o1s1CCrBb2nPhYwj84pfEJvD/Y9Vh72JgKlRA 6uKOcajvDpIEyFv4LCE4r6gTDJsTHfttmJP+a2/XT+XVYk9SlvqupRnkzpU/q4uiAMj2 BPrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678063648; 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=HyGMrsQTYruCIAiU5aChMmQRcQ7d0Js3zv9Ml813lNc=; b=BVQfc+4u/8NPz1jCw8AnqubXzLkBZ53z4ALyNwLVPqvoE6jsaTT7hlj/YL+lm7rNse WM13q6ljrRLEV5ltVtfr+ZjI0ZWQui/Tzb9buaOKEcLXtApJ3bo6d49eADOedPxEVOMu xp2zYY7myhJJVgeUPTBnElWBCLpj76D3cH9b6GuKmNc1RiXbZM/C8bcNg5EHcbZFyXOG tMgJpbpo0NHs60Dyj7fn/QDHHWCRGaieHE3xObCLX3HWSyfIfRj3bqfP5I9aotQ3rurS Il5f1xBhGp+as+2PePK3EIdRGIkHTVjBparg0hrGGzPCP28UATiK9EJq1b7GZzLh2Zxw A4aA== X-Gm-Message-State: AO0yUKX7DIUgUlZWMN94H1sPbGXnuaG2XdhZG6TdJcLdPB7KN+pFbCfq 2HMXxUFDk1FH0GmIKxdueDZnmO+x72aq07AqSayQuw== X-Received: by 2002:a17:90b:3e8e:b0:236:99c4:6096 with SMTP id rj14-20020a17090b3e8e00b0023699c46096mr9487705pjb.35.1678063648403; Sun, 05 Mar 2023 16:47:28 -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.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Mar 2023 16:47:28 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, Max Filippov Subject: [PULL 81/84] target/xtensa: Avoid tcg_const_i32 in translate_l32r Date: Sun, 5 Mar 2023 16:39:51 -0800 Message-Id: <20230306003954.1866998-82-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::102e; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102e.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 Use addi on the addition side and tcg_constant_i32 on the other. Reviewed-by: Max Filippov Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index d727f9ffd8..41b84082de 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -1721,10 +1721,10 @@ static void translate_l32r(DisasContext *dc, const OpcodeArg arg[], TCGv_i32 tmp; if (dc->base.tb->flags & XTENSA_TBFLAG_LITBASE) { - tmp = tcg_const_i32(arg[1].raw_imm - 1); - tcg_gen_add_i32(tmp, cpu_SR[LITBASE], tmp); + tmp = tcg_temp_new(); + tcg_gen_addi_i32(tmp, cpu_SR[LITBASE], arg[1].raw_imm - 1); } else { - tmp = tcg_const_i32(arg[1].imm); + tmp = tcg_constant_i32(arg[1].imm); } tcg_gen_qemu_ld32u(arg[0].out, tmp, dc->cring); }