From patchwork Fri Oct 4 20:26:20 2024 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: 832769 Delivered-To: patch@linaro.org Received: by 2002:adf:8b52:0:b0:367:895a:4699 with SMTP id v18csp960986wra; Fri, 4 Oct 2024 13:27:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU2f8QFUkJaXKuHhn0v5Jt74MWlxbab2Ypf6pNphpT8gk94F2jn8GxCgQMRTt/ZSYt2lmeveg==@linaro.org X-Google-Smtp-Source: AGHT+IE0r/Jum9NuwkBT5AWOYekl+HjrJ6zQUF9bcylsBcvQ2Nc8mVOa6WAXLjufGzGBMVlo+UA2 X-Received: by 2002:a05:6214:4611:b0:6cb:20b6:f39a with SMTP id 6a1803df08f44-6cb9a2f53e5mr50885536d6.13.1728073657876; Fri, 04 Oct 2024 13:27:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728073657; cv=none; d=google.com; s=arc-20240605; b=iRsDIu8svR/ysw9HBxCsv3h8SGnnp0hlfoBxjmsjAiW+YurXqJtzCManV8ljC4BLS+ dU1AGShAzkiHXPHlkfREMn6T9ZhMBjK4414czWyVoMfbK0P8Cv3uQjITpDuIfRXMrOJy CCjcrCFkfZHcfDoJ7/y7iUv2VA14OuxMBo3doZea6wfahO1St/m+3vHozscMkvtzhP4b ReTg9G0gY8YGIigAT2pZLjgiYz5YsSb6ZtomGnRlC2NG+Qy630Z2b9wrrf683Ow0RZ8z +7j+Kyb3ukvkwhTTHjZYAAiNfxagB0RAiPZ4dso63jw4r4fAMqqb3GYjUlR66t78eZY0 qpOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=gS6SPuWgrLj7oyIxESBEyqXFsjeDNxz6I9pqGa/5SWw=; fh=846h4QdG6XFUXqeKWme2NZ8fNBbg0xxTAcQMdciLBtQ=; b=Ef2Xg7rLLL7q4mfAM0hZnMsdt+ezNDWTrsJjjQmHaeKuNFE2+mKMPC/9o+F9aBhOJe rQ3LvVd93ToTVHQSdB3r5CivYfCCpSLULjP/jdZdPx4K8Euhg1kzrxFxlBfoJ0pgjLbJ Uzo18gizdk7ySYHRVK1TT6CW2FBUw1Qe7MHbUO38XDzyhI7ptK92geeQEKzZd7u3ssIX 4Eu2JTMU4NuQsKDvpy2aq082XpXeNh2lbiwGFvcNdwVZ0xUjONSMwfmkPI2QAcKNhXNz BH0N3b5JXc5sNEsergJ1S3PhE43fQ7y7MiSJgaiCidoYHwi+KUoyCP//e9pFYH8zJAUf SJVQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DFoSuCZq; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6cba475a691si5831406d6.223.2024.10.04.13.27.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Oct 2024 13:27:37 -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=DFoSuCZq; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swotG-0007ls-AP; Fri, 04 Oct 2024 16:27:06 -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 1swotA-0007l0-MT for qemu-devel@nongnu.org; Fri, 04 Oct 2024 16:27:02 -0400 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swot9-0007sI-7U for qemu-devel@nongnu.org; Fri, 04 Oct 2024 16:27:00 -0400 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2fad15b3eeeso30447031fa.2 for ; Fri, 04 Oct 2024 13:26:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728073617; x=1728678417; 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=gS6SPuWgrLj7oyIxESBEyqXFsjeDNxz6I9pqGa/5SWw=; b=DFoSuCZq0ns0CWg3oFPr9xAGIYzVEQXA+m5fwIMXKqwH82adt9X33lSJQIJVOHmzQE 8WA7ObU0GCWLyqypE6fpiEexmZW1TL1zICQ7ZNpc8183DFhpb6b9iuVSM536nsxC/B5/ yIdrVx1Bu0bijR7JJa3YvlmbKN9UhSmbfxzH6zkD+Dru2yytNaUDWjvnBQxsRGllkqQT b20sr4jt5kmiF/cx8DSVS5yC0gLmHVlQ6xHAN3N2JkvEt2Do4wJLS3DCXQqXJSvNK12V V1XZbgKlnpr85WbSlSa/AGjVReYoA4HbUrWl2l+gkCQawSVP5+lYr5AY2G7zSQBPqFnJ WmTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728073617; x=1728678417; 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=gS6SPuWgrLj7oyIxESBEyqXFsjeDNxz6I9pqGa/5SWw=; b=qUBAkFPTXoWBg1Hiho6ZMIJXttts5PSw4tETZyqqpe2n8d+YgnzrWJswR6Lta7WRPR /KT5I8ZTZDj9XqDKuBv7CWmrRqNIYL3GvIUBhbuBfUBvOmdEpAypQonhcTHpAiaFY8WV lily8fKLDzBwXf820PhAjTNKL7x1R00++aCtdbvvyzpk9caTFqHSkQ9K9+Q6tw0IIRy6 kcmRmfjftPZFYIaoLGu8SHqXN/hgVHrXsBQeP6ps25tYpGikTGAbaA2SW6SL52b7E/5I 6BXB3NfbhwUxxVdKZ6Tl4hgOeHLd4wJwf20j6k395ScA1m/INyddke6oDGcIqMozx4mK yIcg== X-Gm-Message-State: AOJu0YxaqurFfUXb4mNE9Q21F37dT050DlLl8+dJaU2uha6is9mITIeK RrAb2GMhbEl12kX7a4bzXbpu2djI+F9NTradFRofI3ayyyYtOkcxQAkStSjuVayXHyI7c34Inz2 yLHweCw== X-Received: by 2002:a2e:e11:0:b0:2f9:c337:aca9 with SMTP id 38308e7fff4ca-2faf3d8e286mr17458741fa.44.1728073616823; Fri, 04 Oct 2024 13:26:56 -0700 (PDT) Received: from localhost.localdomain ([91.209.212.135]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2faf9adcc90sm629791fa.70.2024.10.04.13.26.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 04 Oct 2024 13:26:55 -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?= Subject: [PATCH 2/3] target/tricore: Use tcg_constant_tl() instead of tcg_gen_movi_tl() Date: Fri, 4 Oct 2024 17:26:20 -0300 Message-ID: <20241004202621.4321-3-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241004202621.4321-1-philmd@linaro.org> References: <20241004202621.4321-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22a; envelope-from=philmd@linaro.org; helo=mail-lj1-x22a.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 Directly use tcg_constant_tl() for constant integer, this save a call to tcg_gen_movi_tl(). Inspired-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/tricore/translate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/tricore/translate.c b/target/tricore/translate.c index a46a03e1fd8..4a12d2ca191 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -2732,8 +2732,7 @@ static inline void gen_insert(TCGv ret, TCGv r1, TCGv r2, TCGv width, TCGv pos) TCGv temp = tcg_temp_new(); TCGv temp2 = tcg_temp_new(); - tcg_gen_movi_tl(mask, 1); - tcg_gen_shl_tl(mask, mask, width); + tcg_gen_shl_tl(mask, tcg_constant_tl(1), width); tcg_gen_subi_tl(mask, mask, 1); tcg_gen_shl_tl(mask, mask, pos);