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: 1992954 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=DFoSuCZq; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XL0T56DP8z1xsn for ; Sat, 5 Oct 2024 06:27:05 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swotD-0007lM-8J; Fri, 04 Oct 2024 16:27:03 -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-0007kq-Bw for qemu-ppc@nongnu.org; Fri, 04 Oct 2024 16:27:00 -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 1swot8-0007sG-Jz for qemu-ppc@nongnu.org; Fri, 04 Oct 2024 16:26:59 -0400 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2faccada15bso26364011fa.3 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=QWYkit8qJEEheo0y2mKYZYfh5YgvdcmJGsRNsgvkWyaYYaMiiv2xsaogS6cW2k2xB7 zhQsL5yQQ8lqpcgDdA43uU7qduNF7+ElXMGx0DS7pLnPa7vFLFyfcj41frIJEp+jZfWd 9IP4a4y5DjItyZXWAseJtyag4rd+fyvymA5P49l82pJpwuqnjtY1+RLiKEFUhdn7UhEx dxQQ56MEL0dsC3JS3dvbkIApr/7iuHmNbnhFuGRI8H8ONoCsxVx7VEjMhjoFd491PLBN 07qdxpI2RLsFyylcoYWYklmeY30b5xcHf2qhVy48r7YRcu9/0Sy0uy8n7PJ1hzLzAblO sxng== X-Forwarded-Encrypted: i=1; AJvYcCUFnm9KI+g/87JwIFayapyNZsqulDJtPlF5IvJ75VpXXa3aQBOA0GOFGvZJ+2WkAJ7Qp5PqNPUgvw==@nongnu.org X-Gm-Message-State: AOJu0YyV0fAoooddXhn9d6cUEORuJeGRwApNeEbqjgYuqhMsbdWVHRFY lGVlEt387u06wmbHTaz/gBEXwL4X0yTjcgjV0D0jGmT6B9jeYu6KLr4RUOEW6GI= X-Google-Smtp-Source: AGHT+IGuXzpPSeaeIsOXQuK44wcQBDI9B0vzoELUhRCBpVKUpQ80KDCeUPVnvHdF24sfSiFX0WMJEQ== 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-ppc@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-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-ppc-bounces+incoming=patchwork.ozlabs.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);