From patchwork Tue Apr 26 16:29:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566016 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3751056map; Tue, 26 Apr 2022 09:32:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeITLuOOiqfumMrE8ATjzAil8N6/RXBNaVqkcsGW+w13E4EbUWP7PQQGfdhn7tF0Ki2vnA X-Received: by 2002:a25:af4e:0:b0:645:1658:e1a7 with SMTP id c14-20020a25af4e000000b006451658e1a7mr22285315ybj.642.1650990773740; Tue, 26 Apr 2022 09:32:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650990773; cv=none; d=google.com; s=arc-20160816; b=XuVuow6xG+1sA+kXJ43QEiFp5JeuVFde8zo9g++tow1b5diEOFNcUpH+tZjz+GjwYV QuHsDnXTRERGDfA1BH1CK8V0KZz0mmKBgTlXYajtGelyJvN7/HLcoVUOmOxa4JlhgzdM Pzyizxjmi0/u/xKKFWvAx0Q0Rr4cSvOdchNNdBJvm5ETm7ku6uqHoYw1Pz8kZJPJoU/P nAbABS2fRyyA8W0lGAE9x2vnmSljKNpxKnfBL2Eyh2iJxaLGO+Xm43dqx+jdlSJTeiGM QOwo5DyaxsojO4Mx9b7BL7maVMS33gAuu7PQkAIT1mSugNU8X+9xrVJVzJFqrYstAXS3 no0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=IaB7fhzMyy2+IqbDxRpXo2ZA5fKxHogw6KAk6LVPn8c=; b=Tq7UYxbISkjjkTu670NpEqFf8kBa47mkiUpEYRBnsVDQSaZbTYPtZB0grVYDJ7dEd/ 9f0oI5HZltlaugPgA8QFrVD8X69L4OO0qP0fPdtN7S3bVJ8c/nRLmhR87dtV1pPZNGeN f7Uv9dpcx1KHf8dQgVk2MP7aK+3hf6uTxb8OXJR74VTw8/oN3ulQl9DUVrAXGyXmptGV D/zqecidPdZ79GUCk9m85sf3dhM/EgnZZTLzk2+y/TDsN8U8YIMBJKazcXDkakabFTic IIPUR4dkAKMxcD/DvnOf2sg+u+VGr/C20LURI+JLVfv/u5WShpwyw/5FMzv2YdQ6iSB3 /g+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i3graDJf; 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 l144-20020a812596000000b002ebaf08219csi13310145ywl.498.2022.04.26.09.32.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:32:53 -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=i3graDJf; 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]:54560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njO7R-0002yH-7i for patch@linaro.org; Tue, 26 Apr 2022 12:32:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5U-0002vW-9c for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:30:56 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:43004) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5Q-0003lF-49 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:30:49 -0400 Received: by mail-pf1-x42c.google.com with SMTP id j17so18442209pfi.9 for ; Tue, 26 Apr 2022 09:30:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IaB7fhzMyy2+IqbDxRpXo2ZA5fKxHogw6KAk6LVPn8c=; b=i3graDJfIREqFUYkftKwnhLy2jnE1kl0ib8UbRAgwNs/Vk6wLFQtP+JvjC12/pYWDJ 8dSIDsHTdB2ze9ATUJQVS6xEGD8HPiuDQDkvXu6h4QfeW+Whf1dDM4uCVBZ41MF4czdI xMxuBhMqIb9VUjxFm8llU/G1DKVICnO85hiIupMfMLAsoFPxc6kyNZzIv70kadzER+UD m1tRxSggVNL80uCPAJWdgJXlVcTBb5yZngwCDqdcWqUcQErOu97GlCYSCWbQfFQ0YgzG sC/ldIOsND70468khiRJ/xuq4sTDAC4dhPLID+RWKPZUotk1BSfcryh3VvyLhYzU+Vki j6rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IaB7fhzMyy2+IqbDxRpXo2ZA5fKxHogw6KAk6LVPn8c=; b=frJNW6t/oY2dj/VNye2sGSugpy7iagicK/xVxPxrX8UXGYNwtRzG/qwbTRmqYC6d9E X5VqdwFrYd34aY28PwX8CBWcuAH2TkPiRaG67BKf/pEGEYz+H7wVi5yaQ1L+6BNH8YoT bfhyr0Xrt4aiSrNe3JIj+hfjHeIEA4Pk9UP9B3YaLWo+puxqcEbo3Uc80iUl/mx5tWDr Id00UG055XoZ5fv2RCpZwAsg9iXhA6hvOR9t5GUPuygwV8sqe7cfvO4of7zSlaRSgm6V /b2tR/jFELn5vAkN9sd7aV5gM9i81a4a9rA1JbQazXKz0YJJLBo22J7gMtnawSz3ycR6 9uoQ== X-Gm-Message-State: AOAM531IaaSO7JXlQ1eaFMTGp9o9qtLlV4gbuYMlP9Dc9e/PTnItIIX9 BuktpPSALs5o9qqg1XhygLXcTq/qfyEtKw== X-Received: by 2002:aa7:8e44:0:b0:50c:fc0e:8d25 with SMTP id d4-20020aa78e44000000b0050cfc0e8d25mr20068157pfr.81.1650990646223; Tue, 26 Apr 2022 09:30:46 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.30.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:30:45 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 01/47] target/arm: Use tcg_constant in gen_probe_access Date: Tue, 26 Apr 2022 09:29:57 -0700 Message-Id: <20220426163043.100432-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index adbcd99941..c6ab0433af 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -240,14 +240,10 @@ static void gen_address_with_allocation_tag0(TCGv_i64 dst, TCGv_i64 src) static void gen_probe_access(DisasContext *s, TCGv_i64 ptr, MMUAccessType acc, int log2_size) { - TCGv_i32 t_acc = tcg_const_i32(acc); - TCGv_i32 t_idx = tcg_const_i32(get_mem_index(s)); - TCGv_i32 t_size = tcg_const_i32(1 << log2_size); - - gen_helper_probe_access(cpu_env, ptr, t_acc, t_idx, t_size); - tcg_temp_free_i32(t_acc); - tcg_temp_free_i32(t_idx); - tcg_temp_free_i32(t_size); + gen_helper_probe_access(cpu_env, ptr, + tcg_constant_i32(acc), + tcg_constant_i32(get_mem_index(s)), + tcg_constant_i32(1 << log2_size)); } /* From patchwork Tue Apr 26 16:29:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566022 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3754208map; Tue, 26 Apr 2022 09:37:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzA7uF77Rt4e+qUMUA8HsJbvqb3E0ncdRgQqV60POpV8TER4d8KHxw4JGjderLzPeEe0pz3 X-Received: by 2002:a81:128a:0:b0:2f7:e35e:6150 with SMTP id 132-20020a81128a000000b002f7e35e6150mr10961138yws.183.1650991030627; Tue, 26 Apr 2022 09:37:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991030; cv=none; d=google.com; s=arc-20160816; b=MYbdWNX4+tLpvupjvtVRmo+s37SIHbely81xRfFI+STgRyeIlDgAUqzNH+J3d6Kv+r 5/+df0wj/9E1ApwVNRHPaDgQ0L0mvWepWYCv073ur9UHQOumn1ZFrTj75BX0A1i+LvvS rBiQ8vz5FSZnNpT/La6BOdDChlyXxwM+W4A9gx4izjqzluGjs2s1LiDK2LMK6F4bx6/6 pcqXAlNHlDJ/RyMFc12fUkexngREsoZO7QFraYdwC+UEgLPnv2b9voGRWABVMnXmM5HE XUxeh0bpWaoSzS8rU5sA3cn1YGTQ7ZITzKCRoj+LqmeT4HiQR1BTxoXYFdERH1A+j30z h/2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=A3nhL9lpF5kEdI3yITzr/5HwVsaS4vWPU90RPBOwW5I=; b=wQKidJ7k+/EM+9zlMVSrRgdtvl2fulO3WCG6x0kMzfowT9zen72NEjHP1tfRQVadpR eH4KnX0eMQ3eZwi96LKOorb/PpD0STHP+vceJzjvXXGGbs8A5oY+ryIIhNE/kFowRCvB TW0/rnD0MuhBnMyVd+hf6s6Bs+Gh1Vn48lsVBChIdv8e330Tn/7spbKXwVl25RF6BWoU 4NOkNRRIG4uTAMv7IbGOwnRdtIvN0Pcs44CNzTjKbCk8FrdoM7cayVN9iU7kx7f//kw6 IIWe5y0Gm/zYhf94BQTBlUVd0q/IzDsLXw44jEI5I0yazx3VdfxYbT/VSvzVqu+aJac6 6Exw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jExGMUTV; 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 7-20020a251807000000b0063399404615si11914416yby.639.2022.04.26.09.37.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:37:10 -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=jExGMUTV; 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]:41582 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOBa-0005H6-5V for patch@linaro.org; Tue, 26 Apr 2022 12:37:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5Y-0002vi-Fa for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:30:56 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:44721) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5R-0003lR-7B for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:30:52 -0400 Received: by mail-pg1-x530.google.com with SMTP id v10so5403429pgl.11 for ; Tue, 26 Apr 2022 09:30:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=A3nhL9lpF5kEdI3yITzr/5HwVsaS4vWPU90RPBOwW5I=; b=jExGMUTV0a+clhEs0uma1Nem8UT8VekwvnCypB9rPRKVacvCOejwxp3qzljQbMn21x FoHVqi/pWMjoWpGH0Eyw/sOmdYki5YdYLZBgpYYlBKiD3jE9ZUuQt5niQkX/vz5Cz8TC llT8JnLkRapUZaNJqnPtvZgwe5yioUdeDyrsssiUa4RjX1NpDWgRsFVKXg8pEwdVG7zy DiEyvBq0CYTIeJS5ij5++/fIQmoaRpI8qiTvGzHv9LNQAFTkgex/BwSLZ2fbtFfuuMI2 z7UQETBzljzgfuNmYjIRNlg63oF0bLbNFIcc7AuFXL0PTaCk289tkCdfWNwFDEWqLb4+ 8Dkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=A3nhL9lpF5kEdI3yITzr/5HwVsaS4vWPU90RPBOwW5I=; b=xb1ctWzetO38TjMBbK/gbSKacXagfbCBMUQnkKSeC3aGBByP3eHyCj6++qXb9IZnIK JdQsufwGrOjMknjP5WTbus3ig3eJlM3yxJ+1miCRKYTpQPVQQ01Y/+TS0h8jK68EwXTe zBFx40VIFGECCP6vdV6MQIBTcX9rYzoEbrAVGHhYz9SPdAqFvTPcNUdC4pd3SREf+U+k Ps25M22fhppYGt64dB73F5zBvQGCAHubIyB8GiFdOftxrMr6X2ENM7O3wpI2XM/bfjAi 2X34HWwcE0a3JEPDX8exS8lLVr7pN2xWFk3U9Yraf8pY+zVpuMIpvEr9e3U9Z/dT3oD7 NOBQ== X-Gm-Message-State: AOAM530Hu8EIGGphFSTyqLvy1nmBnNp3op/0uFa8dvyNfXue+uYQK6g2 caaySnoeY//XKH9X8w49jMksHnYciO9iUQ== X-Received: by 2002:a05:6a00:21c8:b0:4c4:4bd:dc17 with SMTP id t8-20020a056a0021c800b004c404bddc17mr25100217pfj.57.1650990647197; Tue, 26 Apr 2022 09:30:47 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.30.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:30:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 02/47] target/arm: Use tcg_constant in gen_mte_check* Date: Tue, 26 Apr 2022 09:29:58 -0700 Message-Id: <20220426163043.100432-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index c6ab0433af..7b5bfb0889 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -258,7 +258,6 @@ static TCGv_i64 gen_mte_check1_mmuidx(DisasContext *s, TCGv_i64 addr, int core_idx) { if (tag_checked && s->mte_active[is_unpriv]) { - TCGv_i32 tcg_desc; TCGv_i64 ret; int desc = 0; @@ -267,11 +266,9 @@ static TCGv_i64 gen_mte_check1_mmuidx(DisasContext *s, TCGv_i64 addr, desc = FIELD_DP32(desc, MTEDESC, TCMA, s->tcma); desc = FIELD_DP32(desc, MTEDESC, WRITE, is_write); desc = FIELD_DP32(desc, MTEDESC, SIZEM1, (1 << log2_size) - 1); - tcg_desc = tcg_const_i32(desc); ret = new_tmp_a64(s); - gen_helper_mte_check(ret, cpu_env, tcg_desc, addr); - tcg_temp_free_i32(tcg_desc); + gen_helper_mte_check(ret, cpu_env, tcg_constant_i32(desc), addr); return ret; } @@ -292,7 +289,6 @@ TCGv_i64 gen_mte_checkN(DisasContext *s, TCGv_i64 addr, bool is_write, bool tag_checked, int size) { if (tag_checked && s->mte_active[0]) { - TCGv_i32 tcg_desc; TCGv_i64 ret; int desc = 0; @@ -301,11 +297,9 @@ TCGv_i64 gen_mte_checkN(DisasContext *s, TCGv_i64 addr, bool is_write, desc = FIELD_DP32(desc, MTEDESC, TCMA, s->tcma); desc = FIELD_DP32(desc, MTEDESC, WRITE, is_write); desc = FIELD_DP32(desc, MTEDESC, SIZEM1, size - 1); - tcg_desc = tcg_const_i32(desc); ret = new_tmp_a64(s); - gen_helper_mte_check(ret, cpu_env, tcg_desc, addr); - tcg_temp_free_i32(tcg_desc); + gen_helper_mte_check(ret, cpu_env, tcg_constant_i32(desc), addr); return ret; } From patchwork Tue Apr 26 16:29:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566017 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3751383map; Tue, 26 Apr 2022 09:33:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyATKfdL0Iu1TPiPEeotAwK+f0RljMTT1N5a4o4tR+Zst2G8bA1FAIT4AMzwGpfAqGgOYr2 X-Received: by 2002:a05:6902:1021:b0:648:9975:c246 with SMTP id x1-20020a056902102100b006489975c246mr6410723ybt.401.1650990799539; Tue, 26 Apr 2022 09:33:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650990799; cv=none; d=google.com; s=arc-20160816; b=jvNARwo3DgWMauAMHdIk1OfjMeJpd9zMySNmVnCjzaS9A/lNltOaruFNXlD0pgoXVz oroUMWCeZN6645oZ6dy26aG3CL5DXGkyWEiXQ1QMA5zQANSXqb0R6OXxhCNqU2P8t7bG gW8cGKgGe9erRC6BbK4emUBHg9Aco6Yhr1YPL8fpaQ9HTZUXQts4j8wfjs95USs9D6wp x8mpMOCptjhpafMURaQqBaY2t+w5lYNjs79wKvmJgxnyufS1MZfH4mmPmoU/5x/Y2CZW v4ysUXgA9opsNy5Yj4MwjOnAWWFOBTpGS3wXtGyY9cgv08L+LyvdR7QaPhkn61jQGKRH b1tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=2HNcB10e1b3D3OclvFOXZv0dsDEHKDzY1ubkZqlSbYM=; b=x5QoNvAqo7taXd11/1dyUIeKsIJrryLaZ0tmh8iTP+GBtwTyfm4THrafiZS81XsdFZ KHNniJJFSuENmrlHSb1mHufi8sIfWfVFvPkj1tGZURZGx0YLltx8QoIjw9z16izkf98u v/aqv0FYAlqGRZ0vHhKpyKxRuBubNTMvzFSWlwYAeZ18MHFgTbp2A12yNdDHCbIId608 ITF+rglS2wa3LFreaZzn1zrDquwBoTCWYW2yyspwNjEutY6QfQe4XlR+VQTuXU2IPhpf VqqiHsvee6HLNhv/FtAZJPJQ8zj8lhX7nXa/GX35hzLQzyx7FD54NUCVkpqheIZj1cZX 18OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cDLCuArv; 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 q20-20020a819914000000b002f7b82f2eabsi10409152ywg.224.2022.04.26.09.33.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:33:19 -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=cDLCuArv; 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]:57342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njO7r-0005BM-1s for patch@linaro.org; Tue, 26 Apr 2022 12:33:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5Z-0002vr-My for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:30:58 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:43520) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5U-0003la-Iz for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:30:55 -0400 Received: by mail-pl1-x631.google.com with SMTP id d15so30707356pll.10 for ; Tue, 26 Apr 2022 09:30:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2HNcB10e1b3D3OclvFOXZv0dsDEHKDzY1ubkZqlSbYM=; b=cDLCuArvWStZ5rJPsSbYWHgXpybzZhqssif+aHapW56kBUGCAod6X2ysC3MwmXg4lr z+2NjB2WbbMgwI5A4Vxyfnh+1OrwtWApyuIWE5UqzWKueMLKrsLdSCr5nJB+Ks8kNPlZ xUhdcUhfE8ptf475fMAr04EKEV9rIC1AhSG5E3wkN/NuiMiEJelerE686lhTetuiOAqy 4OL6guy4zl7bqtuzzMCv7GbfYkL0YwlSi2ALlWLQ81+Tefq5xcId0fW35GxQXxY1rAUg WgVlBJ3EJs2C3vsgJq2u2HKylJzWk+zv0FAIocuUto1X+7LqkvrNtOor3kpcK1MCT92H DZqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2HNcB10e1b3D3OclvFOXZv0dsDEHKDzY1ubkZqlSbYM=; b=slk79CWcXWiSmfQ43m7N+oQ/o55t8fo40Eax4l6Syrke3lC/lXJVisekTzBF74KZjM pj5rrgJTjOra7eBhK//qI8qQIW+kd5t/CBAyot6cz5FozL8ENcl2Zq5gb+oT4fU/zWXK PMWnYCgTJ7J7WFK7DJC7qQEvfy27JqqH6dI0Mqsc55sp+rkXr5gzfDzBsT+CZcvxFJ1Q LKMzfpp1qEFdQPUY9OSTACgizSclFHVCHtWzkiRo2vclvFSNV8A7mHILd+aziIy3k5WK Gdrk0A92A5aM6im5e2C1gwVBnOmmv5OXdujStrLhYkrjmGVcRzCmUe9CS468ad88DaEH jSmg== X-Gm-Message-State: AOAM531XXceS/NUDrlF0D1zqjqEcAQ3lisy8UrY6I34MxwTg/CEDIhHJ /ptY2uGscNjjYb5anNGsr328e4Cr6h9jVQ== X-Received: by 2002:a17:902:8644:b0:153:9f01:2090 with SMTP id y4-20020a170902864400b001539f012090mr23561369plt.101.1650990647987; Tue, 26 Apr 2022 09:30:47 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.30.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:30:47 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 03/47] target/arm: Use tcg_constant in gen_exception* Date: Tue, 26 Apr 2022 09:29:59 -0700 Message-Id: <20220426163043.100432-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 7b5bfb0889..b0b5e8b26d 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -338,11 +338,8 @@ static void gen_rebuild_hflags(DisasContext *s) static void gen_exception_internal(int excp) { - TCGv_i32 tcg_excp = tcg_const_i32(excp); - assert(excp_is_internal(excp)); - gen_helper_exception_internal(cpu_env, tcg_excp); - tcg_temp_free_i32(tcg_excp); + gen_helper_exception_internal(cpu_env, tcg_constant_i32(excp)); } static void gen_exception_internal_insn(DisasContext *s, uint64_t pc, int excp) @@ -354,12 +351,8 @@ static void gen_exception_internal_insn(DisasContext *s, uint64_t pc, int excp) static void gen_exception_bkpt_insn(DisasContext *s, uint32_t syndrome) { - TCGv_i32 tcg_syn; - gen_a64_set_pc_im(s->pc_curr); - tcg_syn = tcg_const_i32(syndrome); - gen_helper_exception_bkpt_insn(cpu_env, tcg_syn); - tcg_temp_free_i32(tcg_syn); + gen_helper_exception_bkpt_insn(cpu_env, tcg_constant_i32(syndrome)); s->base.is_jmp = DISAS_NORETURN; } From patchwork Tue Apr 26 16:30:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566023 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3755128map; Tue, 26 Apr 2022 09:38:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2D9vt4LhEQyyCuCMuqh115vN/0ZM+7VrIMAxBzHAQZMLvPLg10WkhQp8cpz/394dc2+Nb X-Received: by 2002:a0d:c583:0:b0:2e6:b1e7:a6b with SMTP id h125-20020a0dc583000000b002e6b1e70a6bmr22642843ywd.424.1650991107562; Tue, 26 Apr 2022 09:38:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991107; cv=none; d=google.com; s=arc-20160816; b=M+nlBKaWu1ecBzTu6BSIt1Q5Vq6YY7D9mbS+fUJ3Rw+bocheONN+oiYH0fv1Dk28fX YYG77jXe6/nvxD7qZ8FOelhiD4g+fkrvprzfQnZspSLJWYs65qqWZGuQytUptkXk3PvN vycJlI8SrX6cOs7fb0bE18mfMwIKmeBshryWdhFtg53V23hA17ue8Zkj0of4w0KUpkjx F/zWwzJrELwOe1UjUx75cursRe9eGG1i/dTEBTMcYOxN8k+mUIkk0+o3XN5pF0y+akkm o3n0f2X3kRtmHvxkMMMynn1hCnHF3fLbOjulphuqjq6X+oGS6FQ1kKzVAN2Z/WrNJN3B Jo1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=vzxlqZXqhHtcD97hQvqP2vHJvqGZMZwhdj9ttXr1TGs=; b=q24RmtDlnGyuNoMlTocBCZloJ3ZTfrKkGC8WpLv2C5hHay8Mt5N1/hGF4u4vgGMwkH msvpICga7tQa6kCFy/CEKj/a/3w80Tq0wOm2sZpJxrYUR/0Ocjg/YidWCNwgArFGfmSX +HgxPXCgU2ISB5OUtuC2VQ3d/huMM/DoNGKP/clM0qQTXoXBie6EV+vWLVEYYbXiZJna ac19i6YPGQ+qupXzVkv/QndJi7zgunNTGjWvqgC0V9C0k1r7OcZuFBZ8k35glBaA07Bf GuGkUA9cRIt2YGuEFYQR+ByaazP9PTqCNRJ1rN19Bafow9XpsOX3m/sO/tf3tLhYBby6 ne5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y8iO9kJC; 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 j197-20020a2523ce000000b00645789130casi14326993ybj.364.2022.04.26.09.38.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:38:27 -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=y8iO9kJC; 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]:47076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOCp-0000jW-1h for patch@linaro.org; Tue, 26 Apr 2022 12:38:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5Y-0002vk-IN for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:30:56 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]:37731) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5T-0003ll-Ig for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:30:53 -0400 Received: by mail-pf1-x42a.google.com with SMTP id bo5so18447721pfb.4 for ; Tue, 26 Apr 2022 09:30:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vzxlqZXqhHtcD97hQvqP2vHJvqGZMZwhdj9ttXr1TGs=; b=y8iO9kJCUNraWPH69oG5RP/DabRLXthLftoNzUS90JagKAdAkHPe0eRrfCwMMSY/rH v22t7vFqfS+sdB2rqehNlz6qpOlA2Vlqs+vXpaFs10LzYPUyz09igVO4s3ZEnIixs8Ic UNhpqsXXn9QJIc7heEGjmz4ojGaa/fxtErnalQl5/M6WbhHIK6L2H1Q+vB0YiU6Q5XOs hbk2SDyrx1TWhWkOr1lD5lf6YRJi3cz1qr9ZoDba6qquRy/5H3Q+WcksFL9AGSiNLYWA 8WU2z8l3MHFsnvL/drLzD0pNsZiQVzBTevh3SKOXvV0pZbW0Ay8UxYchfWIClCxjVTSW J+sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vzxlqZXqhHtcD97hQvqP2vHJvqGZMZwhdj9ttXr1TGs=; b=PuLzTE7kIQ9887xc1xkLMWBTN+yht5uEKNO5JA/GMcj3AB8gGGghXcuILkwIzOL1d3 og4dnxyYQvcYE0YdsVplN2qKuPptY1YpTiszjLsDhYdR3Q+XROnjwvk8soWd0w7h8brv e6D+rxawzphMPBDMFD8W/4TLCdAKlymHhtr2dVCwOjFdL/HtbobBm89Av17EZ64GREOC wubN5d5hl/W1rdoHUY5uuSw8U6R9TJUJR+Ns7D/W3zjo1RemGndozThtvLUDS5uioM6W Qo8Rsoggcr8Rm+eFkhqN9EtmKb5qyYWPH+Mp+9AmE0FVGMw1/xIE0VnDiqZGhIdcXooi XVdg== X-Gm-Message-State: AOAM530rKdLXpmzNRrWdnJoh/tYfQ0SljRVI0L6kIx6/DxFqCHXthB18 uZ04TScdOix0soY3jlHudv6vGaDIk4dJdQ== X-Received: by 2002:aa7:9802:0:b0:50d:4f5d:fef6 with SMTP id e2-20020aa79802000000b0050d4f5dfef6mr6369753pfl.9.1650990648995; Tue, 26 Apr 2022 09:30:48 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.30.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:30:48 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 04/47] target/arm: Use tcg_constant in gen_adc_CC Date: Tue, 26 Apr 2022 09:30:00 -0700 Message-Id: <20220426163043.100432-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Note that tmp was doing double-duty as zero and then later as a temporary in its own right. Split the use of 0 to a new variable 'zero'. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index b0b5e8b26d..5c0fd897d6 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -814,15 +814,15 @@ static void gen_adc(int sf, TCGv_i64 dest, TCGv_i64 t0, TCGv_i64 t1) static void gen_adc_CC(int sf, TCGv_i64 dest, TCGv_i64 t0, TCGv_i64 t1) { if (sf) { - TCGv_i64 result, cf_64, vf_64, tmp; - result = tcg_temp_new_i64(); - cf_64 = tcg_temp_new_i64(); - vf_64 = tcg_temp_new_i64(); - tmp = tcg_const_i64(0); + TCGv_i64 result = tcg_temp_new_i64(); + TCGv_i64 cf_64 = tcg_temp_new_i64(); + TCGv_i64 vf_64 = tcg_temp_new_i64(); + TCGv_i64 tmp = tcg_temp_new_i64(); + TCGv_i64 zero = tcg_constant_i64(0); tcg_gen_extu_i32_i64(cf_64, cpu_CF); - tcg_gen_add2_i64(result, cf_64, t0, tmp, cf_64, tmp); - tcg_gen_add2_i64(result, cf_64, result, cf_64, t1, tmp); + tcg_gen_add2_i64(result, cf_64, t0, zero, cf_64, zero); + tcg_gen_add2_i64(result, cf_64, result, cf_64, t1, zero); tcg_gen_extrl_i64_i32(cpu_CF, cf_64); gen_set_NZ64(result); @@ -838,15 +838,15 @@ static void gen_adc_CC(int sf, TCGv_i64 dest, TCGv_i64 t0, TCGv_i64 t1) tcg_temp_free_i64(cf_64); tcg_temp_free_i64(result); } else { - TCGv_i32 t0_32, t1_32, tmp; - t0_32 = tcg_temp_new_i32(); - t1_32 = tcg_temp_new_i32(); - tmp = tcg_const_i32(0); + TCGv_i32 t0_32 = tcg_temp_new_i32(); + TCGv_i32 t1_32 = tcg_temp_new_i32(); + TCGv_i32 tmp = tcg_temp_new_i32(); + TCGv_i32 zero = tcg_constant_i32(0); tcg_gen_extrl_i64_i32(t0_32, t0); tcg_gen_extrl_i64_i32(t1_32, t1); - tcg_gen_add2_i32(cpu_NF, cpu_CF, t0_32, tmp, cpu_CF, tmp); - tcg_gen_add2_i32(cpu_NF, cpu_CF, cpu_NF, cpu_CF, t1_32, tmp); + tcg_gen_add2_i32(cpu_NF, cpu_CF, t0_32, zero, cpu_CF, zero); + tcg_gen_add2_i32(cpu_NF, cpu_CF, cpu_NF, cpu_CF, t1_32, zero); tcg_gen_mov_i32(cpu_ZF, cpu_NF); tcg_gen_xor_i32(cpu_VF, cpu_NF, t0_32); From patchwork Tue Apr 26 16:30:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566020 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3753623map; Tue, 26 Apr 2022 09:36:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvZrJ4WHqSFyJCPw3ZsoPsPN1BcUqHv6BPRKwz1tAfgMECvpO3HsoRBBQ+85vaHqjJIucD X-Received: by 2002:a81:36cf:0:b0:2e5:2597:a026 with SMTP id d198-20020a8136cf000000b002e52597a026mr22900139ywa.301.1650990981930; Tue, 26 Apr 2022 09:36:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650990981; cv=none; d=google.com; s=arc-20160816; b=toHeNMqPrNPbb63CHq5735Y2M1MOY1d94nrBTWcdxaPfPfLwkp5MCSyi0GGjWkaChf UsODmv6psLBaqrnv5OjjsVTV4y9ak1UeQfvcM0anYhq4neCcqBRvaJwQmy8Do2foOq2N MgSQOCSdXd8QvY3OE8tbKc1DNoCd6ZaCRy1LsIlC18bU/mjv96D/j6HpbNszlbMclrPM G6OzOcQZEafKJ3ce9EqhypbGbypA6+2hguvVnRXxmtJKqCetfRaJpxik20nsauDR4b/1 qKkVQAvg+HC/TOZl0sreQ9fPgUSBvwUv4lU9jmkh6ehDaygh0n8BJyxK0s3FMSC5IydX hRaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=d6D3pyx1DCMBlw0QHVOtWOZM5rgwOC/SMC0Uj796DwU=; b=zwj/2hJfmZ0UUscmD2L3+nkv9CNDvJzekPnGpi8d70jVJPl7PQy7MThn+av/Yhqvz2 GYgIUqdnB0SFbACiqwSY94GI3JzVvTTRTGmRSo/q2wERR1MY4zt0D0m6WOdxXnNkt8lY ZRkqq0Gc/8Z0WHWOt2IfMH7qPvLoOqudcUYjbLU1hxdGqiNAmSCF7YVmOKLVw5A5b4lu 6iaLHMBiNPBkUNX54P8IvtghDKpOln8bwo1xT0b0I7yt4wf/akzQNHZyqd26GAOn/wOl mJPxqHgarpYos0nw5VLDf5TNnU9MUAgSS+cwrKWH9Wcclp7sCETq5gtNdWK+K+bmDQ1t GP6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tYdEVbJm; 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 n18-20020a0dcb12000000b002f7cd557786si6593488ywd.75.2022.04.26.09.36.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:36:21 -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=tYdEVbJm; 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]:38490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOAn-00038Q-Dt for patch@linaro.org; Tue, 26 Apr 2022 12:36:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5Y-0002vj-Hz for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:30:56 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:37481) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5T-0003ly-Rv for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:30:54 -0400 Received: by mail-pl1-x631.google.com with SMTP id b12so15947505plg.4 for ; Tue, 26 Apr 2022 09:30:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d6D3pyx1DCMBlw0QHVOtWOZM5rgwOC/SMC0Uj796DwU=; b=tYdEVbJmSEEeLPZMSQCVxYzC1yiA/94isaMKhS0jAnt8k8oTjuLn2YaBsz7SNUKIUs RqJSPXU4z3sT+tlGOAPyaFaqxmsy+hgdRIFB5B2PJ4NJ/6MMCvsYEoWGXL1C/DfK3fb7 60GstGhmlgDYV1nPYkRF7K3CXamMLizM2gdgp96hahwikVfuRFAQhNqNVTcAXbS3T140 6qLVOM0acitKKX5nDIzaRWIbZWYlbTV4enRIyRX/UPg5FbDzkXgZed1WQULUt+ZySknP CtNQYqWD0xNNcbW18XUV309VLg1iP6RUe2DM5fy2GxgPe8qs3k9DHM9rTyY6LPOwcWnE l5AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=d6D3pyx1DCMBlw0QHVOtWOZM5rgwOC/SMC0Uj796DwU=; b=YxpYQWcH3xeB7dBgXuJ6K0mYni4M+M/4RNUZqQ0jtlKhHthmUcEkjJ1DUtHywVCgRS xjh+JcYvbui5viNCuocBqIbkiFM/tPJKSuSkC9bXU0Ikm9KiJW5+BJww6yjYQCiBkAjY hXxOgnmbx2ThDJ2CBOisFCWwsncUBf+Odz3TWzs9L1RN1MxfF/VfRDz1+NaPJCu2J9vM mY2xpfj667oJ5SsX0PJ9CPBJ9a43d7b5pCwNl/wsOrwOErnjGsUd90H/lAqf/Vjx7sou pj/eB/4K5cjSLM4PPC3mT9qa3rp65XyeZzJJMsQSyRagRqQgeQ0Ztj+ZNFL/MESEEYgy lOEQ== X-Gm-Message-State: AOAM533V71ge18bmx4GfADsaVjND7TKcPWzmK73QUBhkaEmmSZl39Tk3 3JGPpcQgGk3DIhI+yMzL/lapx0LdC+xjpQ== X-Received: by 2002:a17:902:7088:b0:156:1aa9:79eb with SMTP id z8-20020a170902708800b001561aa979ebmr24006486plk.71.1650990649878; Tue, 26 Apr 2022 09:30:49 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.30.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:30:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 05/47] target/arm: Use tcg_constant in handle_msr_i Date: Tue, 26 Apr 2022 09:30:01 -0700 Message-Id: <20220426163043.100432-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 5c0fd897d6..ec4765362b 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -1615,7 +1615,6 @@ static void gen_axflag(void) static void handle_msr_i(DisasContext *s, uint32_t insn, unsigned int op1, unsigned int op2, unsigned int crm) { - TCGv_i32 t1; int op = op1 << 3 | op2; /* End the TB by default, chaining is ok. */ @@ -1674,9 +1673,7 @@ static void handle_msr_i(DisasContext *s, uint32_t insn, if (s->current_el == 0) { goto do_unallocated; } - t1 = tcg_const_i32(crm & PSTATE_SP); - gen_helper_msr_i_spsel(cpu_env, t1); - tcg_temp_free_i32(t1); + gen_helper_msr_i_spsel(cpu_env, tcg_constant_i32(crm & PSTATE_SP)); break; case 0x19: /* SSBS */ @@ -1704,15 +1701,11 @@ static void handle_msr_i(DisasContext *s, uint32_t insn, break; case 0x1e: /* DAIFSet */ - t1 = tcg_const_i32(crm); - gen_helper_msr_i_daifset(cpu_env, t1); - tcg_temp_free_i32(t1); + gen_helper_msr_i_daifset(cpu_env, tcg_constant_i32(crm)); break; case 0x1f: /* DAIFClear */ - t1 = tcg_const_i32(crm); - gen_helper_msr_i_daifclear(cpu_env, t1); - tcg_temp_free_i32(t1); + gen_helper_msr_i_daifclear(cpu_env, tcg_constant_i32(crm)); /* For DAIFClear, exit the cpu loop to re-evaluate pending IRQs. */ s->base.is_jmp = DISAS_UPDATE_EXIT; break; From patchwork Tue Apr 26 16:30:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566019 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3753057map; Tue, 26 Apr 2022 09:35:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDYvjTg3atiKnQ/wKO4qpO6FsEno5x3FvM+dbGJGg2I3zFZPYYthoKsW5vq7v0a2ZGRV7v X-Received: by 2002:a81:2fc3:0:b0:2f4:d2f3:4f58 with SMTP id v186-20020a812fc3000000b002f4d2f34f58mr22288392ywv.350.1650990937093; Tue, 26 Apr 2022 09:35:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650990937; cv=none; d=google.com; s=arc-20160816; b=0CrVnHsKPr37FY7kJNreC6SzWG7S3qgVWr/nh8PqaE3MFcFutjtF/HP4q1862QkZew KhB4oRHOm77iNMjHGYMUMZGt635NmOMzNjZVyAZ0kaBsvAt5WgHBim6GQ6x6ZA6GZ0/k tntFU2fP1dk917Urm0aZ17xhrKL5WkBu9shI8gsKjosPpQaN/+tfcM1m/wJkk/OVhL9s flFOzELiui4Tl32aSuCL6wEZIE3J9uJTmoFPvbWnKPxlp5hZI83WsVe0OfPrYDF0zHP/ R825Ub7HYiQLGRZyhhTFJjfE58d9glrZQBNtf6/8A+aUrP6D8dHmvxg7sSC+NvR97zOW +LEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=i0bYNx9gMtvu3dlOAIwhnpYW7XVbsWcDBUkTNgwOrpw=; b=ktQZsG2w1PF/iFwx3zazEGImK1gjbIW//PQx/qHGYn4MOIvfNNCv13eNcJaO0ZU2Hh gjHYeM3fTDbmeBe9dVdUAbqQHQXFhJJt9EaS1Z9tvXNnRr1CzyYb48YjZZFSDrNKu/p9 zwWrrxSYhHnmWfImo3BMp4L2qSKVS3Z+tuCo/TZWRraCThg6MMa/pmwIHebAGeUvd0ly ZFfBZbnT8T0lqQaTqtprStHUNWkKL29sy4G3S1HNFRzQHHHt7l9a6/TCd87tGMMrjFKk EmMtRlD/8yYpvb/S/CazNR0nl9pfDdpJgXRT8GP87Y2ed/fvyfG2Ai8SzLm9mO1IWJDy Np7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Sx9RPNmK; 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 x9-20020a814a09000000b002ebf8438e5asi14652104ywa.53.2022.04.26.09.35.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:35: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=Sx9RPNmK; 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]:37816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOA4-0002hJ-Iv for patch@linaro.org; Tue, 26 Apr 2022 12:35:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5Z-0002vs-Mt for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:30:58 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:56154) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5U-0003m7-Ma for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:30:55 -0400 Received: by mail-pj1-x1032.google.com with SMTP id r9so1858278pjo.5 for ; Tue, 26 Apr 2022 09:30:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=i0bYNx9gMtvu3dlOAIwhnpYW7XVbsWcDBUkTNgwOrpw=; b=Sx9RPNmKCVT1C2W34YVjGEQ5EcfDecgYJR47kQQEYUsL/9xrZCk0tIUd83mGJNBE90 DGJ2kf3b/cXg/Mp3CePtkMBwlZG228pde+6nVsOajDL3/Ao/fkwmcKOF60qawsTnGqhb CzrbigbooAMyKuQsjBOvCi1OXWt6gNhtyAct8c8NZ8OE2tIGv+JTHcZtpH6SYfu8pNr2 qb7VVnJ0IroeIM8Ry+A45xHiHwbIs4VEKGn8nHBDhoSr+ZUrzmbq9EvvDr7Xff+KM8Uo 07uksuKh1j3FT29AoP73rGmlBhjeA2ei9EulTav5PwleE6mnlaGOxs0rUxm8Oq7fT5fB sIww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=i0bYNx9gMtvu3dlOAIwhnpYW7XVbsWcDBUkTNgwOrpw=; b=kJe20A+xbsJOH1qJT87E8yZEfncvh3cEowP+risMuma23+xbq78NJsXTiMKDgeclVQ MsxxeEPRTYO4cPwUtZihlQ21bv0N38ouBJ4yyvZ6o+W4awSC2QSV1fEAtAMxxSYe5GZY KdmAMrDqgkzDFHzYHQHxSeSxirNziM/AtEEHVAreQHUuoCOiaWZMhdyq8CxOaQM8Bmh7 37Eh5MDKyjpH8vR6E75y20MNV/HYX6dYFMhglobaYV++56wKnLai9ttkV3o92S6CgXE8 cKWSNi/9U7a1xSv13wGppuW+LsEvpJmrLZ/K+xtQnyPVX17n/9aVgY+tFiT6caIBW/AO cyvg== X-Gm-Message-State: AOAM533HvcNWEKEVNzDex7Wt86D2+tqNTeqoU5EOH2w3wNkMN+O6VtMj sv9esCHV4ZK3V1Df5fx6Vdeis185qSzTIg== X-Received: by 2002:a17:902:c2cc:b0:15b:a4e6:f58c with SMTP id c12-20020a170902c2cc00b0015ba4e6f58cmr23902468pla.149.1650990651073; Tue, 26 Apr 2022 09:30:51 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.30.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:30:50 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 06/47] target/arm: Use tcg_constant in handle_sys Date: Tue, 26 Apr 2022 09:30:02 -0700 Message-Id: <20220426163043.100432-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1032.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index ec4765362b..5d1bccaf46 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -1818,19 +1818,14 @@ static void handle_sys(DisasContext *s, uint32_t insn, bool isread, /* Emit code to perform further access permissions checks at * runtime; this may result in an exception. */ - TCGv_ptr tmpptr; - TCGv_i32 tcg_syn, tcg_isread; uint32_t syndrome; - gen_a64_set_pc_im(s->pc_curr); - tmpptr = tcg_const_ptr(ri); syndrome = syn_aa64_sysregtrap(op0, op1, op2, crn, crm, rt, isread); - tcg_syn = tcg_const_i32(syndrome); - tcg_isread = tcg_const_i32(isread); - gen_helper_access_check_cp_reg(cpu_env, tmpptr, tcg_syn, tcg_isread); - tcg_temp_free_ptr(tmpptr); - tcg_temp_free_i32(tcg_syn); - tcg_temp_free_i32(tcg_isread); + gen_a64_set_pc_im(s->pc_curr); + gen_helper_access_check_cp_reg(cpu_env, + tcg_constant_ptr(ri), + tcg_constant_i32(syndrome), + tcg_constant_i32(isread)); } else if (ri->type & ARM_CP_RAISES_EXC) { /* * The readfn or writefn might raise an exception; @@ -1861,17 +1856,15 @@ static void handle_sys(DisasContext *s, uint32_t insn, bool isread, case ARM_CP_DC_ZVA: /* Writes clear the aligned block of memory which rt points into. */ if (s->mte_active[0]) { - TCGv_i32 t_desc; int desc = 0; desc = FIELD_DP32(desc, MTEDESC, MIDX, get_mem_index(s)); desc = FIELD_DP32(desc, MTEDESC, TBI, s->tbid); desc = FIELD_DP32(desc, MTEDESC, TCMA, s->tcma); - t_desc = tcg_const_i32(desc); tcg_rt = new_tmp_a64(s); - gen_helper_mte_check_zva(tcg_rt, cpu_env, t_desc, cpu_reg(s, rt)); - tcg_temp_free_i32(t_desc); + gen_helper_mte_check_zva(tcg_rt, cpu_env, + tcg_constant_i32(desc), cpu_reg(s, rt)); } else { tcg_rt = clean_data_tbi(s, cpu_reg(s, rt)); } @@ -1935,10 +1928,7 @@ static void handle_sys(DisasContext *s, uint32_t insn, bool isread, if (ri->type & ARM_CP_CONST) { tcg_gen_movi_i64(tcg_rt, ri->resetvalue); } else if (ri->readfn) { - TCGv_ptr tmpptr; - tmpptr = tcg_const_ptr(ri); - gen_helper_get_cp_reg64(tcg_rt, cpu_env, tmpptr); - tcg_temp_free_ptr(tmpptr); + gen_helper_get_cp_reg64(tcg_rt, cpu_env, tcg_constant_ptr(ri)); } else { tcg_gen_ld_i64(tcg_rt, cpu_env, ri->fieldoffset); } @@ -1947,10 +1937,7 @@ static void handle_sys(DisasContext *s, uint32_t insn, bool isread, /* If not forbidden by access permissions, treat as WI */ return; } else if (ri->writefn) { - TCGv_ptr tmpptr; - tmpptr = tcg_const_ptr(ri); - gen_helper_set_cp_reg64(cpu_env, tmpptr, tcg_rt); - tcg_temp_free_ptr(tmpptr); + gen_helper_set_cp_reg64(cpu_env, tcg_constant_ptr(ri), tcg_rt); } else { tcg_gen_st_i64(tcg_rt, cpu_env, ri->fieldoffset); } From patchwork Tue Apr 26 16:30:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566026 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3756800map; Tue, 26 Apr 2022 09:40:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqGDbBpX4lb42+P1pkPt5g2zHjx+Rgl+fObJs6MVt1zaWbiNlogwRGmgQ+WDmhQBkxzaXE X-Received: by 2002:a5b:c4e:0:b0:645:364d:585e with SMTP id d14-20020a5b0c4e000000b00645364d585emr22573120ybr.432.1650991255461; Tue, 26 Apr 2022 09:40:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991255; cv=none; d=google.com; s=arc-20160816; b=JwdeoOVhQ1qQpxMoY57Zkv7UsRuisRTjYN/HllKoPN5CgWaEkOD0e3zhzEIgvE4CvK dhPMh20LChxWCOEOr24KDzQFQ7LTYH0IPenfHLaH9wpteNA5Uo1TDCh3GpckuKYLUbvN fLMCTAdhtuzNqYRuhDqnzCL0mM1Ojm19JGFOzhwny38MGqxB4lKHZqpbD1rU9/57a0Oz MJZ2EP262zzy1llTmjPk8Wf3lpzemKM5K4Xj+JEOb8uMyCxm15sHP9u8ENZjI/328e2Z M4CTG4Svf9Gn+OGfu6JeSj1wW5ahoFf5U8/XqOVEp5wXwXGNeEJGbSaPcYqGznynX/4L P2Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=UpI9KtHjI2y+VxbrhOzZiAV+X/liueOjiOpxfheumgg=; b=c+Hg+iQ99eA5jKiiOOnwrzh7FppP3uNTy0PNYSQb4PvXZiltfJe2ekr7iLOpxtSOnM Imq2r8/OEHvPJwkvrzuVJcP9cI4VTSo/g/9BhzK/+E6cRurnjrYkfI1Z6qG+tDEX0sN0 8MFHlwdbX317J468oK/JrkdI5hYWmvh4+9chjK6od/hVuO1mUWcXLUnaJCjbY7WNYyt1 UQpCiDEcAYl52zRixdLAlOdqTe3S2xZI79cQRGPFXb+5bzsrBbYj0Y8Y3KCJugkv6Vyi AiXJJo660C6FQs6Hsrr4TpptFr2FvmurJvS3oJX+BHa1ZqliEqSsycUfzOOtAZ8q8dCQ EC1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rJH562I0; 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 67-20020a250f46000000b00641266349bfsi13761217ybp.190.2022.04.26.09.40.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:40:55 -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=rJH562I0; 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]:52692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOFC-0004Um-UM for patch@linaro.org; Tue, 26 Apr 2022 12:40:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5c-0002wv-E2 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:02 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:34689) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5X-0003mV-T1 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:30:58 -0400 Received: by mail-pl1-x62c.google.com with SMTP id n8so30814383plh.1 for ; Tue, 26 Apr 2022 09:30:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UpI9KtHjI2y+VxbrhOzZiAV+X/liueOjiOpxfheumgg=; b=rJH562I0NeWGBilQUAR3ime4sl1zlnB8QJIwH/aRq4HMQViONrsvmzcdAoB5P4ywGt h12H8MRq23lYONbFYjUTH3Qb/Ddst3LRixicno1ZMBU6Vg+YrDFkaHuSUcZaWo6kAUWX VRg0cJvHyu231rfRsqaUNK1Pgqa+ZIMM6uDSFZ/4YRDfmv1Nj9w5htUKKlIPZxA0BXcM 0dzuRpUiokrlLNCGRlSEdfqYj3UGAzimNZ2Sro0xDvxVTcKusjhguXtJlDzBRiIANg5a QGp/wqt2qn/UCBlEqPrjjAB/1j2URruGzRHRDSt3poderiYBpY06AGP4XL5ERuJmrs0I m9vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UpI9KtHjI2y+VxbrhOzZiAV+X/liueOjiOpxfheumgg=; b=QsM7CXCSTN/I86XB/qNczGQnP3itCkBHEm+xWL//X2jG984uC5hr8Ur2BQ0DaERM8Z h6q+YaseemhuMVpFbp6AM8FfNVY1w5c7Pgn03on2qikXPrULrwOUws+rtRx0SYJEjGPj GhXsgYcUl/GRqg0TY7BXj4KczkkosmdO9DJB4O6XTrZEVGUfrKnmSUAo7E6OcKoUFmZc LuJCp1+KydxyM8b+gu7t8xvuJoW+WnRxrpL5TBgTJ4PUj4u822hpbwb4nuC20x8S9ICb T9eCzb4ZyPKMdAn3T8n37BKLlhP4vkSQcGft3yL2ax273qLd+/DoXB3/PgW6Yh6I23nN W3fQ== X-Gm-Message-State: AOAM530oipn7dTCpNTnSh16EKKNnnPtP/emzWr4ohE893vj0gZOSLOns /RJ1yGNThaAkZ4QUrQLozYfP67qI5Or8kw== X-Received: by 2002:a17:903:22c6:b0:15d:45d8:8f8a with SMTP id y6-20020a17090322c600b0015d45d88f8amr1532634plg.31.1650990651888; Tue, 26 Apr 2022 09:30:51 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.30.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:30:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 07/47] target/arm: Use tcg_constant in disas_exc Date: Tue, 26 Apr 2022 09:30:03 -0700 Message-Id: <20220426163043.100432-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 5d1bccaf46..68e3b5c1f8 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -2015,7 +2015,6 @@ static void disas_exc(DisasContext *s, uint32_t insn) int opc = extract32(insn, 21, 3); int op2_ll = extract32(insn, 0, 5); int imm16 = extract32(insn, 5, 16); - TCGv_i32 tmp; switch (opc) { case 0: @@ -2050,9 +2049,7 @@ static void disas_exc(DisasContext *s, uint32_t insn) break; } gen_a64_set_pc_im(s->pc_curr); - tmp = tcg_const_i32(syn_aa64_smc(imm16)); - gen_helper_pre_smc(cpu_env, tmp); - tcg_temp_free_i32(tmp); + gen_helper_pre_smc(cpu_env, tcg_constant_i32(syn_aa64_smc(imm16))); gen_ss_advance(s); gen_exception_insn(s, s->base.pc_next, EXCP_SMC, syn_aa64_smc(imm16), 3); From patchwork Tue Apr 26 16:30:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566032 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3759614map; Tue, 26 Apr 2022 09:44:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/pkh/OGv/tUfmrB0VWQvXPWTBSnQ3laGuyJ1FBNqFLX+oAmJl767jSnxAP5uKr+TwLhfR X-Received: by 2002:a05:6902:1026:b0:644:bde5:8228 with SMTP id x6-20020a056902102600b00644bde58228mr21416904ybt.421.1650991492743; Tue, 26 Apr 2022 09:44:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991492; cv=none; d=google.com; s=arc-20160816; b=EzkXtZbtJLOFkPHcVeZUrjsCmLTSkvV5G0LXX16HntkRa5Otcy6p46xPKzE93vdfNo GjFF0KENljKfhAtedJvsDCOfZVI6oylz5GpcMsTC/C1PBo3kGXCg16wNCApychxX2vSh t0+nhcuk3k/r8HuRiq8Aw0dKRwD98AWSl17AZqvujnN2qqp07MVUK+mcFzurmZXL/0vj ZyF4D40zrOBFXojJa/hHz0AX/xJwnyDUvUf+5FcIC90oHSv7h58iWMErZcNCoaRSS1tt uh0mQjSpi/As3p/80HRB9Z7Jz1MK7EB/cm05oLy4Fl0KnRgBKrBDSbqDU52LDlCmMHym brww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=6bRLZdi3rldJQhxVk4t5p5Sfqgb/tmNaqa3IEpWhsOc=; b=jq+1/dtPQZGO25dK1TXggSa190hUw+zfVJSUbe4Wd1phAD0Od0T/ZmIw8y56ZHbfav yv9mCm635aMCDFArsIPBrtwptJ0UfxAlmDVQvaN98E74luFlBRGWDu20uRmHJ7rIXuAv dD6JFjZfoWL5OLopRXmUW1vxnk604nKyzEeOmCupTkU+hNzzFOgieSH5obcKDtcaktFY jzRoULcesdo3QyJaEEyvg/yCPdsCMnC8rpw5Iu7rn7f5EyJ9+VPfkfvwgXsUldMWLkFl jBADvuUuL5t1sV1UJZhSv1WSqZrtyKYMTB4OZmzuc9xuEhbjOBC5esv8kTK6EgHkGsnl aHNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SuluE+jO; 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 b184-20020a2567c1000000b00641d681f4e9si15275680ybc.19.2022.04.26.09.44.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:44:52 -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=SuluE+jO; 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]:39050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOJ2-0006J1-6J for patch@linaro.org; Tue, 26 Apr 2022 12:44:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45426) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5k-000304-KU for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:14 -0400 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]:33741) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5g-0003qC-V7 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:07 -0400 Received: by mail-pg1-x531.google.com with SMTP id k14so16528318pga.0 for ; Tue, 26 Apr 2022 09:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6bRLZdi3rldJQhxVk4t5p5Sfqgb/tmNaqa3IEpWhsOc=; b=SuluE+jOKC5WdzeZb8Mte6IGipsin6nP9M27M2XIMGQ90nUiRqjHg/lZGgIKEm85cv TrdkU2GMCjc3gQ77qjkHd4vOqRgxpApMkZ2qoH5a6QiAecA/4B1+6mmVaH/VM1ty8opM xcj/yBSYQNlt4MGUMGo3c652UI5ZuosNreaeGp51KSvepyZW0KGJ5vF5/nXqGWgCGTVY dtqPoV24XTVi5iGNXTAORXCECVg9kuCN0xGogKqixYtKDf7kw0T5XPyKac/joBeVDfqH 2i6dJMvsg5qXqhjORIJ/JLLjwZ1jEaCwCv+v177KDVYnA23YhOw9fw1v14bnZI271uMS 8dHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6bRLZdi3rldJQhxVk4t5p5Sfqgb/tmNaqa3IEpWhsOc=; b=ghD2Y5pcJ+FSdl5aLUrXaksVGlf23eiT/nS+3pSOm3XSblzjHTObMbMlqCh9um9UTf 6vWPCU6EZHcMdaHllmpdSy221KE8lhLVetdBTcdaPJodbV3oRgocn1SGIjjsBBGhYNJC BEw6FilI72W18QBSXZmb/Z7h8q7u68FzrOKyIHz2rFEsokGoe+fQMmfhuWBo0hS9+JfJ NEiyeTROzxndaQGUElhkEcxqwb0Hy8uwVx5redKQeUukJiUdSeHkqcmb+jto+ybrDbeS NCUyKjMgvlq9pRz7sZp5FAl5bkX/e4ABShQwEAWQolKSmlX1iSI9vn8BVJfNHLlXWMVR kI2w== X-Gm-Message-State: AOAM532IPmscLxYeIGEE6M0XkaQBsyrqe0u7TglQPWeDRHW/Ngxj1gg3 1s9A3U9iMxGoB6OKLHiZPEA0WU2l3w8xLg== X-Received: by 2002:a05:6a00:2d0:b0:4f4:1f34:e39d with SMTP id b16-20020a056a0002d000b004f41f34e39dmr25116632pft.14.1650990652986; Tue, 26 Apr 2022 09:30:52 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.30.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:30:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 08/47] target/arm: Use tcg_constant in gen_compare_and_swap_pair Date: Tue, 26 Apr 2022 09:30:04 -0700 Message-Id: <20220426163043.100432-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::531; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x531.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 68e3b5c1f8..af6844b4b6 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -2523,7 +2523,7 @@ static void gen_compare_and_swap_pair(DisasContext *s, int rs, int rt, tcg_temp_free_i64(cmp); } else if (tb_cflags(s->base.tb) & CF_PARALLEL) { if (HAVE_CMPXCHG128) { - TCGv_i32 tcg_rs = tcg_const_i32(rs); + TCGv_i32 tcg_rs = tcg_constant_i32(rs); if (s->be_data == MO_LE) { gen_helper_casp_le_parallel(cpu_env, tcg_rs, clean_addr, t1, t2); @@ -2531,7 +2531,6 @@ static void gen_compare_and_swap_pair(DisasContext *s, int rs, int rt, gen_helper_casp_be_parallel(cpu_env, tcg_rs, clean_addr, t1, t2); } - tcg_temp_free_i32(tcg_rs); } else { gen_helper_exit_atomic(cpu_env); s->base.is_jmp = DISAS_NORETURN; @@ -2542,7 +2541,7 @@ static void gen_compare_and_swap_pair(DisasContext *s, int rs, int rt, TCGv_i64 a2 = tcg_temp_new_i64(); TCGv_i64 c1 = tcg_temp_new_i64(); TCGv_i64 c2 = tcg_temp_new_i64(); - TCGv_i64 zero = tcg_const_i64(0); + TCGv_i64 zero = tcg_constant_i64(0); /* Load the two words, in memory order. */ tcg_gen_qemu_ld_i64(d1, clean_addr, memidx, @@ -2563,7 +2562,6 @@ static void gen_compare_and_swap_pair(DisasContext *s, int rs, int rt, tcg_temp_free_i64(a2); tcg_temp_free_i64(c1); tcg_temp_free_i64(c2); - tcg_temp_free_i64(zero); /* Write back the data from memory to Rs. */ tcg_gen_mov_i64(s1, d1); From patchwork Tue Apr 26 16:30:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566030 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3758936map; Tue, 26 Apr 2022 09:43:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTInO+NaAGJAoxewF4+5x5M0CsR+qQUiK3zOV1cdLiq/z4TC6J/QjW3+N3n2y3kq+LqJ6e X-Received: by 2002:a5b:bcd:0:b0:648:b4fe:9b84 with SMTP id c13-20020a5b0bcd000000b00648b4fe9b84mr2634862ybr.272.1650991433673; Tue, 26 Apr 2022 09:43:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991433; cv=none; d=google.com; s=arc-20160816; b=JbAc48qtM7oHMAOxBJJMgKavT+svd6p6uLdmDcMojIjnz3GxTMq46h9oRGKZWFByvL Jv52HJOaH8Jz+G2LrOQX7XsuYA/hgtzMff+LRLVByOLqI6Lx0vXQCo4CloNAUHCQDaBZ oU3A3M4mPIs9v3SdXRH+s+DrehRQoJfPvZTsrwUmhLOs3MvAzsenuUobBrGXcEeKrubY AQ4wOvaASOxQlJOGL/7Jha0u4X9cOvqS8B1sjI0dwrDEETiXvRUk0qHFGj4pMOvFBvqD n552dabiEKRlfhmAIx+l5vdmOwOCHtrJcK/VQNusRPixYJds/VZoqL1DlWKqDcR8W52J pEUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=RvG/ZXY14qN/GxLVgsYoVDV2d6Cg9Hy3tF+gamW3U1s=; b=rq46YeW83E2SASNfezWJpgE7s27WfNlSvF0+S5COTbY4L0TI+dif70vxafkTCIxA4U MBVCSCDnZcAyZVzSWb7uosRFTmuAKw2gkK/wY53bTLm7EGQ5awB7px1j2szu3LA2FWmZ 8WPyktx45GVtROUh+hh5ODue8b435/9iQPGEubBT+Y6UswwUbgRdWHPaoDBSik6WENpq PJmrZ5UiSNrSAUmlJ/os+OrIBYfNM9ASeo5ezmJyKb58Ksg+tmmeL1vaIaxyPRH5Fado SslH1eBUud62Uc10pT+JfgMlY3P5m9dgGIpCKWeXjG0DGIP4ADUYqwWMUOCWekvgnC+a V8Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uO1Qc+2a; 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 k132-20020a25568a000000b006458026be6csi12541393ybb.82.2022.04.26.09.43.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:43:53 -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=uO1Qc+2a; 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]:34286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOI5-0002qD-5d for patch@linaro.org; Tue, 26 Apr 2022 12:43:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5d-0002xF-RW for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:04 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]:37737) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5b-0003mv-Me for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:01 -0400 Received: by mail-pf1-x430.google.com with SMTP id bo5so18447976pfb.4 for ; Tue, 26 Apr 2022 09:30:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RvG/ZXY14qN/GxLVgsYoVDV2d6Cg9Hy3tF+gamW3U1s=; b=uO1Qc+2a3djRhRyWBUmai4mDONPd11w0vFPiLb5HVlmtizLmQN7Am9oDanuWKZDNrC ZcD8sDzeD7KcoBOBnSzfGV0PnQdn+/TwKeW647sHznKBsXtogviLkQc5xcklx5WxB7Gb W1OXWlOBDFgdwA1YnCwJPxvH0XdODKi9cuXCiK35cWr/qV5akz9eS5Ht+1NiL97noBXa Apoj6P3/UdglaxPxcagEVmUIpw9FYl6j9G0IrbfWz8dm1wcVlz+IgWP7PvMF11IO1PjW WenlLjLWP87K2F0syAyYPsdJUq55U8XdxQ8bi89FA0qzhFJSG20F9VFIupe3o6DiY0Gi EsKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RvG/ZXY14qN/GxLVgsYoVDV2d6Cg9Hy3tF+gamW3U1s=; b=bONJwdK8px7InYyJKi807jHrke4VvL/mDl7sPdfxcMtzrLGmnCwUv+M73ayH1aloiG Q24HXsDEyPKOL6h2yxzy2p8oYBdcpN87spDYdcGOTn3m+F4qIb5Y8fSDySA2H9Q3eeXs XwyOooyeNxwO4CmTUi8SYo1IrnDNq/TsMoUq944uUdopbYThV1f7G5RMV9SL/SAi7qU7 +8wfvy2nLZd3IAwE4VOJS3bTkKqHJM4NXOSN8qsJM3aoLnJgbLFqtOQKuSDYFyugHWI3 hZ1XuYZnHUmxOrDuvJUNXcZDkGOt2vil4jvCdO3YRDmO6bewt2fjzrrjwu/dmT/sHMb5 qF7Q== X-Gm-Message-State: AOAM532jlNenNQLMRm824tAEA/EN9y3ROx5H32vD2UpeLKBlO0TpVklX y8hNHXupFLyvbpRPMIkwncV+XzkqW8zJyw== X-Received: by 2002:a63:42c4:0:b0:3a2:b7e5:5077 with SMTP id p187-20020a6342c4000000b003a2b7e55077mr20217836pga.427.1650990654979; Tue, 26 Apr 2022 09:30:54 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.30.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:30:54 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 09/47] target/arm: Use tcg_constant in disas_ld_lit Date: Tue, 26 Apr 2022 09:30:05 -0700 Message-Id: <20220426163043.100432-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x430.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index af6844b4b6..1caca38a79 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -2778,7 +2778,7 @@ static void disas_ld_lit(DisasContext *s, uint32_t insn) tcg_rt = cpu_reg(s, rt); - clean_addr = tcg_const_i64(s->pc_curr + imm); + clean_addr = tcg_constant_i64(s->pc_curr + imm); if (is_vector) { do_fp_ld(s, rt, clean_addr, size); } else { @@ -2788,7 +2788,6 @@ static void disas_ld_lit(DisasContext *s, uint32_t insn) do_gpr_ld(s, tcg_rt, clean_addr, size + is_signed * MO_SIGN, false, true, rt, iss_sf, false); } - tcg_temp_free_i64(clean_addr); } /* From patchwork Tue Apr 26 16:30:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566029 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3758180map; Tue, 26 Apr 2022 09:42:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmwkQ1N3cuIwhhE+ip9dH+lgsaIxTPgl8DGka6KB/AXwORg9RYxEtlScbso/WJTCfkRkK7 X-Received: by 2002:a05:6902:4e9:b0:645:8122:3c81 with SMTP id w9-20020a05690204e900b0064581223c81mr22893355ybs.563.1650991369893; Tue, 26 Apr 2022 09:42:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991369; cv=none; d=google.com; s=arc-20160816; b=OPpSmNqC9XMrRUqxCS1nQrkZkEyeCrn7f+WQlIasoHy/lVNohKTfoh7RhWOiB9Pi0q TSPBGnh/W9pnc+esIHlcQJCl1BtJh6RcOp1SzgCS3tMjP3mnd1ox5UepH3dMQkqxX6wB EBc5vLbt6R742YYtuvOQAzXnoH4zyYn9CqxxOziA0oK8z6ymOJJxNSxRHwuJp04jK/aw 3qIQKrL2DVl2VzSx5l22W77rqbVJcz8RjVL7n/Uff6MYuJyiHNOZzRQzM7jy5mCGoHGa u15mIyldjP5f/jrzpvQh5C7I0ApaRvdzZ0dZoUEGUlO+rKPeTEMGWklyiA2FjyHftZn0 /dBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=k0IsIX7Ck4EtbQii90oZ9+BigHGoubRwN65gCKY+dLo=; b=V3ZVttQ6Lg86hUPoXJD0giiC1DZ9U32LcMl0o/bx/XOEqxE41VLWyfIto8yYEeoZFS i4q7Wz8gmOz/p3ClaFq8ai75gDB4geOTn20WHo8ocW+t1b6fRSVrmbxevDlrdOebT7BZ 9ayAz1Jez40m4iKyHa8pyl0IKl7u0X3cQu9L90mVslzCkXyyFdFihY2TctX7cBlzDx2y sNj2AlqrBEp7v/JtZ8MEu7Rt/ep92LszJylrBXsMXBmJUpw/B27DRjscw+YJfHn7aM/t Z1YNzp4gV8c8p2bYEmN1DY66WzdMkvAJWXauQB3N+A7EHOEq/Qe+oGVimlO1NcA04e2j 14HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZZiB6oo4; 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 5-20020a251805000000b006458b07c18esi11169817yby.654.2022.04.26.09.42.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:42:49 -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=ZZiB6oo4; 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]:58216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOH3-0008Jc-65 for patch@linaro.org; Tue, 26 Apr 2022 12:42:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5d-0002xD-DX for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:04 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:38911) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5a-0003n3-IP for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:01 -0400 Received: by mail-pl1-x62f.google.com with SMTP id n18so30753088plg.5 for ; Tue, 26 Apr 2022 09:30:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=k0IsIX7Ck4EtbQii90oZ9+BigHGoubRwN65gCKY+dLo=; b=ZZiB6oo4+2NcXVazBJOgVVGMb81SxD4+NUhfjzbn9cxWxR/PPmsPXbOy95TCjf4pUK R/FXAMdeVvvgob5sn3DUX6LqFQN5fmgniE0Pfv758Cw9Lmo8+qneFG202kqaQKOvSn4i PCu9SWtIk/cWjBN6OcFTe6g7tfJgCT7Xj6zxOTOt+IHUeJhMlZcINs/2kwFxECXpJAlZ GcdG9chSTd7PU0RUhUqp8i9dDIy91C07wqKM3b5X/IlV3cnrNhDk5G8gR6xmDWSxh7Hh wl2e9a+qE0nZMv6qRrxIIlz0uRHONFXawhmQ8h0i5G9xPGI6/r8BYeZ6st/NYia6/5/H Z4rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=k0IsIX7Ck4EtbQii90oZ9+BigHGoubRwN65gCKY+dLo=; b=kKmIHTj4UiJot+N3b7V69YOtSLrbXJRhgYzAfbehOyYfRV6oIiZIujM0O+3zqdVH5h j8iKbIWI7ejJ2xsRPW7Wo78zSQIxZWE10Nk+IiqlvuzTejUjs3zVw9W7ZBIkX7+nC74Q DYtz6LzQzVRVzdC9V7zXVuseC7Mr+mGtZvVZuTgAg1Y26fCI7JOwdggcOz2MldnXf7gp EZIuYFN2kDoYY0loXLkocDAMEK7mVy0hp5FUjd/sta0VKsNSzaCYK1qDuMy+4s5tIW9i K3RSbbYVh8b2RIvnFE3nPvMjmcxusxrtVcEQ4e8CiXzjh8HMPGXuRcVAVMKzEOM2uB0i DqJw== X-Gm-Message-State: AOAM531fOpwRcOt2BOdrBIT2d9ds81JBqME06uXu1TiEkYfH00aKDPwf uljFw3DMN5cCBtqrU62hlQpQr8Iu0K0IRg== X-Received: by 2002:a17:90b:1e45:b0:1d2:3ef6:18d9 with SMTP id pi5-20020a17090b1e4500b001d23ef618d9mr39041317pjb.221.1650990655788; Tue, 26 Apr 2022 09:30:55 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.30.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:30:55 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 10/47] target/arm: Use tcg_constant in disas_ldst_* Date: Tue, 26 Apr 2022 09:30:06 -0700 Message-Id: <20220426163043.100432-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 1caca38a79..4cdc869d52 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -3693,7 +3693,7 @@ static void disas_ldst_multiple_struct(DisasContext *s, uint32_t insn) mop = endian | size | align; elements = (is_q ? 16 : 8) >> size; - tcg_ebytes = tcg_const_i64(1 << size); + tcg_ebytes = tcg_constant_i64(1 << size); for (r = 0; r < rpt; r++) { int e; for (e = 0; e < elements; e++) { @@ -3709,7 +3709,6 @@ static void disas_ldst_multiple_struct(DisasContext *s, uint32_t insn) } } } - tcg_temp_free_i64(tcg_ebytes); if (!is_store) { /* For non-quad operations, setting a slice of the low @@ -3839,7 +3838,7 @@ static void disas_ldst_single_struct(DisasContext *s, uint32_t insn) total); mop = finalize_memop(s, scale); - tcg_ebytes = tcg_const_i64(1 << scale); + tcg_ebytes = tcg_constant_i64(1 << scale); for (xs = 0; xs < selem; xs++) { if (replicate) { /* Load and replicate to all elements */ @@ -3861,7 +3860,6 @@ static void disas_ldst_single_struct(DisasContext *s, uint32_t insn) tcg_gen_add_i64(clean_addr, clean_addr, tcg_ebytes); rt = (rt + 1) % 32; } - tcg_temp_free_i64(tcg_ebytes); if (is_postidx) { if (rm == 31) { @@ -4052,7 +4050,7 @@ static void disas_ldst_tag(DisasContext *s, uint32_t insn) if (is_zero) { TCGv_i64 clean_addr = clean_data_tbi(s, addr); - TCGv_i64 tcg_zero = tcg_const_i64(0); + TCGv_i64 tcg_zero = tcg_constant_i64(0); int mem_index = get_mem_index(s); int i, n = (1 + is_pair) << LOG2_TAG_GRANULE; @@ -4062,7 +4060,6 @@ static void disas_ldst_tag(DisasContext *s, uint32_t insn) tcg_gen_addi_i64(clean_addr, clean_addr, 8); tcg_gen_qemu_st_i64(tcg_zero, clean_addr, mem_index, MO_UQ); } - tcg_temp_free_i64(tcg_zero); } if (index != 0) { From patchwork Tue Apr 26 16:30:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566021 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3753676map; Tue, 26 Apr 2022 09:36:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFqNDOV2QCFDc0dVfrxLGYXOgWeEwatpa6lhYY3ZS3YocYKdXKjsPqMHTgsD+Lu9h+NZOk X-Received: by 2002:a05:6902:1083:b0:624:6892:5495 with SMTP id v3-20020a056902108300b0062468925495mr22844780ybu.379.1650990986214; Tue, 26 Apr 2022 09:36:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650990986; cv=none; d=google.com; s=arc-20160816; b=RWNwFg4AgzGbXGlv6tWtJaoIErWe4df+/arfxbpM8k5gMBud9ot2ujAqhKFFDlwwGW y6GjxHaCx/vCz/0YDfy7JgJ27QCDZiqNvGogKVL8861nDzdSbDhf33t327VXrCrLA6SE zpVkFZs+GCB9RIpKBJQNVMhVGslDOcCtkM2Zn3deatP/oL6l8G/vsv/rG9wmBXxfKL5X jh7mLDR2cgv7wuTkQBRt5RhmXGNLVMTJ2qkfBq5paAnNKHhRiQDB0B8W7M6+lHeNFxqt SMHJBRte06fBtbsyoyOFb90EnSKMGEiW6FdIGPpkcBXXa8bQU8vRpsSYOYZFwXM8sfTQ 2/wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=DozsVFM8TLDnuoUizPakS5ZW3NXzpPygo/avvBFMmuk=; b=MaZSsGzgEiPGKtvKPxEAIH1NzLWu0BuYaygr0s5rAAb9g08zmYoAi01hM9+f3rFDKD 7SUNbN1aPdoqVHlqPBUhz4/bpMh64u542BUQGlVJPB2Nal2AZJ1U0VC1hZcFns1fpAb1 miIIdSqWQUj2CNJ3WUNHV6yr7Sn2Gr3ggUc8RDRrrBWbmLzeniBC6bGNpnzWTtqmqwd3 td9rkqpXqRHC83Sq7miQhvlRgPu9afjoyG611haTrZArc+Xv/EO6zCajRKH5q+GAkj7R wfA9i/n2TvzeM3fI+XG2RYWYXiMiyJdChVf27yq8N//+7t/2zzAHCzlNqGXWB9Yu5vIF 8FpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ncY5yoLu; 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 w10-20020a0dd40a000000b002f4e5b031bfsi11210051ywd.125.2022.04.26.09.36.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:36:26 -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=ncY5yoLu; 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]:38862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOAr-0003Ne-NW for patch@linaro.org; Tue, 26 Apr 2022 12:36:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5f-0002xU-3w for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:04 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]:45666) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5c-0003nR-4W for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:02 -0400 Received: by mail-pl1-x630.google.com with SMTP id h12so27010424plf.12 for ; Tue, 26 Apr 2022 09:30:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DozsVFM8TLDnuoUizPakS5ZW3NXzpPygo/avvBFMmuk=; b=ncY5yoLujCFy3hnVOiZOY1fjkRRlP6lxgeND3uivk2cNkfWQLUr8co2rHUdReRL/aq Yprj9caZ/DBw8MVpdnh/U/vhlww7Hq1aoI/iIOwtufuHenPy1etg3j5u5Ory3TI1Ii+c aBu10NQSvhweTsSBDP9rhBYyVPaW3qqaVF7owPQrJ2k1Kf2uOcsEPRW2da+JkcbpfhhV VrAECkSrN8Snx+38D5uho1wPLUBBmopeTAPTOzvNcGoE4d1DGS3D9gAOCFADxZietp0l DpbK+IHFf7j9M+4st3fvrLnuIZ0YA4Nx28FvwvXX+4TJGaL086W14cViRg6lyF4Nbd44 JSeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DozsVFM8TLDnuoUizPakS5ZW3NXzpPygo/avvBFMmuk=; b=zqxggzQj2suTkF+AETJCPaiHeIM0LkDtArDvVZobRUB+Yd0UnQ+u/CV9okYxyvdpz5 1R0g2zkR3mi70QMM75LsB4KHSdD9dBCGXY1UETBfSzMOpvnZLNBd929A3xHNS/xCi8Z7 V7/j/x07os+Ag0Dpso4y3P8nOmxvrj17mZxitHrk6KrSVzTyFx5tjFrgGKs26arxISav J6PPI0mMm1jA48U4z/hh48WcjPj4OS1ZcVssbaYaDr2VhIiVcNAfrv8o5m7ZvMascPkS Eo2+VEcbRNVke4dAp4NyF0D98kYLbjNCFUGQUuXsFjoNiTJmC5qjoy0QbFVFLepZv3+o VFIg== X-Gm-Message-State: AOAM530NCtIqo81nEXvTs+wb0pE95EU416dGB5ijsDqgY+Z69qamfTV2 2+tuQc2krxZO9ZYzA1r0hXh9VhtfJiTxlQ== X-Received: by 2002:a17:90b:1d12:b0:1d9:8499:545d with SMTP id on18-20020a17090b1d1200b001d98499545dmr10554875pjb.96.1650990656879; Tue, 26 Apr 2022 09:30:56 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.30.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:30:56 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 11/47] target/arm: Use tcg_constant in disas_add_sum_imm* Date: Tue, 26 Apr 2022 09:30:07 -0700 Message-Id: <20220426163043.100432-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 4cdc869d52..6c88772eb3 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -4178,13 +4178,12 @@ static void disas_add_sub_imm(DisasContext *s, uint32_t insn) tcg_gen_addi_i64(tcg_result, tcg_rn, imm); } } else { - TCGv_i64 tcg_imm = tcg_const_i64(imm); + TCGv_i64 tcg_imm = tcg_constant_i64(imm); if (sub_op) { gen_sub_CC(is_64bit, tcg_result, tcg_rn, tcg_imm); } else { gen_add_CC(is_64bit, tcg_result, tcg_rn, tcg_imm); } - tcg_temp_free_i64(tcg_imm); } if (is_64bit) { @@ -4232,12 +4231,9 @@ static void disas_add_sub_imm_with_tags(DisasContext *s, uint32_t insn) tcg_rd = cpu_reg_sp(s, rd); if (s->ata) { - TCGv_i32 offset = tcg_const_i32(imm); - TCGv_i32 tag_offset = tcg_const_i32(uimm4); - - gen_helper_addsubg(tcg_rd, cpu_env, tcg_rn, offset, tag_offset); - tcg_temp_free_i32(tag_offset); - tcg_temp_free_i32(offset); + gen_helper_addsubg(tcg_rd, cpu_env, tcg_rn, + tcg_constant_i32(imm), + tcg_constant_i32(uimm4)); } else { tcg_gen_addi_i64(tcg_rd, tcg_rn, imm); gen_address_with_allocation_tag0(tcg_rd, tcg_rd); From patchwork Tue Apr 26 16:30:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566025 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3755184map; Tue, 26 Apr 2022 09:38:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7+7NVKVip5aWZIzbj+yojYJAHdiSLXww/XFlHRk7RHDql6L4NALxNAYPk5Gb+YziqnhsU X-Received: by 2002:a25:3a06:0:b0:641:cbcd:73b2 with SMTP id h6-20020a253a06000000b00641cbcd73b2mr22995553yba.64.1650991112180; Tue, 26 Apr 2022 09:38:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991112; cv=none; d=google.com; s=arc-20160816; b=F262NpGSCGqCdvsNA1WCo4cyX/iKAJhFvonDb9l1V8k/Xp0u4gmWeH47wLrCUP5M4I mGfe4ieXYqydz4e+g8XiXXEE6ydPKCttvOiqaRFWkkUaSHu+g3nNnZx9rtwmrbSvOpLt HceL3cwRSIJOtqq+AEBSDKpTkk1AZBZ+Cdd70jNcu13PtNJNMDELPUgH0pkMZ6ZB4EW/ xd6RgVE2LTJQo5LVJLO6zGOa2N1wnXNN3QBGrN5u2Z7v3feiacmgkFuYXFBGI02Wp8tP ndeL8wRUqKVP/FtolbraDx1PEWK6WXp9gnt8ADBbhVV0Jh5wohjSrxl5AZq4XwXRXdgL SVBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=PPSQV55Wca59E2OVoVkLQTCbo53uqy8aRA3qUhu2tbQ=; b=0mV3eS0y42UAY7R3mRjxljOoY7qovV4MpQflAq9DpySJBWBg6V2XUS+rF0jwjDzX2t 2srnlTC+hzsHC3NadKKN0bkEGeOFtMoe453yrrzaB+dOSWQcRmGfKYCPXBCLEWbuRPuM B7CfgXrxpNPDWChiK6MfoYRsBc2xeTR0+6fFeu/zU2e2xxsbulCpc2A8M7KkA9S4w5Hr 7NSMQlDwpupkFXjXEumk+b8751GaLMN731CFDHnPd3uUFTbXB9ddVi/Maboe+s4Sai54 6p3Eqtlytb8WcltMRyZTIIAO58wTIadjaO0CfgoJUq46wa2KYJXqR2w5F8ruyVBSksDL oXMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gz1fCV4M; 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 p135-20020a0de68d000000b002f7bf1c8d59si9250946ywe.427.2022.04.26.09.38.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:38:32 -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=gz1fCV4M; 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]:47640 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOCt-00016B-Lr for patch@linaro.org; Tue, 26 Apr 2022 12:38:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5f-0002xT-3k for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:04 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]:37485) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5c-0003ns-49 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:02 -0400 Received: by mail-pl1-x634.google.com with SMTP id b12so15947858plg.4 for ; Tue, 26 Apr 2022 09:30:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PPSQV55Wca59E2OVoVkLQTCbo53uqy8aRA3qUhu2tbQ=; b=gz1fCV4M9+qFPiHf80EVvbOVlbZ82HQjtUMfG12TsyKaxcusgwm2AZxl4y6bqMiB9N POzJsWBkaOG9XISN1wCWGcZlWNl/7oszUbXcz5ojzTJmWVc7w3fe3+lPFtoTT75kfalE c/iba9szMiuFfkC1Y0znpwX3r40Nmf5zBavTkVvXLTuo9GOxptiAw4vWWzZYWxQvx/Yf geHe9rRdWvXXBY87+Stb7AYyS//INqkgaLker+0lKYsZf0Xf942ZNOWmDYJIu6Tq07Hh vkbLTUG5ktq5Z+aahM5EJefh+LYwqhfS1FuQRmlV+hXB37A6z0qKLOmn7WhbR/lWoWcP Duvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PPSQV55Wca59E2OVoVkLQTCbo53uqy8aRA3qUhu2tbQ=; b=CoL8WeniGlH+qTQ5ReZRPbxTiL1ApdPbgUaLgzb6TJ6Tfn7SIrdwRjtpxHs89gM0Oz nTBTDvPkyetfk2biP9zm6Nuy7ptPL+pi6/VZiGu7ub/Mfl9sQ+5rypP7pIe/Kg2+EyTN XX8C7JOUGEUaz7HnF8icGDcniX9BUy53mr8IZAySOgye+4MJQ64y9dJhjdYJyE6IGyNM 0enbtvFxs5d0JbT/8WTkLx8gc5Mu+/hwCBMd0HBm+NTdf8i1rX/thz1bDhhoWtou2uZF soJjLEGTfP0mQKNNfWg7eQOayeAjJTyXBdilgjRZ7F58qGgWuB174UMDUHR2VSlr1JIx T9WA== X-Gm-Message-State: AOAM531jn24orP8GoqvnUU0wns9b5Rrt/vEjk1dHNn8Y3VKoPPYstlbY lPaT80uRqAJPvNTu1tyhLZl7fkqsVDQD0g== X-Received: by 2002:a17:902:da8c:b0:15d:3a9e:e89f with SMTP id j12-20020a170902da8c00b0015d3a9ee89fmr3211578plx.120.1650990657862; Tue, 26 Apr 2022 09:30:57 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.30.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:30:57 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 12/47] target/arm: Use tcg_constant in disas_movw_imm Date: Tue, 26 Apr 2022 09:30:08 -0700 Message-Id: <20220426163043.100432-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 6c88772eb3..537eebbf1d 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -4419,7 +4419,6 @@ static void disas_movw_imm(DisasContext *s, uint32_t insn) int opc = extract32(insn, 29, 2); int pos = extract32(insn, 21, 2) << 4; TCGv_i64 tcg_rd = cpu_reg(s, rd); - TCGv_i64 tcg_imm; if (!sf && (pos >= 32)) { unallocated_encoding(s); @@ -4439,9 +4438,7 @@ static void disas_movw_imm(DisasContext *s, uint32_t insn) tcg_gen_movi_i64(tcg_rd, imm); break; case 3: /* MOVK */ - tcg_imm = tcg_const_i64(imm); - tcg_gen_deposit_i64(tcg_rd, tcg_rd, tcg_imm, pos, 16); - tcg_temp_free_i64(tcg_imm); + tcg_gen_deposit_i64(tcg_rd, tcg_rd, tcg_constant_i64(imm), pos, 16); if (!sf) { tcg_gen_ext32u_i64(tcg_rd, tcg_rd); } From patchwork Tue Apr 26 16:30:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566018 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3751523map; Tue, 26 Apr 2022 09:33:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeNtpsLpY6HXoaDMpczuDwqfgs5Gpj3+vJnvXQMze/59DjWevmb3a4nELYWk7KEp534X3d X-Received: by 2002:a05:6902:187:b0:63d:9c95:edca with SMTP id t7-20020a056902018700b0063d9c95edcamr20979257ybh.81.1650990813089; Tue, 26 Apr 2022 09:33:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650990813; cv=none; d=google.com; s=arc-20160816; b=a018/EVdIbFMIWQtaegbtL262Klr14M2nh3HrRkaRy/GtowDDhM7KXuyl/n/mOiIz8 tnBQUeIhFgDEYvU/LS17ObeIl58u9+uqig8uPTDh7sArnx4JYpSX2Wa7uNrvOG91SEGL LKby1BWFYCZuwgjpSNcMANP/Dl+4dzRzYINlbILEMMkm3Z6QLa0FYa/7yyedHixaDwse NYXtMOwlo9tM/idc+4ezZqSus67mkh4H0Mr/Pxi0bhluhkOYsTgVj4P0KKNmB7Jzdtd1 tGZGzs6RR/+6jwnUV80Fcqft3rMdJTB1R/3ZZG2eMFC7g3g9RKPgO+SNcWkw58izPGBI j5eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=r3b3ObwAEyrWfeTyyB3wAvvyfGkoSxU0Tc73xuh3JPA=; b=sU0OB1lAKukXfwX1bivHgY9LYOqNUXMXp+wqGdDcmGf/Q8AzR1RBl7ChkOzyPABr53 ZWB6x72T3aeLGZ0RhhbJPlwn3FXXZ7vWL8z/GkgOTXVrguyyt/LFCc7KBdRKlzqxCeLc sTMUl6yice4NA/jKqSAmnU1qQumUTon6FBDpg8vwV4RPC++9dXwNays6YzX0yQaS7nPB gm2eX8jqsghoOj0xb/I6FxDNevwTvGe3ZHeBlLehQOXECi1qPKpS/YPl9DG+sdmDUuXW d7ybw/1IN6McftV+eFdL/Jwn5gq54eAXvMUBcXTk9hnlDK35dbPEHW5GoDVzqy0TMLss JM8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T5UF6ut8; 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 f8-20020a256a08000000b006412c1143a0si13207602ybc.225.2022.04.26.09.33.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:33:33 -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=T5UF6ut8; 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]:58410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njO84-0005tD-K4 for patch@linaro.org; Tue, 26 Apr 2022 12:33:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5g-0002xf-Mn for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:04 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:45963) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5c-0003oB-PM for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:03 -0400 Received: by mail-pj1-x1033.google.com with SMTP id n33-20020a17090a5aa400b001d28f5ee3f9so2997430pji.4 for ; Tue, 26 Apr 2022 09:30:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=r3b3ObwAEyrWfeTyyB3wAvvyfGkoSxU0Tc73xuh3JPA=; b=T5UF6ut86Vd93T18BYTyEz0bV7ZOqvRiyb1VPLEb88eOU5PLT5ohWSPf0Em2AOv0EZ BID89Xjd+12zYp/LwY1vzz51VakT48j+U6RQc98uuaLVvRGrzI1pJaMgoOQw9g6YhM+g IYZhr1svIZflSM7/aadlHZvHZpXvTsdQZB5ueT/L/02xJKN8UEbrvBMCMjk62JJmMiSm Xg17Vgk79ASx3dLKGQmu5wMnJ+LKioMNgAftN/NsE308pNYjStUe5qDxve2r83p1tLDl /7WT4TGJA+GGBcqZymYTCC/gLFAAZEYbwGetcfaqduDn/UtHe8pXUj/WBA/O0kMKP1qY 92rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=r3b3ObwAEyrWfeTyyB3wAvvyfGkoSxU0Tc73xuh3JPA=; b=WfAHmQ5CyGKVpUdXDKmTSqUBsSD3+hQ/1ag0nrRrx08uGTOLbWW66Z9v4h98Cmnzkt m4IyznA8Iz7z7RsIjcmF/mZcNVKgxyEIRDtubNsFXb2xq+NFKolrMq9LJ2lsJ50gzmsS P7KhGFSmi5ww+HQMV8IUKITMdT6iDmfWy9wC17JSj3k0EYEEGqxRjtzyvWAp6NUhesj0 WRfBFd8upc+UHMe8vsFGpFnL+sxPUC4OF04pY4rC3DcdLlVkOyQsKQwWKaHbQJWnivht e013j/+FxlX27Vm+72JwY/GR/agjP4BObsX3LxpruIP/wtqhhwPet/EnQLqdQ968jM2Z g31A== X-Gm-Message-State: AOAM533BQ1S2+k9260BnFFULS6F4G7WOATfmpVo9X2V/Ri3KeAGhQ5jY EgIhFo8c6TkEnZiY9/jsvtyw4Xw2nFfaAw== X-Received: by 2002:a17:90a:f2ce:b0:1d9:a18f:87f3 with SMTP id gt14-20020a17090af2ce00b001d9a18f87f3mr7251685pjb.213.1650990658969; Tue, 26 Apr 2022 09:30:58 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.30.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:30:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 13/47] target/arm: Use tcg_constant in shift_reg_imm Date: Tue, 26 Apr 2022 09:30:09 -0700 Message-Id: <20220426163043.100432-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1033.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 537eebbf1d..3de2b27cc7 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -4678,11 +4678,7 @@ static void shift_reg_imm(TCGv_i64 dst, TCGv_i64 src, int sf, if (shift_i == 0) { tcg_gen_mov_i64(dst, src); } else { - TCGv_i64 shift_const; - - shift_const = tcg_const_i64(shift_i); - shift_reg(dst, src, sf, shift_type, shift_const); - tcg_temp_free_i64(shift_const); + shift_reg(dst, src, sf, shift_type, tcg_constant_i64(shift_i)); } } From patchwork Tue Apr 26 16:30:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566033 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3759705map; Tue, 26 Apr 2022 09:45:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKs9SH/MNxyS7J8oQkNhcBr2QfQY9YI3tUZrtkp/LjdU8+xgrQKra45cd1QP5afElkqJQL X-Received: by 2002:a25:6b0f:0:b0:633:d1a3:9dbf with SMTP id g15-20020a256b0f000000b00633d1a39dbfmr22166958ybc.216.1650991500137; Tue, 26 Apr 2022 09:45:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991500; cv=none; d=google.com; s=arc-20160816; b=ny96e62BTQE3e+jKXvwTjPxseWODdFL1U6gkmDy3Lss5sbIl7LzH16q9a9WtwUMn5t h1vslojxzldVY2cwVEiphTYpWFa+FuGZttjaE/aP1Y0d8iISv8S3SpWDSmo3EgPGnJxt UlrByD2nDvfBZJ60RqnxabD9chO5pla/8/UzhH3ANk00ePCP4sbq6HZcbOVGj7hdN5Nv YOxTgR51zbPmg1imG4W1WikVFka/4j4o9s39vDkkb8EWMvFy7NIk0LsR0MMknSnTAxU1 BjEBJ7cgN81WB1wjtdC2UV25VS8WSpHD8K8ZGwrkj6QxEDzwdtU1BUu3zCSt3IcSA0FH Fw9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=+GJv6uZ84D47M1bBbT1Lvoq355I9dlxsiUNns6tmEPo=; b=H74qcQgpNChb7AqzgC4aSWVTIU+1kJmxbFss970YujfufeO89AvVvdGqcFh7w0dIE1 In6mfjLqF9gI5Lcovw/soZmw5wu/EWOtaWqz5RAEFlRp+gdWU3528upBjxLJ7uiuXLO6 K/7T0KkV9SoEI+kLaByEi9zRgacAZYoIPwRoVyqVm6noMh1Dfc2myWP3lQIy1aRBWpmX LCWsGVkX5uY5LMssdQC18uWLAT4Ioag7G+fj7XG5+ctv1yytk+0BgYMy182z2l9ZrrVe yirAMflAFW4JOCaQsHuVlGvv6XX4IyuMPI0qQZtnYUsRhwFixVWIYM+kqP+XpiHlQs7o 2l3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RjYX9P8M; 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 g4-20020a813904000000b002f7cdee8a0dsi6862515ywa.309.2022.04.26.09.45.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:45:00 -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=RjYX9P8M; 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]:39734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOJ9-0006mm-Ky for patch@linaro.org; Tue, 26 Apr 2022 12:44:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5g-0002xg-MI for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:04 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]:44905) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5d-0003oh-Fi for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:03 -0400 Received: by mail-pf1-x42a.google.com with SMTP id a15so18431342pfv.11 for ; Tue, 26 Apr 2022 09:31:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+GJv6uZ84D47M1bBbT1Lvoq355I9dlxsiUNns6tmEPo=; b=RjYX9P8MDw7aMPqEYP7Z4crwTbQ3JfgVrKpSC+NFUERqEmUUS+shoh8wFh4eEOU2PQ 1+cRsFXgsPC03I55UXZhV5c2g90VgJsuqNqoHps0OaePE2iVwB5UW4q0bGCpLvQB4TBg eGuu0J+89QB//CE/nBomwhk3jdnTFbEfrZexTOxP6S10mckHjJC9aNiY0LNhO5j5r5Z+ LGoIqutq+RAsUIyZBe7+CjOHoeeWqyEmkHcVoK9mQ5BNBY6kRcG7cBLnSUnOCwBowHEg J3fd/cuNuHZGudRtBU2Xk17F7pB2oT9r4Dtec0qHvH/zIizcrb4Sqj8+CfS4MAam98jO GPTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+GJv6uZ84D47M1bBbT1Lvoq355I9dlxsiUNns6tmEPo=; b=jFEEhZ8RiOoE1KmYs0uLd+j1LeDy7oJoZnLC7l6xWbnPhCCt7q1F6Zky3VTr0Ie4G0 TDn9qLLFiUlDTw/GOvNZjFOiboB4IDuwPYtODNKIkrMGyvEC5qs2YzdkyBfEGfBIozHR X8kei95snSNcGsjRzYZfZIKrpkYhj/1w3dn2dUGXH95C0EGJGKOb1gG/Es9Ye3EwiXjQ 9GLq0nIplN6Vex0GD5iWmDbDAbA/FmMZOtTklVX70lgzAHfbPTQ/ovw+GyLh/Z3XW6g3 MzbjQ6wv6F/+9e4qKxa6LNtC+9k7LwBZdMq+pdlBFttnXa6XnwIKM3w1CUrJc7YkqUL2 hywQ== X-Gm-Message-State: AOAM533Wpu/gk1oH8WAyZ1/uUSNgi3slcsIL94gv8idRlC8/0r8Ua/gR rxl6dEFxnFIPeDrzVik111RLGhFFuBJW2w== X-Received: by 2002:a63:7457:0:b0:3ab:224c:fef4 with SMTP id e23-20020a637457000000b003ab224cfef4mr11504776pgn.149.1650990659956; Tue, 26 Apr 2022 09:30:59 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.30.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:30:59 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 14/47] target/arm: Use tcg_constant in disas_cond_select Date: Tue, 26 Apr 2022 09:30:10 -0700 Message-Id: <20220426163043.100432-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 3de2b27cc7..9b678cc5af 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -5255,7 +5255,7 @@ static void disas_cond_select(DisasContext *s, uint32_t insn) tcg_rd = cpu_reg(s, rd); a64_test_cc(&c, cond); - zero = tcg_const_i64(0); + zero = tcg_constant_i64(0); if (rn == 31 && rm == 31 && (else_inc ^ else_inv)) { /* CSET & CSETM. */ @@ -5276,7 +5276,6 @@ static void disas_cond_select(DisasContext *s, uint32_t insn) tcg_gen_movcond_i64(c.cond, tcg_rd, c.value, zero, t_true, t_false); } - tcg_temp_free_i64(zero); a64_free_cc(&c); if (!sf) { From patchwork Tue Apr 26 16:30:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566036 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3764106map; Tue, 26 Apr 2022 09:51:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9tUnxUDhUkxnDGSFDIeJYRS+qw+W4BIdcuAmlWkcAJeZP83pkq/nmZKRn2fC9ydRll95y X-Received: by 2002:a0d:c246:0:b0:2f7:c833:f305 with SMTP id e67-20020a0dc246000000b002f7c833f305mr15585296ywd.435.1650991874802; Tue, 26 Apr 2022 09:51:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991874; cv=none; d=google.com; s=arc-20160816; b=FRZ+jBaOd9irGqjBH0naMdPzXhXr6jh9UK/7Ik+7zhRlhg1uV28r4D6MMOzV49wib9 LmthubfV16zgQ1YYANlx/3axL4zXO5w2bbtPdYu++6rbCSV7fXeYI/49HaamJrn95Vdi mXCUn2Eh5T3f/Bx8/Iq4ht48O33dFvVmXq8PNPpn3DjikT0rxAkJ2bCJpAn9nKjs6Nwh uGHkMj6/BZn9+dgyxj1IX4/BjF8in7w0mTAeDuCGLV8YkX5G/ndSclsJqItq44AEGntg YPDGoECm/KpV2gio8anvhsClUHdRmWF8Zh8GNxTbVZiBIYkUaBDS1uOTcu16EFYwdBLS wPYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=NixTeigeFj7bJFeJ3Xbq08CCTyPtA/jgmvHCQlEdtdo=; b=WW7xqbWdcShvBwSzOFBx/mmwup/GzLN9yEU64RGMzLP0O1B2V/f1U8htn8jORbqUUT FwEICf94zoXRgHB+IaEsENoxSqwXFszcKaSTvI4aoaGkXvfCYjsJgYABU9ojB32grCVk sqRfMGzAK87oen5mhb4goLtEeY9WynAyczFWUaPc8M6yKZhXy4NdtzqmMlEuCV1G38Qh cGmjkssp6Hg19cbHSQYMOe3LKQc+d49Z91LB6kSYyC7Z2Pj/0HCc5s1aSc0iETsNwvbv +GdxOheAVL9ht2j7YEX3KNeEGPzK8oPkqYVqLMdglssx9TYX9sQBGfiHCK5WUQK1Uqmn LiMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="r/5P5CWz"; 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 j197-20020a2523ce000000b00645789130casi14360304ybj.364.2022.04.26.09.51.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:51:14 -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="r/5P5CWz"; 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]:51894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOPC-0007Cg-AB for patch@linaro.org; Tue, 26 Apr 2022 12:51:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45284) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5h-0002yG-Hm for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:14 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:34737) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5e-0003pC-Gd for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:05 -0400 Received: by mail-pg1-x530.google.com with SMTP id z21so8847229pgj.1 for ; Tue, 26 Apr 2022 09:31:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NixTeigeFj7bJFeJ3Xbq08CCTyPtA/jgmvHCQlEdtdo=; b=r/5P5CWzZwYKWf3wMvr9iS47/MsgRE21A6uKmLg9SSOVIBMONJhB5eCTml9NrLMJ29 1z2gVRqxjOxowXfIwYR0cUsc6dXTM6zD2EBxdj1UqAshtqeIEmEn1d8pT2OidcSiSNpL KhYljWMCa/XZoT25pAVQGbxt/2a2URiK/7vzJ/zJx7UYxoQR8SntAB/3aF7/frHq3WUP g1gvhMd2JE1TjMazgE5dAhxf2OKNdl+ppD4brh8jDkYJo8Cbz8tqGAtyJpYk/Bh5UAcd TUQ4lz5xnxxwUqM9FIigHFAX1hCDvmOKwcuSZt9RniCeqYIbHrHrroroEA7WWAbuM/bX JUlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NixTeigeFj7bJFeJ3Xbq08CCTyPtA/jgmvHCQlEdtdo=; b=pSpPpilrFFfmH5ymQQRYemcpn7MldU+z560X0ibdTxNmnqNJL7QPcml44LehMWwBJZ 1sFGllx6yfbjlVWfC6kv0IilIACblXgX0Zz80dBINaDMfkGFOoTJA+LmwEXGR1DPGlBK d0QuJg5A+u7eHPiMYZGkHe6HTyx80Fqx5R/RfPGFPwg90d43PdLIMfwFxSyZTRP02b5x uIahVuB+2In+8uSBWCw2gSmirb7bJH/yWjNZQEX/u8rntGwT5kK9Ppt+9S3R3yXSCvNm m9ohdVhsy7nJV0Lwz19Mp7C07IL8I98OzLYIdF+Bi09P8NMz4u1+CIaxiqBaht+3n2mq VKow== X-Gm-Message-State: AOAM5305XXlPrEiDbv5GGi4xw5Cz5a7GugUi4nEhsN/3u5zDaAu5cXnD 2tY7AQq4NGOIXHEC26F4bZhDHCKWvRN/9A== X-Received: by 2002:a63:9502:0:b0:386:3916:ca8e with SMTP id p2-20020a639502000000b003863916ca8emr19922253pgd.357.1650990660941; Tue, 26 Apr 2022 09:31:00 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 15/47] target/arm: Use tcg_constant in handle_{rev16,crc32} Date: Tue, 26 Apr 2022 09:30:11 -0700 Message-Id: <20220426163043.100432-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 9b678cc5af..ff08306d2b 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -5372,7 +5372,7 @@ static void handle_rev16(DisasContext *s, unsigned int sf, TCGv_i64 tcg_rd = cpu_reg(s, rd); TCGv_i64 tcg_tmp = tcg_temp_new_i64(); TCGv_i64 tcg_rn = read_cpu_reg(s, rn, sf); - TCGv_i64 mask = tcg_const_i64(sf ? 0x00ff00ff00ff00ffull : 0x00ff00ff); + TCGv_i64 mask = tcg_constant_i64(sf ? 0x00ff00ff00ff00ffull : 0x00ff00ff); tcg_gen_shri_i64(tcg_tmp, tcg_rn, 8); tcg_gen_and_i64(tcg_rd, tcg_rn, mask); @@ -5380,7 +5380,6 @@ static void handle_rev16(DisasContext *s, unsigned int sf, tcg_gen_shli_i64(tcg_rd, tcg_rd, 8); tcg_gen_or_i64(tcg_rd, tcg_rd, tcg_tmp); - tcg_temp_free_i64(mask); tcg_temp_free_i64(tcg_tmp); } @@ -5663,15 +5662,13 @@ static void handle_crc32(DisasContext *s, } tcg_acc = cpu_reg(s, rn); - tcg_bytes = tcg_const_i32(1 << sz); + tcg_bytes = tcg_constant_i32(1 << sz); if (crc32c) { gen_helper_crc32c_64(cpu_reg(s, rd), tcg_acc, tcg_val, tcg_bytes); } else { gen_helper_crc32_64(cpu_reg(s, rd), tcg_acc, tcg_val, tcg_bytes); } - - tcg_temp_free_i32(tcg_bytes); } /* Data-processing (2 source) From patchwork Tue Apr 26 16:30:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566027 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3757966map; Tue, 26 Apr 2022 09:42:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDKGDBxYRS99qBjsdJIRsDFL0QMVN7nPIddLgEk6dFk4sfHHzkS8jPOg1QygoQBQ7J/ZTP X-Received: by 2002:a25:2e4e:0:b0:648:6652:ca6e with SMTP id b14-20020a252e4e000000b006486652ca6emr10789628ybn.345.1650991349498; Tue, 26 Apr 2022 09:42:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991349; cv=none; d=google.com; s=arc-20160816; b=lrwdP1svGYf33m2E2ih1XP+BnBtbRrHUhLwc8gUafaBlTv3MeEm8AMpmXqKg84T23m f7XKEVt0WQYJTtYFl9MQLd9ikDaM0pLntwG35NAqxYHB5upUvMpAnTquElrAVtEa+LB+ rkDxo2trOUclPe7PkWMdI8lyKOpkPMNRlO5skV71RbCoQaw0rMjRc3urKXQwHmU3vGn2 1PpPOlCJapcGVS5ZClpgNYPyAzBUm4eHlVn8xIcaeR62u40OamXnuGAo+LdlTFZpPWn4 qFM3gwHcc8WLRaBXMUOpdaEH7GaFMnEKyDD5B2jXdWTkC8K4SuIYcXsgEjiOskGrDFM5 uhyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=QR3LzJQ6YjEzf58rv5ySxFoYa24sQiIxhi3F4IlHklA=; b=zPG6GUkozBOlZ4XWmaK0ZYJae7h+V70uLxg3rY0Qey2ZtirkZxSZIw0/b8IPd15B2l eMtIiP28oupor2h9D1ni9Evn+cznmY94SxCYHCiZZVjeZORU2S6WihyeBZDzKsNoq0Pa w8RJACb+1s7xoMcigvB5FOBH91gbob1RYuRMkKvpgFLAZUtrzY3ypeQx2goAAIKO+Rt4 XJDBJj79KIlujHyaBGWpG7Hby+xFlaxTv9gzZoHzmz0gPaBF/hLCqnLgFgxPs24AkTFZ CcCgsNcldzTVD76APb/HHB/2ewC9Ikl7V7+dsMtgjcumN/RrLm2jvOF+WeWSxxtun8pK VNww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UCegV80k; 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 a123-20020a818a81000000b002f1c9e07835si14506597ywg.144.2022.04.26.09.42.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:42:29 -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=UCegV80k; 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]:56020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOGh-0006ks-Vw for patch@linaro.org; Tue, 26 Apr 2022 12:42:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45338) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5i-0002yL-Fg for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:14 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]:42944) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5g-0003pU-4V for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:05 -0400 Received: by mail-pg1-x52f.google.com with SMTP id bg9so16478558pgb.9 for ; Tue, 26 Apr 2022 09:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QR3LzJQ6YjEzf58rv5ySxFoYa24sQiIxhi3F4IlHklA=; b=UCegV80kHjMJgyMY1v1XvaO0Oyjozb2CuLqCUKctNaKWfD1bJBPsCo73bpEMWIRCWj /C4jfoJV+DfUHXfL/z3/uL80FmrOMPE2diOTwg6FawZHE3MK1Euy8GlaPVkYklDWEvQh Is8/X7jmXjmx788NWByBA0QqaMy8KeA9W7j9SLAKqdVbnVPLmES7nocnlkhgwigCjVZ2 BmbvEnTSdwCbf/02UEXV+ms9KVBAMiMan0ujMbCQ4N9hCpVz+Aj+0beuqoRdm3nebq5y hsWUcqGdTVDhQVokiUtzY5FO6nxMrsjzOIwxMmDl2SE46VP437FdH0caay9Y1UJUI069 sYsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QR3LzJQ6YjEzf58rv5ySxFoYa24sQiIxhi3F4IlHklA=; b=zVbCSsVCddBvsyBwgekq7LsTJF2/Z3Yk/OFZ/MAKuM3+lQntGszXt6ogJCOESg14UB aCtNhg78gmNdGhh+bdPXRTszMuH9a8Sdv+nVV+DfliAjOEcRXhhWcu5vPklOvx4znPb0 nStvpY9vREf64T99JWhszbYv+BRFg4PWRHXq2zGvGgwwq0ZzLALQDQr0OjUGFlF8A7Ww FSucKUA89NS8EkZ6iTSLM6ux7SYu6QYkvjBA95dXamgBNPZXuiU9OVy/HtzD1OQXy9Ey Iuxw51guP5GBIi8Csa0bsTzJh89xiNMKcN2KPGoIX8Se6mOdLqABIDR0IrloyzCrqTJT Mqog== X-Gm-Message-State: AOAM5324GY3n8dNaDWZUmW/hU4Vxgdz7ITZ6+RYTiYnFpqUXlGzcZscO /WtQ8q4WuUdnYlltY7Fwo/YvbSFQVr3xFQ== X-Received: by 2002:a62:be14:0:b0:505:a43b:cf6e with SMTP id l20-20020a62be14000000b00505a43bcf6emr25299684pff.33.1650990661702; Tue, 26 Apr 2022 09:31:01 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:01 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 16/47] target/arm: Use tcg_constant in disas_data_proc_2src Date: Tue, 26 Apr 2022 09:30:12 -0700 Message-Id: <20220426163043.100432-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52f.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Existing temp usage treats t1 as both zero and as a temporary. Rearrange to only require one temporary, so remove t1 and rename t2. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index ff08306d2b..358f42026c 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -5734,15 +5734,13 @@ static void disas_data_proc_2src(DisasContext *s, uint32_t insn) if (sf == 0 || !dc_isar_feature(aa64_mte_insn_reg, s)) { goto do_unallocated; } else { - TCGv_i64 t1 = tcg_const_i64(1); - TCGv_i64 t2 = tcg_temp_new_i64(); + TCGv_i64 t = tcg_temp_new_i64(); - tcg_gen_extract_i64(t2, cpu_reg_sp(s, rn), 56, 4); - tcg_gen_shl_i64(t1, t1, t2); - tcg_gen_or_i64(cpu_reg(s, rd), cpu_reg(s, rm), t1); + tcg_gen_extract_i64(t, cpu_reg_sp(s, rn), 56, 4); + tcg_gen_shl_i64(t, tcg_constant_i64(1), t); + tcg_gen_or_i64(cpu_reg(s, rd), cpu_reg(s, rm), t); - tcg_temp_free_i64(t1); - tcg_temp_free_i64(t2); + tcg_temp_free_i64(t); } break; case 8: /* LSLV */ From patchwork Tue Apr 26 16:30:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566024 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3755142map; Tue, 26 Apr 2022 09:38:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwF9TwHAsmHg49REyysXRSm5TkAMM3g+pXBQCtHCMlifmPrrmlhSwk5ga/2qg5LiF802mHp X-Received: by 2002:a81:7d46:0:b0:2f8:f29:c9ea with SMTP id y67-20020a817d46000000b002f80f29c9eamr6810279ywc.362.1650991108805; Tue, 26 Apr 2022 09:38:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991108; cv=none; d=google.com; s=arc-20160816; b=KNFqJFH3TQS8q73KJf9tFnofZy4DubHDKdZ4ESfbI+AghEhlfoPVLtKGrxWKZcn4k4 YZp2rvextKQ4MnszEEs2Uo4SD+KmVfsFBfPE2WDdM1pad6uwu9GRMxhy7c/Ii5VCqECL mYqGIXfX4lC2nZNwXnq+0sFXNwNKyvA3l2tpacUoBQpU8/oKVZim6kPW6As0D1ViCkot Lww5mYbGroGngzs8toJ/3+8nAzvXYucdImB2Bh1rAQaPb96SDcH0vfHb58cR2OQc99uW pQnMFc0NOwdxVo2yNtYfkQJqz4wmSk6HQQjmjptbfT8LGvPPJfR2lPeXWvFAoZbXfIPv WQYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=gFJtz7mXovIodl3Pn8jknNQvAg/DFZpCh2wNdDtbl9o=; b=vXgLbdwfCkgRxmy5ErYUdo0n9GjCducxDw4lX0OTbMIEB+HfHjdc8P1oF5C+mc3AmT EmNgJVWfIhv1U6Bo8WGVDWT4qp4xvznNWF3mPQOKNvSwVzGPTKnkhWhqv+N7LNVGzFhH Lrvg2baf7ijEFbFnVSQFxth8eOxjP+OR1a3ffK1+F1zMppc7OkTKMgSps/KArG8pSGnK cttS44NKL5aQ2IIzLgXNLXUtFpEpAK3JMZuGTnMCdjWuGPXkwxO+Ws7c4W71d6KML3jl Ge1RI6P4w8hxe6qybv5dZmOVWCye/xL4jZzAfvs07Z1h7vGy2rWzGsd1lIuDmT6Uou3d 4xZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ks7pGRW1; 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 s27-20020a252d5b000000b00646831ba0ebsi8880619ybe.453.2022.04.26.09.38.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:38:28 -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=Ks7pGRW1; 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]:47464 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOCq-0000zL-8U for patch@linaro.org; Tue, 26 Apr 2022 12:38:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5j-0002yY-8M for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:14 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:41662) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5g-0003po-98 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:06 -0400 Received: by mail-pj1-x102e.google.com with SMTP id z5-20020a17090a468500b001d2bc2743c4so3041061pjf.0 for ; Tue, 26 Apr 2022 09:31:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gFJtz7mXovIodl3Pn8jknNQvAg/DFZpCh2wNdDtbl9o=; b=Ks7pGRW1zFL1h6Nd1Okq2b3emtfV2o46s8XYDlo9E/Iz5coB4UUnqR41kMfjaexc28 mMd0MLX4J3e2GrDFkYpNYJO1fozpsrlDuZglBgNq2BauCfEGefCeknF2HNp3SlRAwm5O sZQNBuLFtuk9NjOsa0+RXRnHYxmvI54bH4N8gnvvdojMMNob4oxOvKtuiH/qG2PUsH++ Y3csPS/38FWSBRpNWlO29GFnpDn92+aMdvqZLN5Wrly34wDnflwduk4yAfVy+zwEFr+w +GItD68rE2y0iFijzjD2i3c92EQKDIVpkeJkZ8T0GXXjGcROreXWtEhpLJL9lRLMXrtj Zclw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gFJtz7mXovIodl3Pn8jknNQvAg/DFZpCh2wNdDtbl9o=; b=pNx3Vvu+t49QRvWDej3KxdPhqlG20cmxcvt/QoOvTKUy/3rWI55vWyOmlMWUpJOu1V DGaAZojXDxegwHflce5QvevZqZeVb+1ydys8pjP2yWHW08IUl4SVTkzAsEllUkIdEoVf tZXeYwUgPd8/lw3KiMPz+nj4OEwDFWYpEfiUAsaQZEVCl6dQdBxjwKjXaSqwjk9K3/KT rrfILySnmPJ1+XHer5E7Prhtb/4FDHYmDI7I/lDJp2pwGZXGCjlDHpaw0idzkH7Y5ZIR vgMf7oSYkJYau7bmldBucxvjXqdUvpWVjHVMv3PpOG8wNef5PiDve6Wby9Z4G1fplNfJ 3tlQ== X-Gm-Message-State: AOAM533XGSYi2gg9nF/UeSNOy0F/QLnutdzK9/OlARYKBx+1uokICDJR wWrLq3ID6Hkr8/adjtKMDbr1kFKstee/1A== X-Received: by 2002:a17:90b:1bd2:b0:1d7:dce1:77c2 with SMTP id oa18-20020a17090b1bd200b001d7dce177c2mr26522885pjb.31.1650990662446; Tue, 26 Apr 2022 09:31:02 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 17/47] target/arm: Use tcg_constant in disas_fp* Date: Tue, 26 Apr 2022 09:30:13 -0700 Message-Id: <20220426163043.100432-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 358f42026c..847da725ea 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -5875,7 +5875,7 @@ static void handle_fp_compare(DisasContext *s, int size, tcg_vn = read_fp_dreg(s, rn); if (cmp_with_zero) { - tcg_vm = tcg_const_i64(0); + tcg_vm = tcg_constant_i64(0); } else { tcg_vm = read_fp_dreg(s, rm); } @@ -5985,7 +5985,6 @@ static void disas_fp_compare(DisasContext *s, uint32_t insn) static void disas_fp_ccomp(DisasContext *s, uint32_t insn) { unsigned int mos, type, rm, cond, rn, op, nzcv; - TCGv_i64 tcg_flags; TCGLabel *label_continue = NULL; int size; @@ -6029,9 +6028,7 @@ static void disas_fp_ccomp(DisasContext *s, uint32_t insn) label_continue = gen_new_label(); arm_gen_test_cc(cond, label_match); /* nomatch: */ - tcg_flags = tcg_const_i64(nzcv << 28); - gen_set_nzcv(tcg_flags); - tcg_temp_free_i64(tcg_flags); + gen_set_nzcv(tcg_constant_i64(nzcv << 28)); tcg_gen_br(label_continue); gen_set_label(label_match); } @@ -6052,7 +6049,7 @@ static void disas_fp_ccomp(DisasContext *s, uint32_t insn) static void disas_fp_csel(DisasContext *s, uint32_t insn) { unsigned int mos, type, rm, cond, rn, rd; - TCGv_i64 t_true, t_false, t_zero; + TCGv_i64 t_true, t_false; DisasCompare64 c; MemOp sz; @@ -6097,10 +6094,8 @@ static void disas_fp_csel(DisasContext *s, uint32_t insn) read_vec_element(s, t_false, rm, 0, sz); a64_test_cc(&c, cond); - t_zero = tcg_const_i64(0); - tcg_gen_movcond_i64(c.cond, t_true, c.value, t_zero, t_true, t_false); - tcg_temp_free_i64(t_zero); - tcg_temp_free_i64(t_false); + tcg_gen_movcond_i64(c.cond, t_true, c.value, tcg_constant_i64(0), + t_true, t_false); a64_free_cc(&c); /* Note that sregs & hregs write back zeros to the high bits, @@ -6881,7 +6876,6 @@ static void disas_fp_imm(DisasContext *s, uint32_t insn) int type = extract32(insn, 22, 2); int mos = extract32(insn, 29, 3); uint64_t imm; - TCGv_i64 tcg_res; MemOp sz; if (mos || imm5) { @@ -6912,10 +6906,7 @@ static void disas_fp_imm(DisasContext *s, uint32_t insn) } imm = vfp_expand_imm(sz, imm8); - - tcg_res = tcg_const_i64(imm); - write_fp_dreg(s, rd, tcg_res); - tcg_temp_free_i64(tcg_res); + write_fp_dreg(s, rd, tcg_constant_i64(imm)); } /* Handle floating point <=> fixed point conversions. Note that we can @@ -6933,7 +6924,7 @@ static void handle_fpfpcvt(DisasContext *s, int rd, int rn, int opcode, tcg_fpstatus = fpstatus_ptr(type == 3 ? FPST_FPCR_F16 : FPST_FPCR); - tcg_shift = tcg_const_i32(64 - scale); + tcg_shift = tcg_constant_i32(64 - scale); if (itof) { TCGv_i64 tcg_int = cpu_reg(s, rn); @@ -7092,7 +7083,6 @@ static void handle_fpfpcvt(DisasContext *s, int rd, int rn, int opcode, } tcg_temp_free_ptr(tcg_fpstatus); - tcg_temp_free_i32(tcg_shift); } /* Floating point <-> fixed point conversions From patchwork Tue Apr 26 16:30:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566042 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3766302map; Tue, 26 Apr 2022 09:54:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxc3Q2JLG89gwpbSxUKks7RB3Zhsoz88JKk7b4JXTRfYbLXlMMNmp20RR338a1+FHzvxDhm X-Received: by 2002:a5b:5c4:0:b0:644:dec5:53d1 with SMTP id w4-20020a5b05c4000000b00644dec553d1mr22708569ybp.1.1650992060840; Tue, 26 Apr 2022 09:54:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650992060; cv=none; d=google.com; s=arc-20160816; b=spC/LlMQCcCZD2fglY83EkueP7Px8ata58ggMo3vJ/ApQ7R3J/IKIC0QrEaO65f0Mu MKuY2g3uweDgpLkMq3ruGs+RvJ1WDXqEd3r6AmYCNds7YkOk3W2RZktHPf+A6IWwhD7O JhBj5K1W9SQFSNUKCPQ45SzqwtNkx0FMDSjf/qzuciAnlBQjR0qWNGJIR4okuex9B8sE P1nieqv76yZG4K8kzOTx0Ri3qOTZcXINf2IzfhXvQHTzvOXzg3mVhjzeCe+DkWPU/Xoi bOlhXxQrshmY8UjNkfofG/fWv4yLPPRCf98Y7Lcq8Duv2BZV0f5w9Fx87qyu86pgFeQs wsTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=3kAfkV/aZkCQhNUer/1meejI7m8mfD0mYpM7M5aKteI=; b=z8Pn+TlLy+vCccvutazHhFwlOGbMThfED4IX3Dlngk47FlN0QzhUZBcxY+DgE/lAiz I+nVIM9q0Eac65YGiUbLMj8mAA+6CyCTxGiGQv0XOX3jc0x9nRWfIkPzSluOTFI24KcR yr6BE5KtXhvkDhOny6D5uswo25GiD7vpHmttmZzp6UkVqqYZh4Z93qs4GEiMxfLNbmIl sGE/V21VwxcQSe8dW7VFEFQHlMxdBQtlyqz5wAbKPs5xAKQtIpFza94zaaLyHp4SngCG kg4oLnLcmHVm1BKQH1f8ulw1aiqfORDozhu/qGBgXlumzgxGYin/lkbCnUY3HYwT5JLZ ynuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="zeaN/IgS"; 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 d12-20020a81ab4c000000b002f4e3664194si12714796ywk.421.2022.04.26.09.54.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:54:20 -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="zeaN/IgS"; 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]:34520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOSC-0006BS-Bx for patch@linaro.org; Tue, 26 Apr 2022 12:54:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5j-0002yX-6U for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:14 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]:40847) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5g-0003q5-Jh for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:06 -0400 Received: by mail-pf1-x42a.google.com with SMTP id i24so18427349pfa.7 for ; Tue, 26 Apr 2022 09:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3kAfkV/aZkCQhNUer/1meejI7m8mfD0mYpM7M5aKteI=; b=zeaN/IgS2Qb+sM4tHvZO64AFGqFcaCUagKt5VC+DIzkt7o51+2tgeuXJpdk3mX8Q3o qD6zKtrnajjeokSDUXctxVvikkfMcKRRrh5AUh8g4VS31wNtGhk2PTewMlQ1PsYwUMAj 452keZo3V9fvPeWBklyZmzPILhnhT9vNLTYmaHSQ7NLISBSqARdwB/WuAVmNGnN7uWac Vqx54ogXU85BDVaBLz/l2p/7gWIbKANyVuDfy819tpA5fCeXEvoyOHu5i2mYQnwA7pjl Dc5feQ17bABxuYy5jukiiOrZAIUQxm559ROl6x1SVinPiU1Yjo0/8Kjp4Fe8ua8IVlb/ w4UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3kAfkV/aZkCQhNUer/1meejI7m8mfD0mYpM7M5aKteI=; b=YOjn5a6nRjy9DWXQmKTG2i5czX0LaLmFFFdCYoF1F0ZeJmrGrMDKYwwh/G1L2T0rnu L6/l7FsCn7TGHGkhA5Ybj0xlw/99c0lh5aRrgOILIzGj6FVBLZv4mLlTbFBd3ygq1gfB llWGO80DXa5x/X9AJj0ickBANwyOyq9eCfdV0pPDu9ExG5Rc+U+tAwbAlKYKxiAmL8d3 vQuZxc14+5lnXNN4Q02u+5jUpd+CCMSCem24AnxI9I7mV7Coy5nsXCIKjaQrFt472oN0 Gu0qAxEddQ9WfECfDN+KoqQ/Zt/fuC6hYs/R59IYVXQx5pF7MmwGqbbuWOvQ0yvmKtBI GW0w== X-Gm-Message-State: AOAM533BNof+lyP4/scmFyWQs0D8QyEkzqZE7UWhaBU/5rgiW/grySa6 aFRkCeeB1OegEtrDR1pNuDwi+qs0eI36mA== X-Received: by 2002:a63:38e:0:b0:3ab:ada6:a219 with SMTP id 136-20020a63038e000000b003abada6a219mr1082601pgd.140.1650990663258; Tue, 26 Apr 2022 09:31:03 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 18/47] target/arm: Use tcg_constant in simd shift expanders Date: Tue, 26 Apr 2022 09:30:14 -0700 Message-Id: <20220426163043.100432-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 847da725ea..45abac6892 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -8353,7 +8353,7 @@ static void handle_shri_with_rndacc(TCGv_i64 tcg_res, TCGv_i64 tcg_src, /* Deal with the rounding step */ if (round) { if (extended_result) { - TCGv_i64 tcg_zero = tcg_const_i64(0); + TCGv_i64 tcg_zero = tcg_constant_i64(0); if (!is_u) { /* take care of sign extending tcg_res */ tcg_gen_sari_i64(tcg_src_hi, tcg_src, 63); @@ -8365,7 +8365,6 @@ static void handle_shri_with_rndacc(TCGv_i64 tcg_res, TCGv_i64 tcg_src, tcg_src, tcg_zero, tcg_rnd, tcg_zero); } - tcg_temp_free_i64(tcg_zero); } else { tcg_gen_add_i64(tcg_src, tcg_src, tcg_rnd); } @@ -8451,8 +8450,7 @@ static void handle_scalar_simd_shri(DisasContext *s, } if (round) { - uint64_t round_const = 1ULL << (shift - 1); - tcg_round = tcg_const_i64(round_const); + tcg_round = tcg_constant_i64(1ULL << (shift - 1)); } else { tcg_round = NULL; } @@ -8478,9 +8476,6 @@ static void handle_scalar_simd_shri(DisasContext *s, tcg_temp_free_i64(tcg_rn); tcg_temp_free_i64(tcg_rd); - if (round) { - tcg_temp_free_i64(tcg_round); - } } /* SHL/SLI - Scalar shift left */ @@ -8578,8 +8573,7 @@ static void handle_vec_simd_sqshrn(DisasContext *s, bool is_scalar, bool is_q, tcg_final = tcg_const_i64(0); if (round) { - uint64_t round_const = 1ULL << (shift - 1); - tcg_round = tcg_const_i64(round_const); + tcg_round = tcg_constant_i64(1ULL << (shift - 1)); } else { tcg_round = NULL; } @@ -8599,9 +8593,6 @@ static void handle_vec_simd_sqshrn(DisasContext *s, bool is_scalar, bool is_q, write_vec_element(s, tcg_final, rd, 1, MO_64); } - if (round) { - tcg_temp_free_i64(tcg_round); - } tcg_temp_free_i64(tcg_rn); tcg_temp_free_i64(tcg_rd); tcg_temp_free_i32(tcg_rd_narrowed); @@ -8653,7 +8644,7 @@ static void handle_simd_qshl(DisasContext *s, bool scalar, bool is_q, } if (size == 3) { - TCGv_i64 tcg_shift = tcg_const_i64(shift); + TCGv_i64 tcg_shift = tcg_constant_i64(shift); static NeonGenTwo64OpEnvFn * const fns[2][2] = { { gen_helper_neon_qshl_s64, gen_helper_neon_qshlu_s64 }, { NULL, gen_helper_neon_qshl_u64 }, @@ -8670,10 +8661,9 @@ static void handle_simd_qshl(DisasContext *s, bool scalar, bool is_q, tcg_temp_free_i64(tcg_op); } - tcg_temp_free_i64(tcg_shift); clear_vec_high(s, is_q, rd); } else { - TCGv_i32 tcg_shift = tcg_const_i32(shift); + TCGv_i32 tcg_shift = tcg_constant_i32(shift); static NeonGenTwoOpEnvFn * const fns[2][2][3] = { { { gen_helper_neon_qshl_s8, @@ -8718,7 +8708,6 @@ static void handle_simd_qshl(DisasContext *s, bool scalar, bool is_q, tcg_temp_free_i32(tcg_op); } - tcg_temp_free_i32(tcg_shift); if (!scalar) { clear_vec_high(s, is_q, rd); From patchwork Tue Apr 26 16:30:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566028 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3758113map; Tue, 26 Apr 2022 09:42:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaPumAAlJkryYCBm9dcpGpyx5a1BVhsJB2H3GbNWacIg8jhzGS0l8P5B7aGguLSX3E4ABh X-Received: by 2002:a25:b80c:0:b0:645:757a:27f3 with SMTP id v12-20020a25b80c000000b00645757a27f3mr21592878ybj.58.1650991362362; Tue, 26 Apr 2022 09:42:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991362; cv=none; d=google.com; s=arc-20160816; b=akp+OTyORxsmBjxx/CyBA16P+X8Jkk10o/elAYrWTfphLG4wUCfEPgwNIgLYdhMC0H S1NoTfkj0e8uN98a5nHaeo7SLjqCAsJai4DU6lt3KYinOyQOgTah6eJAy7YxUMUcBZxU D8T3QBz8fsV3uxTGFrIcCnhew8lzbRVBFllkC9O9UCJcAMFzTp9mf45eDaNiu9nYRKQe cXGddz6mQ8GFged3ck0/CpVy4TAIGqfuDKqJkBtNr/5Hi4FHLZgqjL++fSYu17Ele740 KrBLoUlWZ31mcYXIpoUDX5Pyn3yQiwvb8joMHXCX+KG10vJuZ99kWcVACdjyTEilNz0V Yntg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=+yFGmARPVSb9cy4VxrwoGvk0FUr7de0EImLy5Edo1hU=; b=sCt0gtLKx/MfVtjsJlsbDCungEAugMfWGqZ5aDxwcOw0qscG9cz1TZmSHgtEtvrx/r F3qFzpaTtSvSxegzgTCmE2NulgUe2TdZoPbx9/4CgtAsACAC16ALs5XSd/U3PlpqdCmw VDsj4iJZMJtlYPgUwFbLsSQjDZuJwEnWBwQc+GTa5AgRFxoiCh2GclPNyPFKvdBOZRvV L6O860ossvSPZqgY8YSFgdDPPVb3apo6nrA41tIZhzHwz1z04cE1So2L/sFVVobjzpjd IEAezNUFRrCBvWeCOA8STClJ/VCHrhVMNHMgYyLKNsTwZtho/bSC8aXon+JERWQYs/lO G3Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P2ucLjXQ; 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 x130-20020a817c88000000b002e5bb9dcb33si12854153ywc.444.2022.04.26.09.42.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:42:42 -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=P2ucLjXQ; 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]:57466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOGv-0007mE-Rh for patch@linaro.org; Tue, 26 Apr 2022 12:42:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5k-00030L-NT for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:14 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:54959) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5i-0003qf-46 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:08 -0400 Received: by mail-pj1-x1032.google.com with SMTP id fv2so3562359pjb.4 for ; Tue, 26 Apr 2022 09:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+yFGmARPVSb9cy4VxrwoGvk0FUr7de0EImLy5Edo1hU=; b=P2ucLjXQ0yzY1LPLLxZnQp8HmTEOGKo0w2d94T++rCYThwgPqE72Old8XG5aRzWa13 QhDn536l6aTA0IlxwuQTiEmbaJ8h9a+5JkdZNz75824b7knHC2DGOcBRa4yKUzXy1GIv e6gwv5qKK0kwdlFM4Ia+kCybxHHmWYt17RPbg/bHSed4ogrg+U8dbR48ScF6oHi9xLDu gLtuS2SXDUpUbqqn/Cm7QkLNNGxuHECEWlRkg5rW5p13IPzwBEcX25FwUl90IE0muM7E +s+SODl5vT55e81FHcytuNwyUfRRebmkzSbk6sebPucDluILrKNo5gAGd1Rzu38o0JkP BWTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+yFGmARPVSb9cy4VxrwoGvk0FUr7de0EImLy5Edo1hU=; b=nfNWhDCEWoln3nIWYKb/luBUKjokb3SAzTAwCgP7jHdP1SBmCnoOpKM3TKT+TNG4tR m6a+wYoGjTryUdRf2+7ZG+VGb+VABUbst6R26DSEcc9dzCOABJA2PY/hHCvHV5rXbK16 bm4df3es7zw1FwWS1btNESfQmsLKHuCz86fzgNISp6Os5RJUzUfjBzlNlV0Qk3Z2xqw0 jdN1dJ7k9Qmpi7ISJ4w8mrUl0/NcrGVvJ63a4ncAdL49h4ag+Q0AGUZaIOJBlfSR35RH 6j8ci8M0VbEMwNPt5TksF6Jjq8/rg9ddlaAUmaQBe4hOGWN0t47U8P5DnzpEonSHXwE0 Z8Wg== X-Gm-Message-State: AOAM530XN/N6StUGxnIFHrclBeqjWs9AlkH16Oa1eqqvT6XP/2fA/ZCZ lkHnNqr0/rWCOL+y8hn6jYdr6/HeqtMTIA== X-Received: by 2002:a17:90a:aa8b:b0:1d9:868c:b4c5 with SMTP id l11-20020a17090aaa8b00b001d9868cb4c5mr9968147pjq.198.1650990663994; Tue, 26 Apr 2022 09:31:03 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 19/47] target/arm: Use tcg_constant in simd fp/int conversion Date: Tue, 26 Apr 2022 09:30:15 -0700 Message-Id: <20220426163043.100432-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1032.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 45abac6892..36c714a5ed 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -8727,7 +8727,7 @@ static void handle_simd_intfp_conv(DisasContext *s, int rd, int rn, int pass; if (fracbits || size == MO_64) { - tcg_shift = tcg_const_i32(fracbits); + tcg_shift = tcg_constant_i32(fracbits); } if (size == MO_64) { @@ -8812,9 +8812,6 @@ static void handle_simd_intfp_conv(DisasContext *s, int rd, int rn, } tcg_temp_free_ptr(tcg_fpst); - if (tcg_shift) { - tcg_temp_free_i32(tcg_shift); - } clear_vec_high(s, elements << size == 16, rd); } @@ -8904,7 +8901,7 @@ static void handle_simd_shift_fpint_conv(DisasContext *s, bool is_scalar, tcg_fpstatus = fpstatus_ptr(size == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); gen_helper_set_rmode(tcg_rmode, tcg_rmode, tcg_fpstatus); fracbits = (16 << size) - immhb; - tcg_shift = tcg_const_i32(fracbits); + tcg_shift = tcg_constant_i32(fracbits); if (size == MO_64) { int maxpass = is_scalar ? 1 : 2; @@ -8962,7 +8959,6 @@ static void handle_simd_shift_fpint_conv(DisasContext *s, bool is_scalar, } } - tcg_temp_free_i32(tcg_shift); gen_helper_set_rmode(tcg_rmode, tcg_rmode, tcg_fpstatus); tcg_temp_free_ptr(tcg_fpstatus); tcg_temp_free_i32(tcg_rmode); @@ -9834,23 +9830,15 @@ static void handle_2misc_64(DisasContext *s, int opcode, bool u, case 0x1c: /* FCVTAS */ case 0x3a: /* FCVTPS */ case 0x3b: /* FCVTZS */ - { - TCGv_i32 tcg_shift = tcg_const_i32(0); - gen_helper_vfp_tosqd(tcg_rd, tcg_rn, tcg_shift, tcg_fpstatus); - tcg_temp_free_i32(tcg_shift); + gen_helper_vfp_tosqd(tcg_rd, tcg_rn, tcg_constant_i32(0), tcg_fpstatus); break; - } case 0x5a: /* FCVTNU */ case 0x5b: /* FCVTMU */ case 0x5c: /* FCVTAU */ case 0x7a: /* FCVTPU */ case 0x7b: /* FCVTZU */ - { - TCGv_i32 tcg_shift = tcg_const_i32(0); - gen_helper_vfp_touqd(tcg_rd, tcg_rn, tcg_shift, tcg_fpstatus); - tcg_temp_free_i32(tcg_shift); + gen_helper_vfp_touqd(tcg_rd, tcg_rn, tcg_constant_i32(0), tcg_fpstatus); break; - } case 0x18: /* FRINTN */ case 0x19: /* FRINTM */ case 0x38: /* FRINTP */ @@ -9890,7 +9878,7 @@ static void handle_2misc_fcmp_zero(DisasContext *s, int opcode, if (is_double) { TCGv_i64 tcg_op = tcg_temp_new_i64(); - TCGv_i64 tcg_zero = tcg_const_i64(0); + TCGv_i64 tcg_zero = tcg_constant_i64(0); TCGv_i64 tcg_res = tcg_temp_new_i64(); NeonGenTwoDoubleOpFn *genfn; bool swap = false; @@ -9926,13 +9914,12 @@ static void handle_2misc_fcmp_zero(DisasContext *s, int opcode, write_vec_element(s, tcg_res, rd, pass, MO_64); } tcg_temp_free_i64(tcg_res); - tcg_temp_free_i64(tcg_zero); tcg_temp_free_i64(tcg_op); clear_vec_high(s, !is_scalar, rd); } else { TCGv_i32 tcg_op = tcg_temp_new_i32(); - TCGv_i32 tcg_zero = tcg_const_i32(0); + TCGv_i32 tcg_zero = tcg_constant_i32(0); TCGv_i32 tcg_res = tcg_temp_new_i32(); NeonGenTwoSingleOpFn *genfn; bool swap = false; @@ -10001,7 +9988,6 @@ static void handle_2misc_fcmp_zero(DisasContext *s, int opcode, } } tcg_temp_free_i32(tcg_res); - tcg_temp_free_i32(tcg_zero); tcg_temp_free_i32(tcg_op); if (!is_scalar) { clear_vec_high(s, is_q, rd); From patchwork Tue Apr 26 16:30:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566034 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3761060map; Tue, 26 Apr 2022 09:46:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4Ed1mO2Lcprw/hYXcaT59txeStNCqiwsvjdb6jH0bKoYu73O48FD3iroFVBeMwoB8EQ2v X-Received: by 2002:a25:7544:0:b0:629:33a2:b142 with SMTP id q65-20020a257544000000b0062933a2b142mr22276385ybc.136.1650991612889; Tue, 26 Apr 2022 09:46:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991612; cv=none; d=google.com; s=arc-20160816; b=KALX+43HCCHiRfFBWT3Gv3XWgm+SlYPKo4uZCLqCh1dv7SaTTqdtL9PGYfWCzCDxX6 bXeg5MHQYdkBbIxslZsFJHwb+FaALYf3jALsp82FWnQ/qoDbPL55mMbB7npbeQuY9F2F 7a0ezrTS5db91R9AFsiaaWKOUCfZuxmRwvXg1j8I5J+FRdzTwmW5DyA6OsfxCbwgoXcU GFosFhv+fGb4WFQfagOoScvSfaYJ9r5khaz66zCu6VnXyG+pp1hkm7Pk94l45CF2a0af afJKu2OU87XgqD1zrPHbXXnYO6ioskffe+Ty+2J9OZ3tgl3I1PbG6QyLXl3gFVfQ8Sgv I1Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=zO7Eay0fSwC1ONHg70kqbIkUj5MYmUIqyNT7OSpouWo=; b=tm9l2owKh2nuBz8CeBIoFa4vkju/QAF4Kpp9lGTLJ5lN6L9sZpc3Zcel1eeuECr5PQ mPLnPw7wdofqEh7BLEcZp4We4sMcMZZiZUWSzPOr9YADn+zk/YIMZu3xpGNZiwMjjLDU O0ko/jYaDOamYKGCgmJUJYwwxL3iPoxC2qmweb/ThBAoES1XzjFl0QUKBrM6E/D3k0p0 IrGafHyzutfg+ma3I6IV7V7McnnlCWkfIoHSnxV/0bz0+LtbxojichONoV2UUKXbvDWF Bc4KnIV6JfyP7UITPE5J4Bua2x8R//BB+18LmDtxpZVcE/IvJLNt3AYTkUu5zhdzoT5n yvqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S6LJ1Isd; 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 123-20020a251581000000b006488672fba3si3774725ybv.310.2022.04.26.09.46.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:46:52 -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=S6LJ1Isd; 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]:44006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOKy-0001Q0-CF for patch@linaro.org; Tue, 26 Apr 2022 12:46:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5n-00031e-5P for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:14 -0400 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:37637) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5i-0003r5-7I for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:08 -0400 Received: by mail-pg1-x534.google.com with SMTP id 15so8134887pgf.4 for ; Tue, 26 Apr 2022 09:31:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zO7Eay0fSwC1ONHg70kqbIkUj5MYmUIqyNT7OSpouWo=; b=S6LJ1IsdEaLX6u2F4ufUiF7GbRCz2YTFp02ZLmsmuWU45AAW/kVcjliNW6XnSapZjl diaeIbsVhLqwoSdAI15e9NP9Vj0c4sgWBDFAqwfUzrI+RPY7Wxsw+FNnHYr3jrfSvGFG 9hI5USKhG1Cff7v7kD4KKztr9YohXtVeZX0ZKwc+WdwIvOm8Qh3QP1owoJpiACaUr59C M5PFbxwSK/3ETKuxTejWT9RWSac4aKONVUJjsVLmK6d8ux3QYIARvNuySgv1YmPpqi/R StJcqsa54YjshXrF0WSij2KrYSf/PIa6lOc/FSiIw5/VuXkigxAvcYYj7Bubbe4jW2D8 lKqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zO7Eay0fSwC1ONHg70kqbIkUj5MYmUIqyNT7OSpouWo=; b=M7LOzNuLP+aK8/r8sgqtfR/devw1F+CnX7mZ+mSEBZ/oJH4t/dj90i2rbRcmGDN+r+ UhAm8PGwtLHYcC5Gbv71hUycNQJM3SMiEs9v9CT81a4y3IF+GNrl9ELNV4PqKB5hvRQh 4bjURoxvQwLdFeYl/Y6Uoo0QnpFjSCBfX6KOwVwMfNhNggQyM8VtEot/snWXNTr4YTSb QZ8SeXBZB1vX770irHaRbCeRVvM2gi7w9bl5rF2tHLD5uz9I/GNKJ9SCu77NvSpVUyoi cQkuVEFJDoEwXKNgsx1tnRDITr7IBSiWyvork4IWsSceQTJL8risuKNmJ6GmogtgAyrK kBYw== X-Gm-Message-State: AOAM530fRw068Xqb/mrCHmVVhH+CnJ/doabv8R3F5g0do6KUw3esg68O zPfuDAP8ho4k00YZxxesFMokugbdhVUieg== X-Received: by 2002:aa7:9085:0:b0:50d:35ae:271 with SMTP id i5-20020aa79085000000b0050d35ae0271mr14122781pfa.42.1650990664718; Tue, 26 Apr 2022 09:31:04 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 20/47] target/arm: Use tcg_constant in 2misc expanders Date: Tue, 26 Apr 2022 09:30:16 -0700 Message-Id: <20220426163043.100432-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::534; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x534.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 40 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 30 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 36c714a5ed..35dc21da8f 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -10088,7 +10088,7 @@ static void handle_2misc_narrow(DisasContext *s, bool scalar, int passes = scalar ? 1 : 2; if (scalar) { - tcg_res[1] = tcg_const_i32(0); + tcg_res[1] = tcg_constant_i32(0); } for (pass = 0; pass < passes; pass++) { @@ -10266,9 +10266,7 @@ static void handle_2misc_satacc(DisasContext *s, bool is_scalar, bool is_u, } if (is_scalar) { - TCGv_i64 tcg_zero = tcg_const_i64(0); - write_vec_element(s, tcg_zero, rd, 0, MO_64); - tcg_temp_free_i64(tcg_zero); + write_vec_element(s, tcg_constant_i64(0), rd, 0, MO_64); } write_vec_element_i32(s, tcg_rd, rd, pass, MO_32); } @@ -10451,23 +10449,17 @@ static void disas_simd_scalar_two_reg_misc(DisasContext *s, uint32_t insn) case 0x1c: /* FCVTAS */ case 0x3a: /* FCVTPS */ case 0x3b: /* FCVTZS */ - { - TCGv_i32 tcg_shift = tcg_const_i32(0); - gen_helper_vfp_tosls(tcg_rd, tcg_rn, tcg_shift, tcg_fpstatus); - tcg_temp_free_i32(tcg_shift); + gen_helper_vfp_tosls(tcg_rd, tcg_rn, tcg_constant_i32(0), + tcg_fpstatus); break; - } case 0x5a: /* FCVTNU */ case 0x5b: /* FCVTMU */ case 0x5c: /* FCVTAU */ case 0x7a: /* FCVTPU */ case 0x7b: /* FCVTZU */ - { - TCGv_i32 tcg_shift = tcg_const_i32(0); - gen_helper_vfp_touls(tcg_rd, tcg_rn, tcg_shift, tcg_fpstatus); - tcg_temp_free_i32(tcg_shift); + gen_helper_vfp_touls(tcg_rd, tcg_rn, tcg_constant_i32(0), + tcg_fpstatus); break; - } default: g_assert_not_reached(); } @@ -10639,8 +10631,7 @@ static void handle_vec_simd_shrn(DisasContext *s, bool is_q, read_vec_element(s, tcg_final, rd, is_q ? 1 : 0, MO_64); if (round) { - uint64_t round_const = 1ULL << (shift - 1); - tcg_round = tcg_const_i64(round_const); + tcg_round = tcg_constant_i64(1ULL << (shift - 1)); } else { tcg_round = NULL; } @@ -10658,9 +10649,6 @@ static void handle_vec_simd_shrn(DisasContext *s, bool is_q, } else { write_vec_element(s, tcg_final, rd, 1, MO_64); } - if (round) { - tcg_temp_free_i64(tcg_round); - } tcg_temp_free_i64(tcg_rn); tcg_temp_free_i64(tcg_rd); tcg_temp_free_i64(tcg_final); @@ -12364,7 +12352,7 @@ static void handle_2misc_pairwise(DisasContext *s, int opcode, bool u, } } if (!is_q) { - tcg_res[1] = tcg_const_i64(0); + tcg_res[1] = tcg_constant_i64(0); } for (pass = 0; pass < 2; pass++) { write_vec_element(s, tcg_res[pass], rd, pass, MO_64); @@ -12797,25 +12785,17 @@ static void disas_simd_two_reg_misc(DisasContext *s, uint32_t insn) case 0x1c: /* FCVTAS */ case 0x3a: /* FCVTPS */ case 0x3b: /* FCVTZS */ - { - TCGv_i32 tcg_shift = tcg_const_i32(0); gen_helper_vfp_tosls(tcg_res, tcg_op, - tcg_shift, tcg_fpstatus); - tcg_temp_free_i32(tcg_shift); + tcg_constant_i32(0), tcg_fpstatus); break; - } case 0x5a: /* FCVTNU */ case 0x5b: /* FCVTMU */ case 0x5c: /* FCVTAU */ case 0x7a: /* FCVTPU */ case 0x7b: /* FCVTZU */ - { - TCGv_i32 tcg_shift = tcg_const_i32(0); gen_helper_vfp_touls(tcg_res, tcg_op, - tcg_shift, tcg_fpstatus); - tcg_temp_free_i32(tcg_shift); + tcg_constant_i32(0), tcg_fpstatus); break; - } case 0x18: /* FRINTN */ case 0x19: /* FRINTM */ case 0x38: /* FRINTP */ From patchwork Tue Apr 26 16:30:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566035 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3763443map; Tue, 26 Apr 2022 09:50:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8GQaFui8ChgOfJRID8Kduf95xcYPVoTJ1Yphz52A4sgfuR4vI1km5WYrY5UKLB32NFNrM X-Received: by 2002:a5b:d48:0:b0:648:6b61:bf7e with SMTP id f8-20020a5b0d48000000b006486b61bf7emr10504967ybr.77.1650991811653; Tue, 26 Apr 2022 09:50:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991811; cv=none; d=google.com; s=arc-20160816; b=yhEmtd2GOVgq/TDIAGUsOvojAzHnTBFZcn7BEAsnHZ6+AEFsm+0QuDsdqnvK5u4Ucw IsPYnUT0q8PRtyglNX2pse6kBaYzJ3L8kJ9f3mgYKjQn598W7uoJMnfVU4yhQnltEjbC 7yvGH5hVCOxkqvFkLmdzK/nnAfqrb+B15/za/TeXROo8nsozXz43TrB7Oyg+BIToQOsM I2vV3STqXys6tgpVnfAGy59yA9J3Jgtdvi6MTDvy0WiltPqWdMzAH4vUKbyzaHhChPmF gJnwYENWFDhWcQ+qHKVmTl61yT+7G5obQA/GQ/3W6VI8b3xA6vsKqeVLjz9sJM+i3iiL euVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=V1l7h7RzBXJQhj58kOo+BDunsheVJJvh/PuzYMuyeHU=; b=Br2TgjqnYj/9vbuSHgDDYj3V/AfF/mmMIlkL626DP9DoRd6efmpEvdAW1rqORoF+u8 lqF6myYQwwCDMcaGXCDjvzmbm1sbgSSuir8L/FjN/eFQcmiJWzTM92ofu+aIxBHNvxBo qYrj3+JcXdFtfGInzgXbVsce3+DKtaIfg/1PegBDxE4lnyEZ0xQVFE3XUM2D8hEYERjK HfxjQFbKSHD48qNPYsL6bKzRhL+0QLhOG2ZTHxZ4hh+Llynuxp0WPJKEDZlHGBt34Djo OBKiWEliEJIjvpDSgFLh8OW9jN/JTPloye/23NhCCdwf5luSCVB+MIS127dnTzhVmNm2 lXQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qq+STMc5; 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 e129-20020a25e787000000b00648a468f888si2345053ybh.89.2022.04.26.09.50.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:50:11 -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=Qq+STMc5; 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]:48734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOOB-0004l7-5F for patch@linaro.org; Tue, 26 Apr 2022 12:50:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5n-00031b-3H for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:14 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]:42587) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5i-0003rN-TY for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:08 -0400 Received: by mail-pj1-x102c.google.com with SMTP id l11-20020a17090a49cb00b001d923a9ca99so3009705pjm.1 for ; Tue, 26 Apr 2022 09:31:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=V1l7h7RzBXJQhj58kOo+BDunsheVJJvh/PuzYMuyeHU=; b=Qq+STMc5JCUKJIv5a2aYxYofetwrwWpI7t37aKvAbF6yXYE0wafF4bICdF40To3yga OXJbZ9isPOCPPZ8HQqdfCmlQXYALd9SuibbZKE0l4E+Dq8/KWjyWl5QADpG93vXMwDhn XqV0t+dOL6keizDBbMUbGdzFJgvP3jIJcGECbaAk4icU05JrXi3V+PA5/eZ+WilHOm68 KRc4U2gwTFFRIcKcbnh0qJ/11YjpSa1COep6kPQlJO+TtWFGL9CpzWV21z2utohW3iJH MKlwmBr79El7lbUgpxA27IKye6jIcEPn1RJatpfekNtzyoTU0UiqYScYWBKib/d8PHEM qbVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=V1l7h7RzBXJQhj58kOo+BDunsheVJJvh/PuzYMuyeHU=; b=iQYOmt9nbHcMkOQS3bmNebs/5ncGkeYkGCdoSlUzf/LN5qAdLEBp3fPwLvflZmicAS 12tCgaOG2p2mH9qRAkA4FnSNAUYDiVZTUogjK0FgVAlRKVXewTM/uT1X4gIi6BQhGJh+ Skg/+0oaUpjsJLAAOEBzm2m0RRn5aCeZQZGDqYDEga5NIwYOS4hkWh6JWbTYG8LV26S1 LppH66UPYRvIQJ37p4qcTNWibfgVaSZx+7CEY0vVZrys6aurmjU+/IvuSsZojqtRQ9uf dJsjUq/D5Yj96q3TNV0Ml0xRuBYAlSzrG3yTEZVAYK1qkCXHMY6DnOvQ+Uh8CsR2emZm cYow== X-Gm-Message-State: AOAM531yzdMd+E+K9ia95g5QzU0Jnv27dAklVpazgfYwRgQ6V4QVN9U9 gy0RdPWCCHFjRfMGkiUerB8qh95OJZ1cfA== X-Received: by 2002:a17:902:8497:b0:154:9282:bc01 with SMTP id c23-20020a170902849700b001549282bc01mr24670200plo.33.1650990665419; Tue, 26 Apr 2022 09:31:05 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 21/47] target/arm: Use tcg_constant in balance of translate-a64.c Date: Tue, 26 Apr 2022 09:30:17 -0700 Message-Id: <20220426163043.100432-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102c.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Finish conversion of the file to tcg_constant_*. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 35dc21da8f..1163ba12a4 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -13893,7 +13893,7 @@ static void disas_simd_indexed(DisasContext *s, uint32_t insn) } if (is_scalar) { - tcg_res[1] = tcg_const_i64(0); + tcg_res[1] = tcg_constant_i64(0); } for (pass = 0; pass < 2; pass++) { @@ -14297,7 +14297,7 @@ static void disas_crypto_four_reg(DisasContext *s, uint32_t insn) tcg_op2 = tcg_temp_new_i32(); tcg_op3 = tcg_temp_new_i32(); tcg_res = tcg_temp_new_i32(); - tcg_zero = tcg_const_i32(0); + tcg_zero = tcg_constant_i32(0); read_vec_element_i32(s, tcg_op1, rn, 3, MO_32); read_vec_element_i32(s, tcg_op2, rm, 3, MO_32); @@ -14317,7 +14317,6 @@ static void disas_crypto_four_reg(DisasContext *s, uint32_t insn) tcg_temp_free_i32(tcg_op2); tcg_temp_free_i32(tcg_op3); tcg_temp_free_i32(tcg_res); - tcg_temp_free_i32(tcg_zero); } } @@ -14825,22 +14824,19 @@ static void aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu) gen_helper_yield(cpu_env); break; case DISAS_WFI: - { - /* This is a special case because we don't want to just halt the CPU - * if trying to debug across a WFI. + /* + * This is a special case because we don't want to just halt + * the CPU if trying to debug across a WFI. */ - TCGv_i32 tmp = tcg_const_i32(4); - gen_a64_set_pc_im(dc->base.pc_next); - gen_helper_wfi(cpu_env, tmp); - tcg_temp_free_i32(tmp); - /* The helper doesn't necessarily throw an exception, but we + gen_helper_wfi(cpu_env, tcg_constant_i32(4)); + /* + * The helper doesn't necessarily throw an exception, but we * must go back to the main loop to check for interrupts anyway. */ tcg_gen_exit_tb(NULL, 0); break; } - } } } From patchwork Tue Apr 26 16:30:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566037 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3764176map; Tue, 26 Apr 2022 09:51:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxGq+mZhD//99GF9Nkb6uHt69EDwMj+w0JSsxvvsaF9t107pIkzLYBJshfKjVIMrDl2bOt X-Received: by 2002:a25:d6d6:0:b0:645:de57:8058 with SMTP id n205-20020a25d6d6000000b00645de578058mr18642177ybg.69.1650991882395; Tue, 26 Apr 2022 09:51:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991882; cv=none; d=google.com; s=arc-20160816; b=RHnM74iiI4+zfXx958wS5t1nWd9dMTTn8homNfz+4gZWgQkEnUuWdvF5u+84TmCEKm gjLs0LSggcCZmWzGKtwxQlsORuppOPkHVsCUEKYTW00smE89dB8bx0Bs8lJ/P56HXIAu +TX5LGJq4mPPLZSLOMhf0+XiVl6X1cjs+ZJ8dhfTkMRqLWWX/0Fq6TprAGjUHDKNTFyj 7OdbD3/CsfxtRrXFDjJp5K5OOFBWkeDUeYUKRv5dUQAfk9LzmvbK/Vd3OuGLF66oyb0g kaFVr+0RdI9jNLwmcCkQ9LFWTIOAsELtL/K1vYwTN5hm+8r5/UfAw8NeMnqBzXo5AmJt yB+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=IYMcPGFVOr91pPlM11FaTOiv5VUJrdzpOfUOVnmASJA=; b=fz+5UNqAdBmX41/vYz/1RX1aq65OzkxkEHeGAWu4zz5MoQhKKitL6EYSXoGHwR2XO5 4+29fTAf0itWzat3H4eyex7JpBD87omYxUEk0D0NJ3oosnxo2Uy8zQofHI2hx0CsHT56 rNqA5J3lgo4wW0g/gaL1930hEIta41VxtleJylyfl/Qgg8xrmbJL1XlMCPEik+xaWfKX tdS4E/SjITIBAdmblKgjNFdxDfYAjl9f4dDXPK97/vzkKu7s3ntROVWllQKgfno4VK7b bLDTI3soDVgMxiOqmChfYs1mIIcfW7WIX7PFy6B14PPky50dWWczZZ782XFD7C3kR6pN jztQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cQeiRewY; 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 n5-20020a0dcb05000000b002f7c45a19adsi8930911ywd.256.2022.04.26.09.51.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:51:22 -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=cQeiRewY; 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]:52650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOPJ-0007kG-NM for patch@linaro.org; Tue, 26 Apr 2022 12:51:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5o-000320-9l for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:15 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:40845) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5k-0003rr-DI for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:11 -0400 Received: by mail-pg1-x52b.google.com with SMTP id x12so2271168pgj.7 for ; Tue, 26 Apr 2022 09:31:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IYMcPGFVOr91pPlM11FaTOiv5VUJrdzpOfUOVnmASJA=; b=cQeiRewYqPLG8iD0pL7VDopNqpnn6k4jiU2oa+7zWA9q26ls5CvEp+YMt3AJ+TLnkU WC7FGe2FkGJFUI1E9SVgy86Md9/jBBEVOImYhrw6cxxaQjcoovB9fwdtz+1yQpH08UpQ CXGQQxq3h1i/PP85BwFQknM5BPI4tvDYHxiPw4UPbt3GXBPtThDeRbUQCWX6izQdDwAQ 9w/31PpDoem8aK64v2tLq8G6NTxaQTxgJz5WX6lMStDaF7JwzUjsX2w5lTgHWbdKhNls 84FNvxDJtIXAYcj0BbvWL8TmxdxslisCoaHysLuptZhVRwpn6EHOu7C1Cu22DwkdptdO sCfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IYMcPGFVOr91pPlM11FaTOiv5VUJrdzpOfUOVnmASJA=; b=Ux3z/Zi+CKD5MOC7ssErDef6wodrKcQlJoygMS8hyUpYsalMq0TY00LWKOkN42FXGJ vsIsUZEq7Klo7Tfe8+ecEs41DCcGodCy33gaWCAGJEHo5CN1sFscp4mc1qwe2FJL9VTq 1U9UDdVsgAddRS8D1pfmASrRDS/UBLI1KnHuPgDNBfnJTpNXIrTkZRmSVWJCJd2KqVE6 +L7DPj21jFRc7ogBfNfvWUJiEgR7Jjg5aGNzIEVbTM863wcaYe/GDH75n0ihg8NY0X++ TfBYgfau8XycTj7uY5o3tnX5/eQ06nFSTaR2QIzTGARoa2SyiHszGj9ijUvdOYikGLtu IoZg== X-Gm-Message-State: AOAM531/ndI2RKom4rkhktukmNw8wyhbTMawa7WWNUpsXGRTemol1Z2s oaS2iyAGv27MfWoyQnJkJB+6KSunPXOr9Q== X-Received: by 2002:a63:fd05:0:b0:3aa:127d:538a with SMTP id d5-20020a63fd05000000b003aa127d538amr20111767pgh.95.1650990666290; Tue, 26 Apr 2022 09:31:06 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 22/47] target/arm: Use tcg_constant for aa32 exceptions Date: Tue, 26 Apr 2022 09:30:18 -0700 Message-Id: <20220426163043.100432-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52b; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52b.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate.c | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index d09692c125..9bd1b46a52 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -346,9 +346,7 @@ static void store_sp_checked(DisasContext *s, TCGv_i32 var) void gen_set_cpsr(TCGv_i32 var, uint32_t mask) { - TCGv_i32 tmp_mask = tcg_const_i32(mask); - gen_helper_cpsr_write(cpu_env, var, tmp_mask); - tcg_temp_free_i32(tmp_mask); + gen_helper_cpsr_write(cpu_env, var, tcg_constant_i32(mask)); } static void gen_rebuild_hflags(DisasContext *s, bool new_el) @@ -373,11 +371,8 @@ static void gen_rebuild_hflags(DisasContext *s, bool new_el) static void gen_exception_internal(int excp) { - TCGv_i32 tcg_excp = tcg_const_i32(excp); - assert(excp_is_internal(excp)); - gen_helper_exception_internal(cpu_env, tcg_excp); - tcg_temp_free_i32(tcg_excp); + gen_helper_exception_internal(cpu_env, tcg_constant_i32(excp)); } static void gen_singlestep_exception(DisasContext *s) @@ -1078,12 +1073,8 @@ static inline void gen_smc(DisasContext *s) /* As with HVC, we may take an exception either before or after * the insn executes. */ - TCGv_i32 tmp; - gen_set_pc_im(s, s->pc_curr); - tmp = tcg_const_i32(syn_aa32_smc()); - gen_helper_pre_smc(cpu_env, tmp); - tcg_temp_free_i32(tmp); + gen_helper_pre_smc(cpu_env, tcg_constant_i32(syn_aa32_smc())); gen_set_pc_im(s, s->base.pc_next); s->base.is_jmp = DISAS_SMC; } @@ -1111,13 +1102,9 @@ void gen_exception_insn(DisasContext *s, uint64_t pc, int excp, static void gen_exception_bkpt_insn(DisasContext *s, uint32_t syn) { - TCGv_i32 tcg_syn; - gen_set_condexec(s); gen_set_pc_im(s, s->pc_curr); - tcg_syn = tcg_const_i32(syn); - gen_helper_exception_bkpt_insn(cpu_env, tcg_syn); - tcg_temp_free_i32(tcg_syn); + gen_helper_exception_bkpt_insn(cpu_env, tcg_constant_i32(syn)); s->base.is_jmp = DISAS_NORETURN; } @@ -1131,16 +1118,11 @@ void unallocated_encoding(DisasContext *s) static void gen_exception_el(DisasContext *s, int excp, uint32_t syn, TCGv_i32 tcg_el) { - TCGv_i32 tcg_excp; - TCGv_i32 tcg_syn; - gen_set_condexec(s); gen_set_pc_im(s, s->pc_curr); - tcg_excp = tcg_const_i32(excp); - tcg_syn = tcg_const_i32(syn); - gen_helper_exception_with_syndrome(cpu_env, tcg_excp, tcg_syn, tcg_el); - tcg_temp_free_i32(tcg_syn); - tcg_temp_free_i32(tcg_excp); + gen_helper_exception_with_syndrome(cpu_env, + tcg_constant_i32(excp), + tcg_constant_i32(syn), tcg_el); s->base.is_jmp = DISAS_NORETURN; } From patchwork Tue Apr 26 16:30:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566031 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3759422map; Tue, 26 Apr 2022 09:44:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIPt+sk7lbUQSh9bnZXuWWQ590vYBF4jOrwGYVVUkijK/eM6qBXnknNbh1e/ZH3NwSrSpJ X-Received: by 2002:a5b:50f:0:b0:629:5d05:aebf with SMTP id o15-20020a5b050f000000b006295d05aebfmr21930391ybp.618.1650991475675; Tue, 26 Apr 2022 09:44:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991475; cv=none; d=google.com; s=arc-20160816; b=YgZrUi8e+EhKNBN6b+pHBG39Qjna2DQCHEi/KHxXEmXQmYMi5zZm8xl1no71Nmq3WN FqJf1XLp1NbXUMO/Iz91hemNTdEKkLznBNrCZob/H9r1JqYnq9FxIYscSt70P/StqmIM q//LrH449I/UXvDoensga+KILPdbs57ifHtrHH3EKPNBKjrTjdvTLlVflaYtwKlgfyhX 4XPXBLtEWjfbeKgVrMO4sgaifvIuBuFXfOE4n8g7Xs183OWgVbBOb3VuDjuMTZlh5S9N 0munKKkLhoEck543sSChUDasH8gznABDzcj2ybKX7h5sDKKIixsMwXhoMGk518HdJzg9 JFYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=ItNsMIpQW+EwLJuGlJ3T+gRGOc/rNBHOo2ljke9h1ZE=; b=YwXWF7vvjjBlAMSC1xCRg3XgtQrusAj8Te6GCPIVv8rakCf95zlqgn5WIjC9cGICpl 1Y0R4iCA9zWcWOBB4+tY7DdF9Bidw545Jx9Q3PPl+MhlvjnItUdhWtZWlXAGzFHlz0Wo 0by51YKzkv2A/UOgL1CFzg9VoIuJzxNskLbpg4RYM5O6qEcOxcsHNpNl5wa4FWShejXA NiOygifz3llFMjapVlGVSaJEWHIKLcJooIsz8/Y05NCIAN+QuGnLktfIZ9C0blojzW7T 6roig4AzVfU5OdiR9PFPWGKWTO7TxFkU/SVNEP3LN8LFAGP2RHcUamO9HZun2mS7fSRR 2Oew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ucwLtzRm; 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 f82-20020a256a55000000b006413dbe62cfsi14477808ybc.306.2022.04.26.09.44.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:44:35 -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=ucwLtzRm; 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]:37694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOIl-0005I8-5e for patch@linaro.org; Tue, 26 Apr 2022 12:44:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5t-00035Y-6q for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:20 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:44031) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5m-0003sG-Pe for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:13 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d15so30708142pll.10 for ; Tue, 26 Apr 2022 09:31:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ItNsMIpQW+EwLJuGlJ3T+gRGOc/rNBHOo2ljke9h1ZE=; b=ucwLtzRmxmFPWsz0q5EU7kHg01oDruqut61GgnaBj1v6x4uWSUK0OoRFFUdAWKzB9D 7yEwUw1aozf5T9AgEWg1jWN3ApyIGGc+y5YRfhUwJpO06CTppqhrW1ok7DHvmlfqWtfa 1iNV/Tr2hLi3sjV/ERPjFxWD2UxCFvE/0pr4wSXxhOqPtBBBng6CMUgdUfgyt2BhMJVK dlB6T9/dY6+UIZT1tiiclaUi9lQgvJonHx8a76iPhUfnjOVKId+tictDlmKK3nLPT1PB 1StYNbo8aM5dULRdgGXoBgdwHTuVMaFESwoc6nbj0/0yno4s+uVZzE1yFQEtFbIoeoi6 1j9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ItNsMIpQW+EwLJuGlJ3T+gRGOc/rNBHOo2ljke9h1ZE=; b=o0EAKhu6hK/HQAvkzOHd7Pmjh3ds2Bja6GxHKFbZxsKHfsXIZKBV6iewfF4WN39lPK Dd2YAuHtUhYlByaqYGvYZKoNAFIkJjvORcY+ZuzqU50bBfB3+2k6GRtkSyza7Si5TXj4 plXd3SZxkQxYWMkDPSF6G6xt3j6pTXNHuaEZa2VqP1BcaAWol2SVyfkBPRrqJqd6sYbH 7JULSqtAvDqy1Dt1j54WZFS93xZhdgTsOfDpPYXfnmA228c+8rQ2t3Te7jSTKxfMrUNJ X3Jj3EqBrNJ3CD1sE1JVE15m5LzcPs6dYCFLdukgHAyR7OjPwvXvTrFu4QQwrO7uQsQ6 5tEQ== X-Gm-Message-State: AOAM531rR2Bg89/i+vzQrP/4Lx24jFUyyaDoLvAsWDeE38hs7hBaqicp kxG52VZ0lD8OLYbe7tehl54UUSNltajkXQ== X-Received: by 2002:a17:902:cec2:b0:15d:37b0:2d07 with SMTP id d2-20020a170902cec200b0015d37b02d07mr3840906plg.128.1650990667032; Tue, 26 Apr 2022 09:31:07 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 23/47] target/arm: Use tcg_constant for disas_iwmmxt_insn Date: Tue, 26 Apr 2022 09:30:19 -0700 Message-Id: <20220426163043.100432-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62e.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 9bd1b46a52..501192ed55 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -1845,24 +1845,21 @@ static int disas_iwmmxt_insn(DisasContext *s, uint32_t insn) gen_op_iwmmxt_movq_M0_wRn(wrd); switch ((insn >> 6) & 3) { case 0: - tmp2 = tcg_const_i32(0xff); - tmp3 = tcg_const_i32((insn & 7) << 3); + tmp2 = tcg_constant_i32(0xff); + tmp3 = tcg_constant_i32((insn & 7) << 3); break; case 1: - tmp2 = tcg_const_i32(0xffff); - tmp3 = tcg_const_i32((insn & 3) << 4); + tmp2 = tcg_constant_i32(0xffff); + tmp3 = tcg_constant_i32((insn & 3) << 4); break; case 2: - tmp2 = tcg_const_i32(0xffffffff); - tmp3 = tcg_const_i32((insn & 1) << 5); + tmp2 = tcg_constant_i32(0xffffffff); + tmp3 = tcg_constant_i32((insn & 1) << 5); break; default: - tmp2 = NULL; - tmp3 = NULL; + g_assert_not_reached(); } gen_helper_iwmmxt_insr(cpu_M0, cpu_M0, tmp, tmp2, tmp3); - tcg_temp_free_i32(tmp3); - tcg_temp_free_i32(tmp2); tcg_temp_free_i32(tmp); gen_op_iwmmxt_movq_wRn_M0(wrd); gen_op_iwmmxt_set_mup(); @@ -2318,10 +2315,9 @@ static int disas_iwmmxt_insn(DisasContext *s, uint32_t insn) rd0 = (insn >> 16) & 0xf; rd1 = (insn >> 0) & 0xf; gen_op_iwmmxt_movq_M0_wRn(rd0); - tmp = tcg_const_i32((insn >> 20) & 3); iwmmxt_load_reg(cpu_V1, rd1); - gen_helper_iwmmxt_align(cpu_M0, cpu_M0, cpu_V1, tmp); - tcg_temp_free_i32(tmp); + gen_helper_iwmmxt_align(cpu_M0, cpu_M0, cpu_V1, + tcg_constant_i32((insn >> 20) & 3)); gen_op_iwmmxt_movq_wRn_M0(wrd); gen_op_iwmmxt_set_mup(); break; @@ -2375,9 +2371,8 @@ static int disas_iwmmxt_insn(DisasContext *s, uint32_t insn) wrd = (insn >> 12) & 0xf; rd0 = (insn >> 16) & 0xf; gen_op_iwmmxt_movq_M0_wRn(rd0); - tmp = tcg_const_i32(((insn >> 16) & 0xf0) | (insn & 0x0f)); + tmp = tcg_constant_i32(((insn >> 16) & 0xf0) | (insn & 0x0f)); gen_helper_iwmmxt_shufh(cpu_M0, cpu_env, cpu_M0, tmp); - tcg_temp_free_i32(tmp); gen_op_iwmmxt_movq_wRn_M0(wrd); gen_op_iwmmxt_set_mup(); gen_op_iwmmxt_set_cup(); From patchwork Tue Apr 26 16:30:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566043 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3768623map; Tue, 26 Apr 2022 09:57:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGOTwoFvQB/9mcOa6FbHhGZdFINibrb6D3bN+D0tArDWqWiyPE3l1URG6RHUGdbtqUkIav X-Received: by 2002:a05:6902:13c2:b0:641:b6d:a151 with SMTP id y2-20020a05690213c200b006410b6da151mr21423334ybu.348.1650992249148; Tue, 26 Apr 2022 09:57:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650992249; cv=none; d=google.com; s=arc-20160816; b=HQu0v1wbfXkUxOG5FP7Jvf0jBAB9appuuDFr5yKnf/g3rGHiq+Z0gHLKrOvxxROL+P s0bXyN2Av0zV5TXHP0SAZM5Ga4pgcVf4/dzF6Fd5YzP66ZLyv1+pPyXFeMPBZxWmmK0R /TkFM2gXC0lwB8HRpOx72P6cG17VmdjZQqzmApW7cMbD9WeztacSZ4xtdlyj0ZTBvnql HDHlCzjxBT9qWf/PyL2hapxjOkBe0h3LIflRRJ+r6IIeoViGW5I/aREdmGdYnUkaAgcu LDjFQ7ebMuq+3xO7SOfdnJg371KGhyj4HBOzlsHoks7rS7C5IRxk8jrcwNJdSHGyAPeV g6Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=YT4PcROW/lGugJoLo5kIvKRZrra7WUrqQMozbJdZCxo=; b=mWaq3hpFBaVceq4P7IPxcF0JSDRdKbwIcZFaVgx04xnSZV5k3Vm38fGOU4dtLSnLkd T4cZZLEOFlCV6yV6tmD/dwUp6hgGkS+ACr40SQ0uP+/QApfGLTgbwsfU92+5gKY+G8M4 +ibrCwMry7a7zFE9nX4XKP1MnN7/wCaIYLGRxLWBsOoBYngT5PmB5RwoMN6F9GKOdZnu EwKK/0kre8WMbC4JrHfQugaSJzTfne/LiMNfqxfY8txaFD7Wzn2zzM7EZ2ywJl06Ykod z7xrlxvVDutMxqwrg9wGCyWLpRU9yszTawGAnJvQtefhUgH9Xn8yT7jd1XUgoTSRTE35 WKFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="uN9S/zIF"; 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 g203-20020a816bd4000000b002f51875172asi11831907ywc.403.2022.04.26.09.57.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:57:29 -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="uN9S/zIF"; 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]:41510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOVE-0002ab-L9 for patch@linaro.org; Tue, 26 Apr 2022 12:57:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5s-00035T-VE for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:21 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]:36620) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5m-0003sS-Qj for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:13 -0400 Received: by mail-pl1-x634.google.com with SMTP id q8so7558973plx.3 for ; Tue, 26 Apr 2022 09:31:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YT4PcROW/lGugJoLo5kIvKRZrra7WUrqQMozbJdZCxo=; b=uN9S/zIFGy5h1M7JIkNZhkueY7ZTPJSEAkrzpqH4u5u1XSDoc1snhdOlp6IMURIoCb 3htVey09e70WJ1h/0o25WY2es0EP2dQSjIVPvg5qWgtRSVbk3g/1SrNoDJvu+AiOnnk+ 8Y4IgfpTA2+zcPJT2jsq7yr0h3mDRHDLvsOeO29JH/9GU55Ou5M1kcn6pIWm4+yjMWFr L48f8kLz01QjXggBta7RsxUAtO83NAigJ4nfBenl2nMvdOTFDs3+zsx3O8+uRYqc2fct CoUqo43aI7vvaUeD704MGeR3jYWlVtvy+cXjaDoKnB45mCiceErOmh6H+suussVkl0CP 4WhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YT4PcROW/lGugJoLo5kIvKRZrra7WUrqQMozbJdZCxo=; b=5yznQcay1xfUQt/WpnmvFvKL5pQ1h4+4OJYNwV+DJ8GG+bH+G2jej4cC5atLI++HWL x3TJcjUNSEO9i1Y1B/jXNlr5HMG8d3IOnDJVz/ICkVy4PcpMXTjfP6OujDVfGyTwWJb6 30wtBccx8KSoO8xlHkEvq67+xJdqYXD9ZCukKr0N1f7qHFL8XF1Xcg17jQugW2YsrYBS zoLms/2I47z+hxpHL2RbLz0Se4DCXrRSnBm5Z2tZqdMrPzblPPKXzdwlK9D2fyGvpfpR u9nZ239dz6v8k04fJQU01VxP5LR7hSRU6EY7UyY9GYN0HForb1rWpUqsi9PLLQv3qmXD ITjA== X-Gm-Message-State: AOAM531CzCWt9igXMVT/6AP8VdKr09rohebEMqZ9tb3cfpF00p9eaHVP vsRzofTMty/6Fumvg9kj3wcAuF/7N9q4uQ== X-Received: by 2002:a17:902:7613:b0:158:faeb:a48e with SMTP id k19-20020a170902761300b00158faeba48emr23705462pll.140.1650990667876; Tue, 26 Apr 2022 09:31:07 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 24/47] target/arm: Use tcg_constant for gen_{msr,mrs} Date: Tue, 26 Apr 2022 09:30:20 -0700 Message-Id: <20220426163043.100432-25-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 501192ed55..2e4165be3d 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -2845,7 +2845,7 @@ static bool msr_banked_access_decode(DisasContext *s, int r, int sysm, int rn, tcg_gen_sextract_i32(tcg_el, tcg_el, ctz32(SCR_EEL2), 1); tcg_gen_addi_i32(tcg_el, tcg_el, 3); } else { - tcg_el = tcg_const_i32(3); + tcg_el = tcg_constant_i32(3); } gen_exception_el(s, EXCP_UDEF, syn_uncategorized(), tcg_el); @@ -2880,7 +2880,7 @@ undef: static void gen_msr_banked(DisasContext *s, int r, int sysm, int rn) { - TCGv_i32 tcg_reg, tcg_tgtmode, tcg_regno; + TCGv_i32 tcg_reg; int tgtmode = 0, regno = 0; if (!msr_banked_access_decode(s, r, sysm, rn, &tgtmode, ®no)) { @@ -2891,18 +2891,16 @@ static void gen_msr_banked(DisasContext *s, int r, int sysm, int rn) gen_set_condexec(s); gen_set_pc_im(s, s->pc_curr); tcg_reg = load_reg(s, rn); - tcg_tgtmode = tcg_const_i32(tgtmode); - tcg_regno = tcg_const_i32(regno); - gen_helper_msr_banked(cpu_env, tcg_reg, tcg_tgtmode, tcg_regno); - tcg_temp_free_i32(tcg_tgtmode); - tcg_temp_free_i32(tcg_regno); + gen_helper_msr_banked(cpu_env, tcg_reg, + tcg_constant_i32(tgtmode), + tcg_constant_i32(regno)); tcg_temp_free_i32(tcg_reg); s->base.is_jmp = DISAS_UPDATE_EXIT; } static void gen_mrs_banked(DisasContext *s, int r, int sysm, int rn) { - TCGv_i32 tcg_reg, tcg_tgtmode, tcg_regno; + TCGv_i32 tcg_reg; int tgtmode = 0, regno = 0; if (!msr_banked_access_decode(s, r, sysm, rn, &tgtmode, ®no)) { @@ -2913,11 +2911,9 @@ static void gen_mrs_banked(DisasContext *s, int r, int sysm, int rn) gen_set_condexec(s); gen_set_pc_im(s, s->pc_curr); tcg_reg = tcg_temp_new_i32(); - tcg_tgtmode = tcg_const_i32(tgtmode); - tcg_regno = tcg_const_i32(regno); - gen_helper_mrs_banked(tcg_reg, cpu_env, tcg_tgtmode, tcg_regno); - tcg_temp_free_i32(tcg_tgtmode); - tcg_temp_free_i32(tcg_regno); + gen_helper_mrs_banked(tcg_reg, cpu_env, + tcg_constant_i32(tgtmode), + tcg_constant_i32(regno)); store_reg(s, rn, tcg_reg); s->base.is_jmp = DISAS_UPDATE_EXIT; } From patchwork Tue Apr 26 16:30:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566040 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3765479map; Tue, 26 Apr 2022 09:53:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRjvrw++DPoRNpgO1soWLgv62vCAgFUl3wheNj25fA7Jcopo+pCvNJNuiHfeTQYPHeTWGU X-Received: by 2002:a05:6902:8b:b0:644:fa97:b5d with SMTP id h11-20020a056902008b00b00644fa970b5dmr22151060ybs.223.1650991993272; Tue, 26 Apr 2022 09:53:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991993; cv=none; d=google.com; s=arc-20160816; b=pUzv2sEa530FJMybaBe2nT5fARue7YxuVl8yqRqzr5Le7R9ZXu8q5Cpd9CUCMeHFmb ZmZLnriw62/NHy/OlVavMN4vekHN/m6Mr9QKrnqcGprwKI94mB56CC0whGxA1l2X2ITt O0fUsd94Tu7wN7WGzQ6YnCdBonGTqZ7a4+GSYkrZGjH3tbZvrP9wfqu6GHXpe6Y3bo7g SrY0HGvX9XEQd7bkFnBc3JWUD6IGEBdEKt44mVbs7MmHX9dHCKgOZ3j+f9W0n9KvwrR/ iaxa2sTnuWZeSHuzlnwA0UipmkrhE4aTpZei9VeSqZSFX6vYDJr66cqyPzcfAKVe3fA/ HVeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=Wz/sQ3opM+63UBKCObMqywBPZke4KVXsahzdcx00DUk=; b=pTUstQegmo6S5Vuiu1R31B9w/lr8b9PxhEazxwnfGlAWdsZDDvuhhJFYUvlSpTxo/t GH8Hs2BqQHj/kyZF5UillKeHouFlbObSVX5FT6Cjp5id9iagw9WbTwIevUrakXpCoWBh tvZS0+bwLUUljVvDrfmP3BSzVlyBgXSqm2By1K1dQ+jz2lW4zBwuun01ZQeKDX3VVsiC EgGLuBI0VcGh5K3zxg2H7VRwF6DCzSTY6fjfJeBb+TbQiE9KbiUCWkk9YjSXXi/ZOW/K ykOChfy2JVD+JblYJtqbzx2W6YfStwf/Lxe/x836WA4ecZQj9GTQgEJtke5nlaKxh8Wk 4VTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y9lEghH8; 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 62-20020a251641000000b00633994044cfsi14010575ybw.313.2022.04.26.09.53.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:53:13 -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=Y9lEghH8; 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]:32922 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOR6-00057F-NE for patch@linaro.org; Tue, 26 Apr 2022 12:53:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5t-00035a-6Z for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:21 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:43007) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5m-0003sx-RF for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:15 -0400 Received: by mail-pf1-x42c.google.com with SMTP id j17so18443072pfi.9 for ; Tue, 26 Apr 2022 09:31:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Wz/sQ3opM+63UBKCObMqywBPZke4KVXsahzdcx00DUk=; b=Y9lEghH8yifuMykg/i4TZSaD8tQWOqq6PSAVXLaLfaqfjKmhaQMlTdmzTbxv5nwEao nl3s40rkL2hZFJSPu+ji5EtzMb7cUfxkvTAXRm8io02wnNOdGYn/XBQG0ja22Wr5oJQu blqprpnz3g8A4aImSWl+3QyAg2ic/yErkmZUK8PmoOpwXk0kVc8E2Qg8kwr3ZEbtmtoN 2EbScE0ZttHOPaDS8/ztLumLkjLa+8ET5dF56v6QGPm+fPSrky+NsRH1TwHNjL4pU/Mm YygR1MeiA8gDhcerzbNE+Oa9NkpizT89Zxw3ZxASMUD9UAc040HtI4Z5ILIDINvrI13p 5PQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Wz/sQ3opM+63UBKCObMqywBPZke4KVXsahzdcx00DUk=; b=R2FIl95QYxfViFJ/+OKHWgU1aUfkW/zZhL0HVeARUsH09hrvPGo4c6jNcZpGwPR81N faqFNLEtD6reVYImVGFTRImluBL3tOjkcNTrWkXAOm5vI2b5O3jpoj8umvmFXj9pjaNk 3UkMRZTb8tmLnCyGaro0HMr6GcL8kRXWDCuWyxNFpAlUAhFL/7GVr4ITVaI/lZyJ4ToV 5Cy8sh6bQ51kO6U8DN5cacekLA6sJtkaz8gC9FyBqW1Re51Df04efRw6e8ZfNQ605hvM iNX68YOTBL1UFTddZUE6F4PEKg8QSZbsubQovSHgHdus3E4j6cwbc9gH2jQOgQjDZ+NX F1hA== X-Gm-Message-State: AOAM530xqvSs6IZwKqCm3kRsuF03+oibFOHU83sRW++g3tiCF4pLapYa cYJ8sPW5VTbISb7qc6zPFDwmMLn1T0kE9g== X-Received: by 2002:a63:cf0c:0:b0:380:fb66:fa2a with SMTP id j12-20020a63cf0c000000b00380fb66fa2amr20486873pgg.273.1650990668680; Tue, 26 Apr 2022 09:31:08 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 25/47] target/arm: Use tcg_constant for vector shift expanders Date: Tue, 26 Apr 2022 09:30:21 -0700 Message-Id: <20220426163043.100432-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 2e4165be3d..9539d2e8ca 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -2996,9 +2996,8 @@ void gen_gvec_sqrdmlsh_qc(unsigned vece, uint32_t rd_ofs, uint32_t rn_ofs, } \ static void gen_##NAME##0_vec(unsigned vece, TCGv_vec d, TCGv_vec a) \ { \ - TCGv_vec zero = tcg_const_zeros_vec_matching(d); \ + TCGv_vec zero = tcg_constant_vec_matching(d, vece, 0); \ tcg_gen_cmp_vec(COND, vece, d, a, zero); \ - tcg_temp_free_vec(zero); \ } \ void gen_gvec_##NAME##0(unsigned vece, uint32_t d, uint32_t m, \ uint32_t opr_sz, uint32_t max_sz) \ @@ -3988,8 +3987,8 @@ void gen_ushl_i32(TCGv_i32 dst, TCGv_i32 src, TCGv_i32 shift) TCGv_i32 rval = tcg_temp_new_i32(); TCGv_i32 lsh = tcg_temp_new_i32(); TCGv_i32 rsh = tcg_temp_new_i32(); - TCGv_i32 zero = tcg_const_i32(0); - TCGv_i32 max = tcg_const_i32(32); + TCGv_i32 zero = tcg_constant_i32(0); + TCGv_i32 max = tcg_constant_i32(32); /* * Rely on the TCG guarantee that out of range shifts produce @@ -4007,8 +4006,6 @@ void gen_ushl_i32(TCGv_i32 dst, TCGv_i32 src, TCGv_i32 shift) tcg_temp_free_i32(rval); tcg_temp_free_i32(lsh); tcg_temp_free_i32(rsh); - tcg_temp_free_i32(zero); - tcg_temp_free_i32(max); } void gen_ushl_i64(TCGv_i64 dst, TCGv_i64 src, TCGv_i64 shift) @@ -4017,8 +4014,8 @@ void gen_ushl_i64(TCGv_i64 dst, TCGv_i64 src, TCGv_i64 shift) TCGv_i64 rval = tcg_temp_new_i64(); TCGv_i64 lsh = tcg_temp_new_i64(); TCGv_i64 rsh = tcg_temp_new_i64(); - TCGv_i64 zero = tcg_const_i64(0); - TCGv_i64 max = tcg_const_i64(64); + TCGv_i64 zero = tcg_constant_i64(0); + TCGv_i64 max = tcg_constant_i64(64); /* * Rely on the TCG guarantee that out of range shifts produce @@ -4036,8 +4033,6 @@ void gen_ushl_i64(TCGv_i64 dst, TCGv_i64 src, TCGv_i64 shift) tcg_temp_free_i64(rval); tcg_temp_free_i64(lsh); tcg_temp_free_i64(rsh); - tcg_temp_free_i64(zero); - tcg_temp_free_i64(max); } static void gen_ushl_vec(unsigned vece, TCGv_vec dst, @@ -4132,8 +4127,8 @@ void gen_sshl_i32(TCGv_i32 dst, TCGv_i32 src, TCGv_i32 shift) TCGv_i32 rval = tcg_temp_new_i32(); TCGv_i32 lsh = tcg_temp_new_i32(); TCGv_i32 rsh = tcg_temp_new_i32(); - TCGv_i32 zero = tcg_const_i32(0); - TCGv_i32 max = tcg_const_i32(31); + TCGv_i32 zero = tcg_constant_i32(0); + TCGv_i32 max = tcg_constant_i32(31); /* * Rely on the TCG guarantee that out of range shifts produce @@ -4152,8 +4147,6 @@ void gen_sshl_i32(TCGv_i32 dst, TCGv_i32 src, TCGv_i32 shift) tcg_temp_free_i32(rval); tcg_temp_free_i32(lsh); tcg_temp_free_i32(rsh); - tcg_temp_free_i32(zero); - tcg_temp_free_i32(max); } void gen_sshl_i64(TCGv_i64 dst, TCGv_i64 src, TCGv_i64 shift) @@ -4162,8 +4155,8 @@ void gen_sshl_i64(TCGv_i64 dst, TCGv_i64 src, TCGv_i64 shift) TCGv_i64 rval = tcg_temp_new_i64(); TCGv_i64 lsh = tcg_temp_new_i64(); TCGv_i64 rsh = tcg_temp_new_i64(); - TCGv_i64 zero = tcg_const_i64(0); - TCGv_i64 max = tcg_const_i64(63); + TCGv_i64 zero = tcg_constant_i64(0); + TCGv_i64 max = tcg_constant_i64(63); /* * Rely on the TCG guarantee that out of range shifts produce @@ -4182,8 +4175,6 @@ void gen_sshl_i64(TCGv_i64 dst, TCGv_i64 src, TCGv_i64 shift) tcg_temp_free_i64(rval); tcg_temp_free_i64(lsh); tcg_temp_free_i64(rsh); - tcg_temp_free_i64(zero); - tcg_temp_free_i64(max); } static void gen_sshl_vec(unsigned vece, TCGv_vec dst, From patchwork Tue Apr 26 16:30:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566054 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3779283map; Tue, 26 Apr 2022 10:09:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvUIG69UgDpCZQyRFcjlIJr78/PVL8uT7u5gds+pKimtLIMjUGaZQlAhuX2PUd3o+dMaDT X-Received: by 2002:a25:5f42:0:b0:648:b4fe:993d with SMTP id h2-20020a255f42000000b00648b4fe993dmr2867928ybm.359.1650992971404; Tue, 26 Apr 2022 10:09:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650992971; cv=none; d=google.com; s=arc-20160816; b=r9WB/w4imIHkGnVuk7Z+90+lAgifXuychW9JnKJ3TyDEnPNDRJzV8kXhbf6topIlMm fqIYicx6d6LOvmZjCV0uW2V27Hoi7njMOEwXGmZnpH642y/LHSIrrBN9ewR9ZdGw7abH whpSnT0ACf/hutShhHki3zown2qu5GyD31uV3mBP3fplnnc7HMO/Dcv4CFroUVV5SRzr gqszXu3WwW8jcBq5Jc8rsnUL2JbUOIv9B58E3ikCudeSlMRUEUuIW7d87/VXjUfJpxwo Sscvsg3miO97lPmS9JKgDo1Cql9AaivwR18P6QC09hOCNp0alFHnAlMSF0+guiea7egg hgiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=uvLyVQbuChfsfEoCGl+dZ58evyiN/bZiVeu1vrYZOeg=; b=AI9Vyjj4LKEkOoj7D4zbRLDgKG5AI4+KR3Uvh/8Ebv9fKqZdq1WKDFvaWCeswZWhS9 6sqHc445ihl4PaGy23s7qkUq39Bic591E+rHa66YdMHIs11FqR1h5GJG8Kkd6azibc0F xxfI7LIfzYtPXykSQt0VK16PPb9U33VJMrSogW7Szpr1cvJ1B6pxrzL2nO7JnGcORSH8 nQuS9BFn3StoMUbuiQxNh+rD3gmsIUybzImZDBL+XWjuXgvsNZo0imIoQzN+8+SLshcJ a+PyJxfJAVAGaoDO5zjelKMWhQXBlghDmNQpql3wezjFlMV13X4xzk2gyH8ItjdsDVoA S8Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dOYKC2zt; 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 a186-20020a0df1c3000000b002eb451337c5si14043410ywf.283.2022.04.26.10.09.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 10:09:31 -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=dOYKC2zt; 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]:41970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOgs-0005M5-RE for patch@linaro.org; Tue, 26 Apr 2022 13:09:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5v-00036M-76 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:23 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:41659) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5m-0003tA-RX for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:18 -0400 Received: by mail-pj1-x102a.google.com with SMTP id z5-20020a17090a468500b001d2bc2743c4so3041375pjf.0 for ; Tue, 26 Apr 2022 09:31:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uvLyVQbuChfsfEoCGl+dZ58evyiN/bZiVeu1vrYZOeg=; b=dOYKC2ztJCmDPEVmIQl03djyFF6hrcJw3Rw+KDtxYsJuJ+PjTIyiCfGQZOn5MXv6Ba HPMCaD+l+d50Wa7N17F/ok0h4/RwCdLOjeVZ3AQOlkzwa+ns9HXJZZKnY5g+XOILPO8M cPx++gjlwPdjnkX67mnwmZwm5YepjXfwoX5ocrESlCz6yZtvhercVtKZI6rwCijwEjik +hN7LkMfdL3MLDU7acw9SpcYXmRxsYKpD13MM0zDNYLRg7jiLHz8SCFJv/qTxkan2aEr cZbXtbGepaos92LBixShTixt1TbuJn4HLAIXo/pTiNEw4wMlNZ9uqrNCkP4O9+Qny7yI /9jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uvLyVQbuChfsfEoCGl+dZ58evyiN/bZiVeu1vrYZOeg=; b=5CAC2Rwv8cYBzCCqPOOHP4VBbvKo1BA5zMMJTiG+smAoSn2XUtv2Mk1S0bN4ypTFpi tyPVAp71ecn9u37sX+MikxRza/YanSnY5iy2Kq9Vi5mj0PwRgl+TUKvlyucsgoFkY7dS UOz/geEn56bijYCH3SKqfffETOb981MMIWVumg3yZiXWY0W3RARWrRbwPTSJnUT/padw CppTFhtsgPJwJSYakeUecATRS06alO49OJCYSK/2rruWrH/DmBdNdMXq/VEqT8IB5CHq IFQuT5cj3T7RWQUEtKokEBh6BoYlYSZ03whr9iKXD3aIj1WVLf7rRa46J/iAFcFcUUyW dzsg== X-Gm-Message-State: AOAM531IU8BHtdQi2Po6ypWJo9RhGgX+fsKnoYFD+AGzvteH9JJD4aN8 KcOmHiQTQMMstp0OGiBvFLo2E+L0wxxMHw== X-Received: by 2002:a17:90b:3ec3:b0:1c7:24c4:e28f with SMTP id rm3-20020a17090b3ec300b001c724c4e28fmr39195181pjb.191.1650990669357; Tue, 26 Apr 2022 09:31:09 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 26/47] target/arm: Use tcg_constant for do_coproc_insn Date: Tue, 26 Apr 2022 09:30:22 -0700 Message-Id: <20220426163043.100432-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102a.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate.c | 43 +++++++++++++----------------------------- 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 9539d2e8ca..e4f3db26f6 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -4689,8 +4689,6 @@ static void do_coproc_insn(DisasContext *s, int cpnum, int is64, * Note that on XScale all cp0..c13 registers do an access check * call in order to handle c15_cpar. */ - TCGv_ptr tmpptr; - TCGv_i32 tcg_syn, tcg_isread; uint32_t syndrome; /* Note that since we are an implementation which takes an @@ -4733,14 +4731,10 @@ static void do_coproc_insn(DisasContext *s, int cpnum, int is64, gen_set_condexec(s); gen_set_pc_im(s, s->pc_curr); - tmpptr = tcg_const_ptr(ri); - tcg_syn = tcg_const_i32(syndrome); - tcg_isread = tcg_const_i32(isread); - gen_helper_access_check_cp_reg(cpu_env, tmpptr, tcg_syn, - tcg_isread); - tcg_temp_free_ptr(tmpptr); - tcg_temp_free_i32(tcg_syn); - tcg_temp_free_i32(tcg_isread); + gen_helper_access_check_cp_reg(cpu_env, + tcg_constant_ptr(ri), + tcg_constant_i32(syndrome), + tcg_constant_i32(isread)); } else if (ri->type & ARM_CP_RAISES_EXC) { /* * The readfn or writefn might raise an exception; @@ -4776,13 +4770,11 @@ static void do_coproc_insn(DisasContext *s, int cpnum, int is64, TCGv_i64 tmp64; TCGv_i32 tmp; if (ri->type & ARM_CP_CONST) { - tmp64 = tcg_const_i64(ri->resetvalue); + tmp64 = tcg_constant_i64(ri->resetvalue); } else if (ri->readfn) { - TCGv_ptr tmpptr; tmp64 = tcg_temp_new_i64(); - tmpptr = tcg_const_ptr(ri); - gen_helper_get_cp_reg64(tmp64, cpu_env, tmpptr); - tcg_temp_free_ptr(tmpptr); + gen_helper_get_cp_reg64(tmp64, cpu_env, + tcg_constant_ptr(ri)); } else { tmp64 = tcg_temp_new_i64(); tcg_gen_ld_i64(tmp64, cpu_env, ri->fieldoffset); @@ -4797,13 +4789,10 @@ static void do_coproc_insn(DisasContext *s, int cpnum, int is64, } else { TCGv_i32 tmp; if (ri->type & ARM_CP_CONST) { - tmp = tcg_const_i32(ri->resetvalue); + tmp = tcg_constant_i32(ri->resetvalue); } else if (ri->readfn) { - TCGv_ptr tmpptr; tmp = tcg_temp_new_i32(); - tmpptr = tcg_const_ptr(ri); - gen_helper_get_cp_reg(tmp, cpu_env, tmpptr); - tcg_temp_free_ptr(tmpptr); + gen_helper_get_cp_reg(tmp, cpu_env, tcg_constant_ptr(ri)); } else { tmp = load_cpu_offset(ri->fieldoffset); } @@ -4833,24 +4822,18 @@ static void do_coproc_insn(DisasContext *s, int cpnum, int is64, tcg_temp_free_i32(tmplo); tcg_temp_free_i32(tmphi); if (ri->writefn) { - TCGv_ptr tmpptr = tcg_const_ptr(ri); - gen_helper_set_cp_reg64(cpu_env, tmpptr, tmp64); - tcg_temp_free_ptr(tmpptr); + gen_helper_set_cp_reg64(cpu_env, tcg_constant_ptr(ri), + tmp64); } else { tcg_gen_st_i64(tmp64, cpu_env, ri->fieldoffset); } tcg_temp_free_i64(tmp64); } else { + TCGv_i32 tmp = load_reg(s, rt); if (ri->writefn) { - TCGv_i32 tmp; - TCGv_ptr tmpptr; - tmp = load_reg(s, rt); - tmpptr = tcg_const_ptr(ri); - gen_helper_set_cp_reg(cpu_env, tmpptr, tmp); - tcg_temp_free_ptr(tmpptr); + gen_helper_set_cp_reg(cpu_env, tcg_constant_ptr(ri), tmp); tcg_temp_free_i32(tmp); } else { - TCGv_i32 tmp = load_reg(s, rt); store_cpu_offset(tmp, ri->fieldoffset, 4); } } From patchwork Tue Apr 26 16:30:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566047 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3772787map; Tue, 26 Apr 2022 10:02:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy90CN2tG75ONmpZczR0BoF0PDEcfGHyzAQmFcUPa23cOVBOfZ9JlUbfZ+FprBV7KLe8zNz X-Received: by 2002:ab0:4ac1:0:b0:351:ed7d:e65c with SMTP id t1-20020ab04ac1000000b00351ed7de65cmr7755272uae.36.1650992550211; Tue, 26 Apr 2022 10:02:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650992550; cv=none; d=google.com; s=arc-20160816; b=X8J6VKs20/xSHs2OAApnc9LBzIuHsG29R09uTZq9b3v/exBkiyRFZxqxeifGZyn2DP Mk0Cf6lblUQKYi2/MFuR2umY2MO9v+6JRMGAO+KtaAoVufqFgXZlm1Z3UwzGNxvku1ur xPFqYzkTjnbXzl0ubnNgPDJwmSaJfX11vzkEsOYr6RbRkdWQGnjBIKfjyaEpndLOM64l /qdsX6nmCz6cp/KK1R+PXlXQyIWBh762ka0u8pzyXDfn8PyZCkM8DfGp0ee/uqWFGeGo 8WIpjunUUhONHc4FPa0JlbF+/VRlAwkJgvoCAhQCmTh3OwBu4LGzDb7KC5ppFw64OQIc r4Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=K818fpSFBQPvs73U35nRltr2XwiPqKbJCOKKmgfZ5DY=; b=HXxOuO6L5U5YLUP2MiHmTYCmTyuSS4Irz78nmgBh1pRzRncbeJCNsXEMbHsvULIkTi ca6E0Z9Ef3mALhzvsJ92OtTSZ2VK2RRhJEybvuVPFGCJQ0S1E7kb3pzGNQpNZ27iUgYj heKeyLeAP280SqoO16WnUYjk2/w21zVGHJ4Og4vdLP3NPNdQtpPtioLgZrBA5z/rXyXI +0kSgsTBHoPFo7ELFc97Eabr1f3TPUKOCjCKRAZMj0GLaZowlJRuvZrYitoFMzDCbOX4 F8LE+rhmUUYMqFqnaDgGQGdP0DGPQ13n+rQwrB+EkwUxj/y4L9/aMt324a14nUFxOKLH IyPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zeVBaYdk; 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 x184-20020a1f63c1000000b0034d74fc2d77si526478vkb.236.2022.04.26.10.02.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 10:02:30 -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=zeVBaYdk; 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]:51396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOa5-0000qZ-H7 for patch@linaro.org; Tue, 26 Apr 2022 13:02:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5t-00035f-7w for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:21 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:43802) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5n-0003tI-Vq for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:14 -0400 Received: by mail-pj1-x102a.google.com with SMTP id j8-20020a17090a060800b001cd4fb60dccso3005221pjj.2 for ; Tue, 26 Apr 2022 09:31:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=K818fpSFBQPvs73U35nRltr2XwiPqKbJCOKKmgfZ5DY=; b=zeVBaYdkqmSHyTZWafckHgewzYs4dW1cO5DUluw40Zsfzlv9UXeAJqbMgu/yA6jVhl QCY7TFi5lqL/akSgXQA+DiDxqbbzeWvjd0iyYznFVMm6GDX1JboJpyTV0v4fZ1O/tAm5 1vKZ911B1Zohfgh8psjBNYAFn973P76U0jwYecXAUIH6MsRoBGWAkAOs4yU1ZirzDsTT S0CnTgGCwjobpwVZ/d0HbMmAoLZemTAh5RTkTX27ySkSUOJjzhK1HoE1Gte16eDseWNN c3cHIkzoB8AfXji/lQTahJeEzStLO0WTrFiZn/+xORy4EvZxFvp9JGdWvUujYHOzz0bM FevQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=K818fpSFBQPvs73U35nRltr2XwiPqKbJCOKKmgfZ5DY=; b=QGAUpXfat4h+tFCjQla1MhuuO1V6Xp2gBhUcM+BOmH6Qs9EBhtBU/f239WW8UvfLri DGrDTFs4O3xfWNat7DaBA1ZqcHvD0sjrclrdmF/RUMReOXFhE5FyHSqyk9N2+Qf/GM6L orXD0zwXI0uBeXdL5pHJXaijzwOLcfLdBCgMEV5PTATtcvXOOFT7gGT8T5s1KgU/A31G AdKFiX89SgPF6CLFzPSjrAKgD/D0UeRPwAFjo9EkrVFe7oosrtOYqOVTPg73aoLtpakj izTu8Z6AQQ2mH+uLovcqVvTq/DCa0dYL8Q8nh/BrRGo/qmOtW09YU1hEuZpPNOuI/GeV JmqQ== X-Gm-Message-State: AOAM532mx0vL8epux5F+t+jFgX5BY21euZ73KPYmccYcjQNIMAa+aLFs Ri5tZDPOAmxcQGBTciF0/6o43A19ZVbDlA== X-Received: by 2002:a17:902:bf04:b0:149:c5a5:5323 with SMTP id bi4-20020a170902bf0400b00149c5a55323mr24490763plb.97.1650990670038; Tue, 26 Apr 2022 09:31:10 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 27/47] target/arm: Use tcg_constant for gen_srs Date: Tue, 26 Apr 2022 09:30:23 -0700 Message-Id: <20220426163043.100432-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102a.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index e4f3db26f6..8476f259fc 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -5137,12 +5137,10 @@ static void gen_srs(DisasContext *s, } addr = tcg_temp_new_i32(); - tmp = tcg_const_i32(mode); /* get_r13_banked() will raise an exception if called from System mode */ gen_set_condexec(s); gen_set_pc_im(s, s->pc_curr); - gen_helper_get_r13_banked(addr, cpu_env, tmp); - tcg_temp_free_i32(tmp); + gen_helper_get_r13_banked(addr, cpu_env, tcg_constant_i32(mode)); switch (amode) { case 0: /* DA */ offset = -4; @@ -5185,9 +5183,7 @@ static void gen_srs(DisasContext *s, abort(); } tcg_gen_addi_i32(addr, addr, offset); - tmp = tcg_const_i32(mode); - gen_helper_set_r13_banked(cpu_env, tmp, addr); - tcg_temp_free_i32(tmp); + gen_helper_set_r13_banked(cpu_env, tcg_constant_i32(mode), addr); } tcg_temp_free_i32(addr); s->base.is_jmp = DISAS_UPDATE_EXIT; From patchwork Tue Apr 26 16:30:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566045 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3769149map; Tue, 26 Apr 2022 09:58:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdKQsnIFdKchrkQe9GktimyxZKo4MqRf4MiglN6uV8x0tnAGebTf2osAad4oaaq646IElD X-Received: by 2002:a05:6902:1281:b0:648:c096:3efa with SMTP id i1-20020a056902128100b00648c0963efamr2088840ybu.548.1650992296239; Tue, 26 Apr 2022 09:58:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650992296; cv=none; d=google.com; s=arc-20160816; b=B0L+Dhm8yyQkRh51/KWPncHYZbRAIiTBgIpr4gJE23Y/vCD7+96LRdqq5yQPYnHtN0 bGo9MZd11UJhIhTkYVPXMsV+lTc0OPg6gvplxzKdlwUQ2d0kQmbcPKyC11YZnfJNr3IC et6s2Zwz/0Fk+Ht2x/q5FRtlDcWZfxx1yhXGq5iI6mw1/AOhb/l+jh0140ZUTaFvk46W VcjkmzeQuhjlbpc1A4yT6qQh1DBHNMPyVMP8eUWF5tLTnzpiE1SaMF7YSCBSHFS4YM3i 58p6s1n6dFB6UexczzrKMrTpyEUku4u+R/qR0/Sp1mupJ57cEecE4fLvvU/cyTCT6zs6 isLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=fMavBc3LF21tCnxOFcQlctg5X2JRkGnD8DmWT3QUZyQ=; b=prp8HqMydfyv/cZTeSnm5YDo6NR8TqbQNHKbDavHdoQP9FmWCVA5mey6jy7IsVLqNc td6zn9PkfgC8s29o83LDQ9zcnqosBVI5vNxg9fLlYiYXQJntKo3RIxqxzGBO4QniGu0S 6tLytlzsvkVgcDoIdkCuTaX++tavXZKAtRscNw+CEvNiP3ew9m8M2yMwJCsGJB0V+Rvs HK/SsxQ50+x1vU8TJI8FPSbAGmUqer2jBn9ePjHRgGJ0QAZcgdmGNV7eArYAR6dl5EqG Y9PaGMeXq4WT0T/zbp3pdGDz4j4oyx1HIOr+N+JhpK+EUHtLC7bG2XhO8hV1iACoeGH/ oC0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zLjTevTu; 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 u5-20020a814705000000b002f4e2b2c0a4si12253161ywa.97.2022.04.26.09.58.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:58:16 -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=zLjTevTu; 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]:44260 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOVz-0004QR-Ov for patch@linaro.org; Tue, 26 Apr 2022 12:58:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5t-00035V-46 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:21 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:41660) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5o-0003ti-1C for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:16 -0400 Received: by mail-pj1-x102b.google.com with SMTP id z5-20020a17090a468500b001d2bc2743c4so3041483pjf.0 for ; Tue, 26 Apr 2022 09:31:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fMavBc3LF21tCnxOFcQlctg5X2JRkGnD8DmWT3QUZyQ=; b=zLjTevTuMnYWbGWfGVz/nBpNq5yFNxWZVgnbOD1hlyp0pKY3BtAYRAH2A5AHt2Luj3 84yKibNnMFf4RCcUhPVeNjm04Ci4BJrHy4m7l056L4v82oX5YYHQgyDGknYYw82LPsEa Xxru9DKTuPB6/RuBiLjZDkQcI4pELyL1IUAIB+11o5EOIdIkQzigrv7nAKolQfW9+KcY MaBrNYUvB3l8qpBvD2au8dK1+KJv4xU2rEDTiq9IsV37OMh7CWYjZHErG9zmf8Qx96Hr UGHspLuWV0x5ic6OSbSLk+fJPt7TNTGbSRn8NZ4eVFyY2KDbcNfePwnljtpKHCZwDG4Y KpHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fMavBc3LF21tCnxOFcQlctg5X2JRkGnD8DmWT3QUZyQ=; b=WguwTXmQpRVF8EfGhMTULsjrqSIMhEw2wqO/3pNNPrVPVyrhTc6T8pYWcEru3lv1XL As8XFAGSU3a0QnNBUJlZsmpT8j7j7j3siT1QSoFFLq60biZcJ0pFJRZujZh/Rkmj4E5S +9a+Zyit+JYFbE8ORGLjfWyHRU5cgNjiJf5isUZ9fRimszCCY3NvVrOO+Q9h5goggrzc Zy/fxUwOIFE9oKNo+SwoFo/Ll69M1GtBHi5T9JIj8PZbfxytG01SEtUaIvRkKfXbNziO YjGusbbhq0vlrMZ3qQuBd60wYQPjtjlga2IiZwuz28sVIimgpimBIqfdjAZ/BWta79c2 T6aQ== X-Gm-Message-State: AOAM531Itl87o0Q2ug3JJgGkdFrfbUxaBPXmyEZiJDJggyFNbJHSnbuL X5xeJD4KiFg4nGV/tLfC8Ojte+uT/C47Zg== X-Received: by 2002:a17:90b:33c6:b0:1d7:b80e:7877 with SMTP id lk6-20020a17090b33c600b001d7b80e7877mr26982055pjb.121.1650990670728; Tue, 26 Apr 2022 09:31:10 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 28/47] target/arm: Use tcg_constant for op_s_{rri,rxi}_rot Date: Tue, 26 Apr 2022 09:30:24 -0700 Message-Id: <20220426163043.100432-29-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102b.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 8476f259fc..223fd5fdfe 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -5495,18 +5495,16 @@ static bool op_s_rri_rot(DisasContext *s, arg_s_rri_rot *a, void (*gen)(TCGv_i32, TCGv_i32, TCGv_i32), int logic_cc, StoreRegKind kind) { - TCGv_i32 tmp1, tmp2; + TCGv_i32 tmp1; uint32_t imm; imm = ror32(a->imm, a->rot); if (logic_cc && a->rot) { tcg_gen_movi_i32(cpu_CF, imm >> 31); } - tmp2 = tcg_const_i32(imm); tmp1 = load_reg(s, a->rn); - gen(tmp1, tmp1, tmp2); - tcg_temp_free_i32(tmp2); + gen(tmp1, tmp1, tcg_constant_i32(imm)); if (logic_cc) { gen_logic_CC(tmp1); @@ -5525,9 +5523,10 @@ static bool op_s_rxi_rot(DisasContext *s, arg_s_rri_rot *a, if (logic_cc && a->rot) { tcg_gen_movi_i32(cpu_CF, imm >> 31); } - tmp = tcg_const_i32(imm); - gen(tmp, tmp); + tmp = tcg_temp_new_i32(); + gen(tmp, tcg_constant_i32(imm)); + if (logic_cc) { gen_logic_CC(tmp); } From patchwork Tue Apr 26 16:30:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566049 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3774090map; Tue, 26 Apr 2022 10:03:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+Iz37LkGSqpkM0tOKTskkaCjMjWpgfN/i9QwvoHL5hIEQTbc+4uFQkbZtQhDGr3iVAG3u X-Received: by 2002:a81:7895:0:b0:2f1:6933:3b66 with SMTP id t143-20020a817895000000b002f169333b66mr22780687ywc.239.1650992622839; Tue, 26 Apr 2022 10:03:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650992622; cv=none; d=google.com; s=arc-20160816; b=U+Xtk8QCdvaLwy8u13Ddot+djP/tNRz0+X1DClyOe/jlH/U7/eXNJjx5B1PhWJnn5z s+18N7XkZpAG+7SwP2yUVtXX2dO1y+i2CFo3egDUVmhByv0sqJYE/FDO83baPhqjH7Fu 7TrAoCy0yA1ma1ys1TeDxp86Y60Kc1zETXaar1VWdVMcyjNNKqnnAWG44e5UpFKJi8GX FDZYpd7i6DMevtjfTSG6USy5tLmKRngSBROkYw8QCMwypk8I91gH1VTpnkE7I9zKI+1K LPUVMOOI3jZHte74R50WgRsoFoWILTCe7T39HBcMXy/5naqdeD7Ig/icKZmMqY1h1UZv W3oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=zqPxzsOVci11FTYqMcAeRTTX6WFeSM6vs3YcepVF8+s=; b=FRtGQn+YI0dCxbt9Hszi2BoSTfR5vmh/kMI6Fwyg7Ij8hlIZARqz9kHhdKUeiKFMN/ oNiRb5dXHfZIgeImDTjqtLY4GdQ5uvpyaGFgKX7+OkzxGeD1XCYGyB/JRMHDaAeWHPOg ruvg/oKAj2vKePhTsAMqGDggyFp0BvbDd+6Fr41hh5TB5i9TwLP1rY1QrKnaU0aWeIEO ypaZfr86rcNZwX2GtYbhwA1FsKLrkBATk9I7L7hAYv0yBrMkacLx9kFQlRL8yJ2dvyLZ aHtFKpEzJneJLUFndYVe4W4fzWla7T+YEPaCo2i7H3DyOkFcAL73JQL4Qm1D45veu0o6 VMew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hwj23mML; 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 c126-20020a0df384000000b002f1c8236238si14958107ywf.46.2022.04.26.10.03.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 10:03:42 -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=Hwj23mML; 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]:52916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njObG-0001wg-Ay for patch@linaro.org; Tue, 26 Apr 2022 13:03:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5u-00036A-8X for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:23 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:33425) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5o-0003u2-U4 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:17 -0400 Received: by mail-pl1-x631.google.com with SMTP id c23so30752179plo.0 for ; Tue, 26 Apr 2022 09:31:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zqPxzsOVci11FTYqMcAeRTTX6WFeSM6vs3YcepVF8+s=; b=Hwj23mMLdrr1U7OV2zrQ3m/mhiPlbnhQgcpGWBdssFfAmBRtM3M8f0jfITLT6W5uTj S/r0ePxzZQ97bEpyvPz4g8eSKrEMtgjfvzPNpiEq+81hSDVIj73CXPtcowir5lXSINQN t1Vu5IFzL3G27v2BsKpqJxYYxoMVVVVVdeNgqnYIc5vkJMZVdBl2pdBEvDDIzi3wXppb k4Km1r+w0mx6O0VMcmkCWkwiRR4x+KllHglWCjPS2KWogoe6P/6nIbg9hC5CIx4ZBZMh I3+mj7tvbgmNlTtTLoExLnl2xUrMMr4QCmtGZDbi4+b1AobQQGRRJPvA7UFtBfKkGhVj kXVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zqPxzsOVci11FTYqMcAeRTTX6WFeSM6vs3YcepVF8+s=; b=d2SML9Wz21vu4RDk1MMq6JrjhxlXPBT0lWQ6pij2nBRkszyZ7oAA8SRbj3/OglxAcB HEmewSIKHksPL5DSz8+6l8yBiu2ZScwZVY5ksZAfl0vvxDWEQWR/zeQssffa1PActfiA Lyod2psiOao5MVlrzt6ClRJMWRHFhdUSw8PleaUFXe9MAOTSJuMjcLEbQush6kHWGFOi y2JHpAddcpfvzZWslFNYhfFOj4FU1qa0q1kEnsoy+qNGzTuWhsG+QiT5EFbY8M5/mpAw LyvKt8dUZk+aiTWtsMSqDTh55xjXODikSgjezaOk2dorrs+2+08k9OoqYv75ziVSku+M FDDA== X-Gm-Message-State: AOAM531OjDtKSUbg3ApqksTqHDJc6uV+7KPOkBf2DB6DjmDuLO5aFP7z 7utGqlhzevp7L9oAitVmUzAdi5Sch2sV7A== X-Received: by 2002:a17:902:9b94:b0:156:2c08:14a5 with SMTP id y20-20020a1709029b9400b001562c0814a5mr23905606plp.60.1650990671653; Tue, 26 Apr 2022 09:31:11 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:11 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 29/47] target/arm: Use tcg_constant for MOVW, UMAAL, CRC32 Date: Tue, 26 Apr 2022 09:30:25 -0700 Message-Id: <20220426163043.100432-30-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 223fd5fdfe..cc540f2b47 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -5652,14 +5652,11 @@ static bool trans_ADR(DisasContext *s, arg_ri *a) static bool trans_MOVW(DisasContext *s, arg_MOVW *a) { - TCGv_i32 tmp; - if (!ENABLE_ARCH_6T2) { return false; } - tmp = tcg_const_i32(a->imm); - store_reg(s, a->rd, tmp); + store_reg(s, a->rd, tcg_constant_i32(a->imm)); return true; } @@ -6030,14 +6027,13 @@ static bool trans_UMAAL(DisasContext *s, arg_UMAAL *a) t0 = load_reg(s, a->rm); t1 = load_reg(s, a->rn); tcg_gen_mulu2_i32(t0, t1, t0, t1); - zero = tcg_const_i32(0); + zero = tcg_constant_i32(0); t2 = load_reg(s, a->ra); tcg_gen_add2_i32(t0, t1, t0, t1, t2, zero); tcg_temp_free_i32(t2); t2 = load_reg(s, a->rd); tcg_gen_add2_i32(t0, t1, t0, t1, t2, zero); tcg_temp_free_i32(t2); - tcg_temp_free_i32(zero); store_reg(s, a->ra, t0); store_reg(s, a->rd, t1); return true; @@ -6284,14 +6280,13 @@ static bool op_crc32(DisasContext *s, arg_rrr *a, bool c, MemOp sz) default: g_assert_not_reached(); } - t3 = tcg_const_i32(1 << sz); + t3 = tcg_constant_i32(1 << sz); if (c) { gen_helper_crc32c(t1, t1, t2, t3); } else { gen_helper_crc32(t1, t1, t2, t3); } tcg_temp_free_i32(t2); - tcg_temp_free_i32(t3); store_reg(s, a->rd, t1); return true; } From patchwork Tue Apr 26 16:30:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566051 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3776374map; Tue, 26 Apr 2022 10:06:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/Op8xmNR6kxhdhomHU51oQuSp9/Kvqh+8pBCDv/IQUZkGrOR3B16bIEOn73D720aZS/Pk X-Received: by 2002:a25:9b85:0:b0:63d:ad6c:aae8 with SMTP id v5-20020a259b85000000b0063dad6caae8mr20930653ybo.609.1650992766715; Tue, 26 Apr 2022 10:06:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650992766; cv=none; d=google.com; s=arc-20160816; b=P5uRZ1Mgmd0H4QpqqSJBbQw6FELV34oVbM0ahRzTkFN9YbTfHmZ3vhJh5U7ZBshB49 khyWYFZ4sNJe2wo/wz+3DQBlnfG3lrCPovIBprEedwzV0z7HmYzNRNmPv1NS4zrTY3N0 Bj6Ne9mkeoewGgUUVohYnMM7YB3uiVpy4VMSV3LJ1UVCS/FfzFWlu0OljaoKJbFmL5hk DWgNRQIQRbarUJALrbP+BuVdepydxw8CzdjxAk1pC8Y3SYoQvCj1je+GEGYzcj0MWw0v 1VMA1OZ0aYDD8bIHFPxJbY1x2O0HkiZSXeEPYSjEMLSFG+mGWwm0l+4gz/aPoHltML5J p3RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=0rp6VL6sGBeO43lHZ3pVwoan89wcSSiGWaAXpPEhCP4=; b=vCi/u2Fz1vM8iZ+Vw64BoSrCd0pbcGMvt8VJBtEspC4olwK6SnkcRxx9l76lE+++ZF bahVzxJgoOwapw5EsmSmYceU/vtGey6ZqIG6xClUMk22U2W29vUwzRkpWXmKg0ORa3jd PR/TH0l4RBTdjHTucwav/sIglEr19VqeoU3BlfhT415mVCMgC4Z9TsotwIWDNhRLO4Xu CW5kIfQJtPR3Uz2AfWtwBxU11oG3tT5xgTdKTSZE7wd7hEUrBgrWNZSfK6f4ormbvjzm /nz1TIkwEl+rUpn+ffbuG3nFsLtAvXsYC5FQj6J2Cx95dLHlfBQYl7mAG+PF9NiRge7S axfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oLpSw5Ie; 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 y128-20020a817d86000000b002f4e6054be9si11190686ywc.118.2022.04.26.10.06.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 10:06:06 -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=oLpSw5Ie; 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]:33478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOda-0007tw-5L for patch@linaro.org; Tue, 26 Apr 2022 13:06:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5v-00036Q-Bl for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:23 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]:44029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5s-0003uF-M3 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:19 -0400 Received: by mail-pl1-x62b.google.com with SMTP id d15so30708384pll.10 for ; Tue, 26 Apr 2022 09:31:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0rp6VL6sGBeO43lHZ3pVwoan89wcSSiGWaAXpPEhCP4=; b=oLpSw5Ie0WSnhvJ+WoiFheYwZj5N+sRohmSqMQOWGRsjJDvUMqJFdBXXn0pFduIPcb M2RL5exjy6PbYiKRjKjmYeJsLnnoKXspfiMId61ckh0botDw5MAtI6GDvEIlOrV3IHBO +0RDrUvJwZNye4nsvwpfABECuQHm9ZMJG2CH+gTW5NtdRF1RwPL6BYZvf4vItRbK9C8r e4+aQsTYhpV4E1t82sfYDDE3ARABRszb5VyML/QuXvaCsTwmZKj5vmIjG9T7aNaGNoMb XzAk3SAzq6ijEcFE7blFc0jlH0mbf/NnoRyb4osLunFs6okQ5dBDktqVyVTbjoYbRA3F 5JNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0rp6VL6sGBeO43lHZ3pVwoan89wcSSiGWaAXpPEhCP4=; b=cxh+Gdz49RvQhQYnBI9bHZ2Aq4da0PcbafpgCVFiBraiW+MWnnjqtZU7qdgJ3V436s OeFYp4ysocO8PA5x+Ok6+ArWNW1XLUOiOdxentH5JHRunVfLqfj33RWuxBcFcinbD+Is LH825TeWNA4d9HpKYbMOV4XY3Nb2GZricXRyJw12PUq02nYc8d6H2io6HtdkZ7I3Eblk /xcLsogHWcGnXDRxr2HfLfyiV0jg/J1pw8cVJIQ6z1loN4fl2elJg13pbHKC7pWxxJTL dH/TG/ZQHGC48l1nXv8O/aUAeZ4ELYxR0quNzVo7r2a+oLk8hmYimvZVn4gD+IbvUCwr tVbg== X-Gm-Message-State: AOAM530vNS2506DT4EBreXPx1FaU5iN1+fwWSa/9Nrr2rNWXkmOJOG00 O5vh0uUqmdZgRQlarqCJUrhJRsfvR9wEfg== X-Received: by 2002:a17:90b:3b46:b0:1d9:b14c:cc6d with SMTP id ot6-20020a17090b3b4600b001d9b14ccc6dmr4232600pjb.135.1650990672606; Tue, 26 Apr 2022 09:31:12 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 30/47] target/arm: Use tcg_constant for v7m MRS, MSR Date: Tue, 26 Apr 2022 09:30:26 -0700 Message-Id: <20220426163043.100432-31-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index cc540f2b47..b604a820c0 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -6369,8 +6369,8 @@ static bool trans_MRS_v7m(DisasContext *s, arg_MRS_v7m *a) if (!arm_dc_feature(s, ARM_FEATURE_M)) { return false; } - tmp = tcg_const_i32(a->sysm); - gen_helper_v7m_mrs(tmp, cpu_env, tmp); + tmp = tcg_temp_new_i32(); + gen_helper_v7m_mrs(tmp, cpu_env, tcg_constant_i32(a->sysm)); store_reg(s, a->rd, tmp); return true; } @@ -6382,10 +6382,9 @@ static bool trans_MSR_v7m(DisasContext *s, arg_MSR_v7m *a) if (!arm_dc_feature(s, ARM_FEATURE_M)) { return false; } - addr = tcg_const_i32((a->mask << 10) | a->sysm); + addr = tcg_constant_i32((a->mask << 10) | a->sysm); reg = load_reg(s, a->rn); gen_helper_v7m_msr(cpu_env, addr, reg); - tcg_temp_free_i32(addr); tcg_temp_free_i32(reg); /* If we wrote to CONTROL, the EL might have changed */ gen_rebuild_hflags(s, true); From patchwork Tue Apr 26 16:30:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566057 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3781552map; Tue, 26 Apr 2022 10:12:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0HeBDjiwQ1EIHQ9f1+pigoTOim9pUt1BI8uGE+69M4Iyv1vIW7/gEYy+eVpMGlZgPEPhr X-Received: by 2002:a25:9845:0:b0:628:99a6:55ed with SMTP id k5-20020a259845000000b0062899a655edmr21572782ybo.221.1650993135148; Tue, 26 Apr 2022 10:12:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650993135; cv=none; d=google.com; s=arc-20160816; b=xwSvxPGGzED0lZgw/6Ui3JwATp7aCOkKyNIWXYGK/lfeuku+S0dKudrv4EuYUyGtn4 JhW+7sS5pb3Tc56hL0a2EeRwH5Ep9UO/6R3RGJoOML4lN9g3DZr91XnIjK3SwEEqArY7 pKILdS4n4mF3pDGcWKDVOTFKIhsOT1H2pIoBVBMkHsw59ES9TZZJzMK6icjlXhlmQUsE 9sfMCUiHOaeF7nDGD7M/aGq0qDSDuYasKIaimupR6NMQTI+qPJND25owpfHWxRC4VWdo 5ZKUhl7GeQCiRNOe1na9O237ZLFNCYhAapcNx5voQtX5m578YHKv/qgSZKHfUPbr+CVo s6XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=YpVs0/2D2cp0hUUGtxDD8k8vZGg2jdZBOZb+I5K1m6k=; b=uGiEPCla8eiFI1/LwCRbGiPKSUk3XaKAq/MqHMwKmuWwa+ZptgMGiNVUhFXLFPBgMI Iy9JTgxOiodFuXw2EwBfOeJzN9wmKJrYh0wrpIqEei9+B2X1e1hwxzqhKAq96XIagCGb CNBlvK4gqQWxim6aevqQiz/MfL5Lfz6uNhKKsu/fsfspkKSIMkBvsQlpTEw6tmqvg2NY 1cxMkf2Y9lcVlBneXZqHZeu9/0nnH3JXYzXWo4OqFxZZ2ya5L7xLFzTVyRmy8veA1VEw M84tr9DVxBueQkSxxwNYAMe8WtWj/ewrCm8onsKMujYJ/Ufgx7B3E+jiHOAB4qN3zuXs xQ9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jB0PpkXV; 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 s63-20020a815e42000000b002ef21e2e4edsi15413245ywb.205.2022.04.26.10.12.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 10:12:15 -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=jB0PpkXV; 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]:51488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOjW-0003Wq-K6 for patch@linaro.org; Tue, 26 Apr 2022 13:12:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5z-00039H-Mz for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:27 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:33018) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5t-0003uQ-L7 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:20 -0400 Received: by mail-pj1-x102b.google.com with SMTP id cu23-20020a17090afa9700b001d98d8e53b7so2308268pjb.0 for ; Tue, 26 Apr 2022 09:31:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YpVs0/2D2cp0hUUGtxDD8k8vZGg2jdZBOZb+I5K1m6k=; b=jB0PpkXVDcFxRznSedfvgGZQIOEZ8l5W9TfuJgkltcOVu44+0DDGnwnHqOCMffWBpC I/gFzzD/G0Pk9jLDA0bbJIQVOhpG2NgkOuOLSgyEFLp3HmlXRnIcC3rq8evOEiww+CLF z598SFi1H3th36EmHMLZ5zDdP5w8XnCTPKLJNMj8QJmuny8wgQkNe8IWExfhvSnu6Ipr Mi23yiFsabWmVbO8jNbkHyqG3XPEd1nFVjmPuEOS97XYRJV0qeiUAgHNvzOMa6BPwBCX VayifpSJCCQ/ZC0T7AcfLM9AW+MA4YOjKDanhf57elLPz0SfuI7nVofuxy1Xj5Q/VxQ9 6SrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YpVs0/2D2cp0hUUGtxDD8k8vZGg2jdZBOZb+I5K1m6k=; b=trfb8cG+M2+QshUsYppDUuWEIhM5CgPOqNqZFIuT1PERGB28WwY28o4wPAfrr6hJRu 7sNGILFG6S5ui/k8t1P5eU7nHAfQoRyxwiBfVP4BSRDy2AjyiS30kKfAcZpDa7xM27j+ QIDVxZdixYqPkZYaDwauvB3IrnqlZioKJ6QHE/tDRVQZLRgRK/v5zv0ba6yUq6ZvGiJ2 QwSh1kp+yoATiXESVa4TpIS7TF6/19Z3xpoDCOF/MoT0V640oXw8EV1R/ae4bRTRU8mt lqV53hU0bq4AyvDdQo5TUq5jara3kth3DDdcsnVYgk2Sz59iBpENBWAZhqBo9B9VikfW jtEw== X-Gm-Message-State: AOAM530oDN+z+N3AlrApXrefNtwP151l04pWZCR5Up3UHYCLyR4JUc6j taqF7FI+YDtJg1zpUx6Yk3DezvlVJQrcuA== X-Received: by 2002:a17:90b:4c46:b0:1d9:f9e1:254 with SMTP id np6-20020a17090b4c4600b001d9f9e10254mr1634983pjb.24.1650990673596; Tue, 26 Apr 2022 09:31:13 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 31/47] target/arm: Use tcg_constant for TT, SAT, SMMLA Date: Tue, 26 Apr 2022 09:30:27 -0700 Message-Id: <20220426163043.100432-32-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102b.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index b604a820c0..24e522e1d6 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -6596,8 +6596,8 @@ static bool trans_TT(DisasContext *s, arg_TT *a) } addr = load_reg(s, a->rn); - tmp = tcg_const_i32((a->A << 1) | a->T); - gen_helper_v7m_tt(tmp, cpu_env, addr, tmp); + tmp = tcg_temp_new_i32(); + gen_helper_v7m_tt(tmp, cpu_env, addr, tcg_constant_i32((a->A << 1) | a->T)); tcg_temp_free_i32(addr); store_reg(s, a->rd, tmp); return true; @@ -7564,7 +7564,7 @@ static bool trans_PKH(DisasContext *s, arg_PKH *a) static bool op_sat(DisasContext *s, arg_sat *a, void (*gen)(TCGv_i32, TCGv_env, TCGv_i32, TCGv_i32)) { - TCGv_i32 tmp, satimm; + TCGv_i32 tmp; int shift = a->imm; if (!ENABLE_ARCH_6) { @@ -7578,9 +7578,7 @@ static bool op_sat(DisasContext *s, arg_sat *a, tcg_gen_shli_i32(tmp, tmp, shift); } - satimm = tcg_const_i32(a->satimm); - gen(tmp, cpu_env, tmp, satimm); - tcg_temp_free_i32(satimm); + gen(tmp, cpu_env, tmp, tcg_constant_i32(a->satimm)); store_reg(s, a->rd, tmp); return true; @@ -7915,9 +7913,7 @@ static bool op_smmla(DisasContext *s, arg_rrrr *a, bool round, bool sub) * a non-zero multiplicand lowpart, and the correct result * lowpart for rounding. */ - TCGv_i32 zero = tcg_const_i32(0); - tcg_gen_sub2_i32(t2, t1, zero, t3, t2, t1); - tcg_temp_free_i32(zero); + tcg_gen_sub2_i32(t2, t1, tcg_constant_i32(0), t3, t2, t1); } else { tcg_gen_add_i32(t1, t1, t3); } From patchwork Tue Apr 26 16:30:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566039 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3765450map; Tue, 26 Apr 2022 09:53:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz32+qgz2hTZrjrX//s/ncIbuwlirKjN4MTvK1qjUwy4GY7nfdcjr7d1woywfWD1PdlRaYM X-Received: by 2002:a25:e0c4:0:b0:648:75aa:2b6e with SMTP id x187-20020a25e0c4000000b0064875aa2b6emr8633072ybg.468.1650991991315; Tue, 26 Apr 2022 09:53:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991991; cv=none; d=google.com; s=arc-20160816; b=lF8WBCkL47cMcBqupqhqI6l9jotFY3VMSEF+3aaMFhF+LKfXt1YNSRd3CJ3cvQh8BS RXGyOyOzDPAZdBmm7vc0eFwqo1fjn0G2tP5BfjB//CFqTN9E9jGJhJ2UnjjNmRaJGKcM SlwQ25QxToxU1eeeK1VpcdYJSmINpscsrR4VSlt93OCGullzFkNSxJOQJhpqAQQuKOco /NO41l+Fzeeq3H3k2gDpF8Us/bpyGHR0tHVVQNhTjEQgX00FH3wfgWfPe4woEM1QD12L 4RdkmEKVm1JMEhifxiZia6rQgqTtjdXiVtiowGcluFr+BJI9C025nkQAQaaVKe44TfpM kM5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=j8ZzQJaFsLEhBqWaL0qX7yYVNAnc01NjxlTahTgdBew=; b=YyB4dhnHONF0VMFdZ6324Fa35mLdCO46Xmnb08DLelf4SqXwP1556wTu6KdUvrqYIF X0IAnqYH7GJSQBJfgTiWlzIDLIRjTU404kwSACLtuYsJIuYQc+0FTeTzNv2rjQbH1W3I rl5xVG+5vKasXRQcI0BsLdDRzWsgEdGh5GGe3YUzuY7yW3p0eyqX1niemqegjYnp4BoJ /wslx/SogjDxKL7c+WxPs1B78szDsaKGd/bO69QYiD/EqmxL7jEls7QTyhfLdEzzAsmY ZnwVCovFcU3XMmTe0Zhd7R2wmXy6iFHusZUm3l0Pd83RVZvs2X88C3yy8n4fSbla72Oo 8a6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WoLXpdwG; 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 f5-20020a253805000000b00648a43987f1si2674352yba.400.2022.04.26.09.53.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:53:11 -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=WoLXpdwG; 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]:60928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOR4-0004xp-Oc for patch@linaro.org; Tue, 26 Apr 2022 12:53:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5v-00036N-92 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:23 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:44924) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5s-0003ud-K0 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:18 -0400 Received: by mail-pl1-x632.google.com with SMTP id j8so30704656pll.11 for ; Tue, 26 Apr 2022 09:31:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=j8ZzQJaFsLEhBqWaL0qX7yYVNAnc01NjxlTahTgdBew=; b=WoLXpdwGRb2nL1ysk4INTaM1lP8ndGyl7aus2HzolylQSxLcjOn56VXsRKsb6Km87Q l0lqiSWhdld+5pQN0efcEaLIo0Nw3UuKP03spBrZc+NtSp+WS5OeRYy5pfSZJ5+Fatp7 Y+30BuRMLRJ2LuKdI6cWxevBhCB1ONqvNO4MApaxIOUsZluKOdLugOMbaDw7+m6cQw2m JMFqpt7cmT1QNj5EeW+lb6ub/kRVr2B8zAheDzu2p4r14gVkYxjb6FpayQYtPTOj/s07 dQOl0WBqgLneEdWEE/gsyQj+KqxD0dgSFfWqPfYYEGeA8v96st/YBcK89gWMarvMQx/L R3KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=j8ZzQJaFsLEhBqWaL0qX7yYVNAnc01NjxlTahTgdBew=; b=biSipIrursEfIz5Kt7OVLnpAHgDp2Yvk+CoXEdU9YR03c7oqkH1/hRnIDHrMlxR7Ru pLYaAgkIQWCZjaAg6YoPYQpRMIbWI256KpwS4i2MA04GtkRCg1bHSEq4rQMOgPZtAoc9 NukzuLL3Fc8QWde+K19BbUSdmmajhzzS8D/wutgCEIvbB7ltiMRqa1kMoDf7de4rEeN3 mxUN0nWnQe3uvYMWXOlMND7NyVZDmWmOmR9pEA/HA0rhUsoHd9xuHOFmzK462QgdvNzo w1Smb7amfH85ZVAKtJvqg7HCupsu+v1A6c6jKlGcve/1gAQg9vbAg7yiUH0X1NojkpNo ay9g== X-Gm-Message-State: AOAM532ROtQJJpnMIcF8Gf9vc89bKUWqy+mE2UajIUDtxuAhlLMmB+9+ uT+beozxE13ckAq7Gpsv11Xje1WfMdDFxA== X-Received: by 2002:a17:90a:ba15:b0:1c6:7873:b192 with SMTP id s21-20020a17090aba1500b001c67873b192mr27873659pjr.76.1650990674784; Tue, 26 Apr 2022 09:31:14 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 32/47] target/arm: Use tcg_constant in LDM, STM Date: Tue, 26 Apr 2022 09:30:28 -0700 Message-Id: <20220426163043.100432-33-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x632.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 24e522e1d6..e0469da0a1 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -8050,7 +8050,7 @@ static bool op_stm(DisasContext *s, arg_ldst_block *a, int min_n) { int i, j, n, list, mem_idx; bool user = a->u; - TCGv_i32 addr, tmp, tmp2; + TCGv_i32 addr, tmp; if (user) { /* STM (user) */ @@ -8080,9 +8080,7 @@ static bool op_stm(DisasContext *s, arg_ldst_block *a, int min_n) if (user && i != 15) { tmp = tcg_temp_new_i32(); - tmp2 = tcg_const_i32(i); - gen_helper_get_user_reg(tmp, cpu_env, tmp2); - tcg_temp_free_i32(tmp2); + gen_helper_get_user_reg(tmp, cpu_env, tcg_constant_i32(i)); } else { tmp = load_reg(s, i); } @@ -8123,7 +8121,7 @@ static bool do_ldm(DisasContext *s, arg_ldst_block *a, int min_n) bool loaded_base; bool user = a->u; bool exc_return = false; - TCGv_i32 addr, tmp, tmp2, loaded_var; + TCGv_i32 addr, tmp, loaded_var; if (user) { /* LDM (user), LDM (exception return) */ @@ -8166,9 +8164,7 @@ static bool do_ldm(DisasContext *s, arg_ldst_block *a, int min_n) tmp = tcg_temp_new_i32(); gen_aa32_ld_i32(s, tmp, addr, mem_idx, MO_UL | MO_ALIGN); if (user) { - tmp2 = tcg_const_i32(i); - gen_helper_set_user_reg(cpu_env, tmp2, tmp); - tcg_temp_free_i32(tmp2); + gen_helper_set_user_reg(cpu_env, tcg_constant_i32(i), tmp); tcg_temp_free_i32(tmp); } else if (i == a->rn) { loaded_var = tmp; From patchwork Tue Apr 26 16:30:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566055 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3779622map; Tue, 26 Apr 2022 10:09:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2CqtnH8TI/tqRh2lbiA2Qjo0BLnDr/1Xxd2RPS6ZcUENgBKe9rnmzRUplifATTP2VHuBO X-Received: by 2002:a0d:d491:0:b0:2ef:5485:fca with SMTP id w139-20020a0dd491000000b002ef54850fcamr23168859ywd.16.1650992993852; Tue, 26 Apr 2022 10:09:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650992993; cv=none; d=google.com; s=arc-20160816; b=Ec3D7RkRS8R1lAqMBvn4bRXls3pPbTuDmiJq9jaysWDndw2HoYce+griQcMEF2oEpC LRhgFZqcoqdVYqVcIxlEwIH8oXywxpsuJLRHh5GbqrD5xGngtUW9Fc2yl8/pm60GZhuS swnNWHcb1aOX1YIJsp6tzg4S1hdn9gyR5bC16GA8IZA0KMlEpH5+PXuZ+OGtjVmRHgZv Y7G0jPTm/QHFo8LO4ql+QXu/7LDXY6LqvGIc+gg7/hblL3MNKZ6eG+5VqkUIr9z5EGew o9ySSdX7phXOqqpOnb15/mRz0F5GfGAknSREpXKxYCP1A2Kr7P8v6nzm9mfUnStpTsOX EP4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=RL/cU2KUkEBT0HxlomYcXgHotXYUZUNOdsb4bQKVOHY=; b=Cnl+EpEZlBexmlIWwid5sDeui6bPnBPrg9/ayVoKbXfUYk2i1PW788jeBNlbxndmIK 5lOSwddCVbulZQ7zvdi3NKwAIlq4CrknkYP4JqzdNsKZ7miXZs97zy8RuxS8PZ6DAO/d PNMsJQ9H6AkDflkoPYJmTxhBRbWqSPBRkk3rwRvnDG5Egcr0S61AZe54Ip8T3QJj1qyg jHVLHhCvhpnST1+c6R3GOIh4/E5RprHzCE1S9WQ43/01gvce0Hc7Wgpogcu1p86K5j7/ wBQGV2t8t7MYY6XyD3vQnWC9ybAuQuKnRyKbn/Ywh2YKIS9Jex+DDoi1pltLXW5VUrho 4IhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J7CfEZwA; 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 a128-20020a251a86000000b00646e4677f11si9170245yba.357.2022.04.26.10.09.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 10:09:53 -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=J7CfEZwA; 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]:43954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOhF-0006kP-7W for patch@linaro.org; Tue, 26 Apr 2022 13:09:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45978) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5z-00039M-N1 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:27 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:39926) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5t-0003ur-L2 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:20 -0400 Received: by mail-pl1-x632.google.com with SMTP id c12so30706765plr.6 for ; Tue, 26 Apr 2022 09:31:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RL/cU2KUkEBT0HxlomYcXgHotXYUZUNOdsb4bQKVOHY=; b=J7CfEZwAfA1qRCxGxFPfcN1NZtL9btEfZ2Lnu1hHgQwVtF0GZ7r3nifDPBTDaghS6E 6BDAEwpuhkFuHvAYpohxLWirUwlRf9HdEulHacnbhz8LEtm0BuZvwZFJgPjga2d50N3R cp1SDJU4NvdqZ/YytvYXW1G7ExqF3e0dsHrH4bQ6c0VSrs9n84V1keajMvCZnSmPvYqv I8gD1V8SiFQ7tXqY8K1NaWZOnAfHCwM1XEB81tt8yMOcW/rv1hGDDSqQFXchWrE7BRTw 0buXLuFTrcqprYtKS5i58N/Z/NxdoPm2kmpkHyILautjCPQ2EQtRJBj3gVPnvlWLedtF otaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RL/cU2KUkEBT0HxlomYcXgHotXYUZUNOdsb4bQKVOHY=; b=zNb2O1qaCZEpKB0OelVRFCoIn2UUTHZjQqT85GFLYFXw9b6SlPj3Xp2QlvS1XujY1/ uuOaROW0zvIZS3sY4vOsUWJbHHEHGI/jEZ5zsl1PYxl6gVencyLOogN5ilwaXH+/UiWm 6pK1TUqupkDxte6BxtbqVLIFgEsrxYHih++H3kYnp0h27PC8tYFHPGNEokvKf7e67gUu de0L5Gcv6kP6klXO/C4SEGqA9AmAqZ4Pl8wCVWVxSVMk+3JziLyRazZKF3mW0AqtzdXz QqE33/v9vDX/ElbIrGGubTyb8AGl2tB2fkaiM41H0hDPjyUCk+q8hs54W0LP/8bs6KT3 mWlw== X-Gm-Message-State: AOAM532UYQO6npJpd3VL/F9LvRxtyFByTLOAh6xxXSDJTCAtjDhHR0iz ohZEM/ujUfeMQPSzzIhfsxLjTgMCvaTGwg== X-Received: by 2002:a17:90a:e008:b0:1d9:2f9a:b7f1 with SMTP id u8-20020a17090ae00800b001d92f9ab7f1mr20018882pjy.173.1650990675787; Tue, 26 Apr 2022 09:31:15 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:15 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 33/47] target/arm: Use tcg_constant in CLRM, DLS, WLS, LE Date: Tue, 26 Apr 2022 09:30:29 -0700 Message-Id: <20220426163043.100432-34-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x632.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index e0469da0a1..0e9fde2589 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -8257,7 +8257,7 @@ static bool trans_CLRM(DisasContext *s, arg_CLRM *a) s->eci_handled = true; - zero = tcg_const_i32(0); + zero = tcg_constant_i32(0); for (i = 0; i < 15; i++) { if (extract32(a->list, i, 1)) { /* Clear R[i] */ @@ -8269,11 +8269,8 @@ static bool trans_CLRM(DisasContext *s, arg_CLRM *a) * Clear APSR (by calling the MSR helper with the same argument * as for "MSR APSR_nzcvqg, Rn": mask = 0b1100, SYSM=0) */ - TCGv_i32 maskreg = tcg_const_i32(0xc << 8); - gen_helper_v7m_msr(cpu_env, maskreg, zero); - tcg_temp_free_i32(maskreg); + gen_helper_v7m_msr(cpu_env, tcg_constant_i32(0xc00), zero); } - tcg_temp_free_i32(zero); clear_eci_state(s); return true; } @@ -8416,8 +8413,7 @@ static bool trans_DLS(DisasContext *s, arg_DLS *a) store_reg(s, 14, tmp); if (a->size != 4) { /* DLSTP: set FPSCR.LTPSIZE */ - tmp = tcg_const_i32(a->size); - store_cpu_field(tmp, v7m.ltpsize); + store_cpu_field(tcg_constant_i32(a->size), v7m.ltpsize); s->base.is_jmp = DISAS_UPDATE_NOCHAIN; } return true; @@ -8482,8 +8478,7 @@ static bool trans_WLS(DisasContext *s, arg_WLS *a) */ bool ok = vfp_access_check(s); assert(ok); - tmp = tcg_const_i32(a->size); - store_cpu_field(tmp, v7m.ltpsize); + store_cpu_field(tcg_constant_i32(a->size), v7m.ltpsize); /* * LTPSIZE updated, but MVE_NO_PRED will always be the same thing (0) * when we take this upcoming exit from this TB, so gen_jmp_tb() is OK. @@ -8609,8 +8604,7 @@ static bool trans_LE(DisasContext *s, arg_LE *a) gen_set_label(loopend); if (a->tp) { /* Exits from tail-pred loops must reset LTPSIZE to 4 */ - tmp = tcg_const_i32(4); - store_cpu_field(tmp, v7m.ltpsize); + store_cpu_field(tcg_constant_i32(4), v7m.ltpsize); } /* End TB, continuing to following insn */ gen_jmp_tb(s, s->base.pc_next, 1); From patchwork Tue Apr 26 16:30:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566052 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3776538map; Tue, 26 Apr 2022 10:06:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMoJrZysMrCKGMhu8yCIf85YPT2/jbAqT8ka+C2S3mXOSOlBSD0zRXpbTX2emhCNMiBfeo X-Received: by 2002:a0d:db4a:0:b0:2f8:3968:e808 with SMTP id d71-20020a0ddb4a000000b002f83968e808mr540758ywe.455.1650992777640; Tue, 26 Apr 2022 10:06:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650992777; cv=none; d=google.com; s=arc-20160816; b=DaLtbSCgWKNcAZ1TavyQfj3in0E/Iy3lyi/i8filAFITPRg3O0yGvf0FQUwIy4efGD gn7Idn8LjX1n4BXBKFJqtDAVxg7+CtLjm3n/OOSmn8qqelbsb2Z7rfk9SXkn4mifosgj dsJpPayQrwRQ5lVwpRPb+tcmmjBTUDq/abbqmZ0PytQgu+cGiMo/77IgYqCy/ywokNHw 4v4+Wz2PQcKCVXmfxTZTr82e+450c5DmBrUydTlL/bnmWLZwLEEvAMAN+Di7DUDmK9cn /jduudFk6IvGYOS6Ml7JUX4rwsNPvGQNl2KFNCSdmXM9slBpJxwuco9fyLkyzyuPDDQm lzJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=BDYfwx12Hon85ohkvO8cwx1aoDQ7rAnJ54ZLVVZwl+0=; b=SJtFrsaxI/VS0MWmuBTs7+91AIEFSczDyhoMrA/XEWYJRtm/zgqa8DzeBsLIL5QY4/ 3W18bWJ4w7X9VwSBLr/Und1QLyd85l/j6hdbJAPLNTAkOIxCjYqoKeRvyMA/UeoKA5Dn KrXU0ZSoDpHuVE9BQh1Q/VVONDgRp7+GyQWiuKvsoVnhYh+2vhgdStI8AI015JOcoQ/r c3WwfjlzGZK89dHwlR40bNiVY4Z9D3Qrvdf8DYBhc3fnKQZGpDyWnr1gQiicel/6o3an dPbyK4niBTyk9VhfvCTfMaHEdPzLOCSyeOSTvuRfrHtTR1WFS2PIlwEs6w/X36lsfsYP Phig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HRx2VKmI; 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 bu8-20020a056902090800b00648bad20463si1633785ybb.181.2022.04.26.10.06.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 10:06:17 -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=HRx2VKmI; 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]:34410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOdl-0000BV-2l for patch@linaro.org; Tue, 26 Apr 2022 13:06:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5z-00039S-PV for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:27 -0400 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]:54952) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5t-0003vm-TZ for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:20 -0400 Received: by mail-pj1-x1029.google.com with SMTP id fv2so3562903pjb.4 for ; Tue, 26 Apr 2022 09:31:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BDYfwx12Hon85ohkvO8cwx1aoDQ7rAnJ54ZLVVZwl+0=; b=HRx2VKmIkPk2haiJ37rUwuafLa+S2E1m3fpfnhQQbYdc9KRyj2MXf1EFq4IxNwBE+r sSUdQf07Y7DHLQcb9cEeXVR3qZLURfsVOvJjP8HqGl/l+3kqbf7EnYWr7xDUm3cbqDjp jCN8qRl112l+j+IhiAxHhqLJaNQrhhwQxDhwGxsPUjCHLbbP/iczz9oAQgOX05ve4Ayu V+bMo7/xsQF9Qa/UB1nDbnKZu73qJeLTmpdeT0bEEowbUaSEOTwBRWeIhyrsjEGULu+b 43pd90wgXgQdaM08Uxso1KFB2UaRxmGQZZBmPW9wsG30g7Gd/T4plG7XV4KsEO5wEaDE z4Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BDYfwx12Hon85ohkvO8cwx1aoDQ7rAnJ54ZLVVZwl+0=; b=0DzxICFPD9R5OLGDWjrHbnBXiiFruCwJuD1dVLamQyvw0FXThE9NTlfl46Q9g6sjIK L5op6ehiDrRdKlhe40u5olPZpNwZjK6eESouMJqwpR948zR35mHK8lEVFWEW6plIsO5l yEXUb3uu6h79WOQw66DRN1lEzbFWCALyjAHE6VTG1ADnLwFziGxXDr5gsA3TtftpkL9V Ow+/24sX4t7GfknsVdTEaLTuLokgh1/oqszJFXMQCTrZK7KRxnEnPXai4eLYZoQ7I/a+ eo8E4YjHCSN9aEs+Qm1PdMwZ7ru+DSn9zciayj++8hdFAmiS1kO+7oU9YjS11agmt51p UjUQ== X-Gm-Message-State: AOAM531Z+p9ddV02g5tYg+NFlrt8vaOlAgP7KCbpYlHOCp4EZ/Mz410W GVHvYYmuKJZbmv/rPOZJkNIPG8GNuTAv9g== X-Received: by 2002:a17:90b:2685:b0:1cb:6521:dd78 with SMTP id pl5-20020a17090b268500b001cb6521dd78mr27971623pjb.194.1650990676484; Tue, 26 Apr 2022 09:31:16 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 34/47] target/arm: Use tcg_constant in trans_CPS_v7m Date: Tue, 26 Apr 2022 09:30:30 -0700 Message-Id: <20220426163043.100432-35-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1029.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 0e9fde2589..5ce23947a1 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -8835,21 +8835,18 @@ static bool trans_CPS_v7m(DisasContext *s, arg_CPS_v7m *a) return true; } - tmp = tcg_const_i32(a->im); + tmp = tcg_constant_i32(a->im); /* FAULTMASK */ if (a->F) { - addr = tcg_const_i32(19); + addr = tcg_constant_i32(19); gen_helper_v7m_msr(cpu_env, addr, tmp); - tcg_temp_free_i32(addr); } /* PRIMASK */ if (a->I) { - addr = tcg_const_i32(16); + addr = tcg_constant_i32(16); gen_helper_v7m_msr(cpu_env, addr, tmp); - tcg_temp_free_i32(addr); } gen_rebuild_hflags(s, false); - tcg_temp_free_i32(tmp); gen_lookup_tb(s); return true; } From patchwork Tue Apr 26 16:30:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566038 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3764285map; Tue, 26 Apr 2022 09:51:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEasWo6D74YG2IW0EPCrlRRekNy21UDpiTFFhKj58Uc2giLyvMtgEAcgL3wCFHWoDhcxdL X-Received: by 2002:a81:16cf:0:b0:2f7:cc18:7bd1 with SMTP id 198-20020a8116cf000000b002f7cc187bd1mr15414869yww.155.1650991891108; Tue, 26 Apr 2022 09:51:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991891; cv=none; d=google.com; s=arc-20160816; b=LcCHZeBmHr5g8ChtqL/bR9kQb0H5M8mIvTqGo46isW2CT/kDQXvbtVcCtAyNPOFwvk zw0+QSmrT0UfqH7nJsdvz23aDExCJ5ZMlenAHR8iB9K9Ggt34L3hfWvmMVtsMSrGb3jS 7oKk546bTBoV807lI/iJ2vt5IaY/HqMMzPhQujKRBGTHJcwAgqTyuAMBwUQ+e9CIBR4E POHY9vRMQyn7NhsXa1es4o7cFKj6qJVXTBJDjQUrK9GWNqyCDtwMTukLYOFNeOswL+lF 2ZnFKCxCHIKQ3MGKn8fQf1176W/EAcalth6JKSv+8W81THADY3JhC6BcuO9LiKGlrGz5 ul5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=fsC1JB/EB4F9x89YRYFuXT3L+skbijf1weu2wToVj8c=; b=nsJ2YR5cpZnFozTLrOfjqNe4zlwxUOJpDgfnIPmzyoKI8kh6VEyGVzv2Gtn6YJLtqi Y2HibZ9jL2UrCHSilgeI5je5ZaxuvGv2wT5DX4A1KYNi4QzwHAtRMswXBJFDZS0Yk2+H 8+JrHejSJ4JxrgHYD0WLjv0k5kTZfUXRMAHG2Zi8DXg6C1lXKPVPtgLprsNrQhbOskxn fbE+cqcuSEyrD68yPdbuDmROwybVniZqwa4ZkjRH8rPQ5ZLoS0rf4v4ZKTRN3DTxDQHd PFtpGSaUrkC1LWyJn2ym+sEC6u/hL5us6BNHqHRAbc73vRkYLEyZy2u55QZZhnGPsj+D E/zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eCwWzpvv; 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 d124-20020a251d82000000b00636d0972247si14887536ybd.11.2022.04.26.09.51.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:51:31 -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=eCwWzpvv; 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]:53298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOPS-0008B1-IK for patch@linaro.org; Tue, 26 Apr 2022 12:51:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5z-00039O-PP for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:27 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:47076) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5u-0003wM-TD for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:21 -0400 Received: by mail-pl1-x636.google.com with SMTP id u7so15374783plg.13 for ; Tue, 26 Apr 2022 09:31:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fsC1JB/EB4F9x89YRYFuXT3L+skbijf1weu2wToVj8c=; b=eCwWzpvv/B3fxSGIJ0R5K46fZLWQpFGtYtTtEjo0Fp/k5tht3LIyOWtpCVPTo+08O7 nXB4d0Jq7EQToBM5ra9S3MfPw7jom/dPjd4EhmV//jsZpsa7jBit6T6VQHaYHkOFIgP/ c+ZBfjCdYJNlFjy6cU9eCWxjHf1kahO+9Eb4dAzOWrzZ+uz3Bqk6hQGPcVp+fUVFjHjD An9xcSEDEkXcVWfOotvULLnLZz9qwqDrwRVilF9Yu9kEGjssxmlQE1FT8hsnzVNx6a4u P6cdT2hKI40pbnDnA4NLYf0NkfvnnvK7ARrfdFqaTYEg5S1iAixiu7YfwnK71IfVhx3B FgWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fsC1JB/EB4F9x89YRYFuXT3L+skbijf1weu2wToVj8c=; b=XxqRrposKxNvTizej7iYoEByNq1ZRaK1zUQMHj7P33Rbw4gL6bVDpcng0L8gmmW71Q 3ZxSkYqZ8WPyk80938Se+NZHV4UMWhV/o7KGZ9n2qhvRdaGHrBiIfOEPE6FBkipgjrLJ 7czREMGTq9odfXb4XhdctOpaDI1Gc0WY6TQoDYdQlDIqxpVtOXEXxH7diHgAttmgjEQZ /IAb1n7ueUPHfuyF2oP3Jt9dzFGsWwfwPtzijiLgO+jIsKDrbqBEPjuudlKYdTDGJGtn kiDyTKRD3Viyyd+TouiKMLh0RxLPSfBJ+HXfvnnpQIgSiUD5inf16/mLYQGdROlrsxN6 qGww== X-Gm-Message-State: AOAM530OACXNVgnVLZUJTxQYgLwjtGLzQWYD0Lv5pQZ2c9+PHI0ucVs4 MtN9/yY8NY6scxIZczkDQfXPdtGzipj1PA== X-Received: by 2002:a17:90b:1e10:b0:1d9:a68a:144f with SMTP id pg16-20020a17090b1e1000b001d9a68a144fmr5834890pjb.17.1650990677440; Tue, 26 Apr 2022 09:31:17 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 35/47] target/arm: Use tcg_constant in trans_CSEL Date: Tue, 26 Apr 2022 09:30:31 -0700 Message-Id: <20220426163043.100432-36-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 5ce23947a1..37fb17cdaa 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -8982,13 +8982,14 @@ static bool trans_CSEL(DisasContext *s, arg_CSEL *a) } /* In this insn input reg fields of 0b1111 mean "zero", not "PC" */ + zero = tcg_constant_i32(0); if (a->rn == 15) { - rn = tcg_const_i32(0); + rn = zero; } else { rn = load_reg(s, a->rn); } if (a->rm == 15) { - rm = tcg_const_i32(0); + rm = zero; } else { rm = load_reg(s, a->rm); } @@ -9010,10 +9011,8 @@ static bool trans_CSEL(DisasContext *s, arg_CSEL *a) } arm_test_cc(&c, a->fcond); - zero = tcg_const_i32(0); tcg_gen_movcond_i32(c.cond, rn, c.value, zero, rn, rm); arm_free_cc(&c); - tcg_temp_free_i32(zero); store_reg(s, a->rd, rn); tcg_temp_free_i32(rm); From patchwork Tue Apr 26 16:30:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566044 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3768715map; Tue, 26 Apr 2022 09:57:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6InPKJuPE8gPJP/WZZvMkg0Bf7YJeGL8Pp12LfVYmethi5vjvyhiXNaGvvnd2utCG0Bg4 X-Received: by 2002:a05:6902:72f:b0:63d:6201:fa73 with SMTP id l15-20020a056902072f00b0063d6201fa73mr7750163ybt.55.1650992254662; Tue, 26 Apr 2022 09:57:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650992254; cv=none; d=google.com; s=arc-20160816; b=OQySCRipDmbuuwRIZU2N5VIANxyKtGKM0r8I+vD75Z5rZjIps1kfTFG6/HuflI+NQw 61p2LTNWM4w4dTEtjzJ9rIl8LoXQXXWge71HnKKOx3aTWmgLGw+TmIRUHdma8HS+LH2A lT4dFsa9bk8O12ws4PNldDQFWiT4eXME3Xdniu457qRhbJBP5oOVF4RjYmz6L12aONcP YQF3rQJW26uiUixRwdMnIqajRtm0v2a/+NvEnUklu+6B3/OW4ovPB9PmP/G9M2132W85 REiJ4WnWL3LJ+3UgtvlmZKbqAArnuUQUCrdqBKTK0gTEksyfI3Q0vsDeEo/gUAsc0/eb hIgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=oLlyLVXV3hG+hIKKTiKR7bDdeXt4IImhA6gWDdbySgc=; b=XkANGmWsO43luLSCYageQrE3olGjJKsf8yMVZT57RZOrBbi9oWAPAQvYAyMlgLU/qm WwgNlTlJnPg6gZcaECcufoU5YaP+IsFnzk6e/SpUq4IXtZE0OtEpH6vTmv2ImPJ2FXdr 9iPHIx9yCNjQC8TJqUO0GwSPz2HscrQjjQI9y4+sUUxYZTCLvzCCFWoqWD6LySAKuXq+ d9I5NTpnKM9ERUwSGLCHFvrymToByI+h0+OnCdGqAu6lfbbgaDKZjFVGvghLapcAJmqe +k8zmlObcuqozTDNVFeD0f17bN0smF3UaFYgEUpN5gcSva1NpAngsg6jrOPR9i3yPUDQ zkKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UG2GBCIU; 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 c200-20020a811cd1000000b002f7da306757si5837505ywc.130.2022.04.26.09.57.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:57:34 -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=UG2GBCIU; 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]:42074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOVK-0002x6-7T for patch@linaro.org; Tue, 26 Apr 2022 12:57:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO62-0003B4-1W for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:39 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:36619) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5z-0003wm-4L for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:24 -0400 Received: by mail-pl1-x632.google.com with SMTP id q8so7559462plx.3 for ; Tue, 26 Apr 2022 09:31:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oLlyLVXV3hG+hIKKTiKR7bDdeXt4IImhA6gWDdbySgc=; b=UG2GBCIUB0iOzPtNQI9aXk2829MfXxjHiH14eY+0wNWq3R0wYKnfWWVPw28Lxb0bZF DINUy2Ev/OuR9dmfP/5KnOEE7kIRHipbYwLCIyGqrqn0g1ujz+t1wkJo1SCfIhp0IgT2 9TAEHnaBikTHCTh3UUvY7RIF7cn7w6OLIzV0YqhoTnHavUg/Rgz8G5ZCegH4aPHPlDG6 0V95Jhh94tFkf7pZKqX+I68/roWPy1ejw8pgdNXAFdIkVO4+tLTtuRtQ//77EjO8/JRH uOfSOrfoG+M6mvHePhlAP6NnYIjO+2QieEThY8pZVfOn44K8hgu7kgnfewByMQzpFW1l 6U4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oLlyLVXV3hG+hIKKTiKR7bDdeXt4IImhA6gWDdbySgc=; b=tt4HBic8y5y5/ILKzxmS5UxtBT3Rtgn9dZXM2JjCNa1RwqgPtyRiBhLSk9EA4gZ7tg 6iKxJBri6TRvUiELsic7hXxmKneC1BqkNlarqhd83ea6qRt6Gj9tzrzs6h3CCOpvfi8u tpEyoCeWhn8rfhjGeykaEHLfhzi5bNLKXdEi+7z1w8dJ5n4BzSPA8yPqBGi3d/WJJrR8 jS54qZ8W99aUYpe9NUcoipJ3fZYti3+Fql75O8l/uDfYo0opuYSVZ0e1lZK/PQzIDWM9 vPBlXvhQ39lO9bMXCvtNNwmfHLyjz1UERmCsejh0ThQ2iccolRc9NejrQsFhQ958/REs 1DuQ== X-Gm-Message-State: AOAM533pjBO+DWpdCZzaEsteVKkdp3QmnEr9S8W+s+eKjtdV9n18iqEN Pktp4UkkTgim7wb54tHTUXgq8CuqlfOrWA== X-Received: by 2002:a17:90b:688:b0:1d9:9ddd:1f71 with SMTP id m8-20020a17090b068800b001d99ddd1f71mr7845936pjz.207.1650990678413; Tue, 26 Apr 2022 09:31:18 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 36/47] target/arm: Use tcg_constant for trans_INDEX_* Date: Tue, 26 Apr 2022 09:30:32 -0700 Message-Id: <20220426163043.100432-37-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x632.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-sve.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 726cf88d7c..8b173f5c4a 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -1266,11 +1266,9 @@ static void do_index(DisasContext *s, int esz, int rd, static bool trans_INDEX_ii(DisasContext *s, arg_INDEX_ii *a) { if (sve_access_check(s)) { - TCGv_i64 start = tcg_const_i64(a->imm1); - TCGv_i64 incr = tcg_const_i64(a->imm2); + TCGv_i64 start = tcg_constant_i64(a->imm1); + TCGv_i64 incr = tcg_constant_i64(a->imm2); do_index(s, a->esz, a->rd, start, incr); - tcg_temp_free_i64(start); - tcg_temp_free_i64(incr); } return true; } @@ -1278,10 +1276,9 @@ static bool trans_INDEX_ii(DisasContext *s, arg_INDEX_ii *a) static bool trans_INDEX_ir(DisasContext *s, arg_INDEX_ir *a) { if (sve_access_check(s)) { - TCGv_i64 start = tcg_const_i64(a->imm); + TCGv_i64 start = tcg_constant_i64(a->imm); TCGv_i64 incr = cpu_reg(s, a->rm); do_index(s, a->esz, a->rd, start, incr); - tcg_temp_free_i64(start); } return true; } @@ -1290,9 +1287,8 @@ static bool trans_INDEX_ri(DisasContext *s, arg_INDEX_ri *a) { if (sve_access_check(s)) { TCGv_i64 start = cpu_reg(s, a->rn); - TCGv_i64 incr = tcg_const_i64(a->imm); + TCGv_i64 incr = tcg_constant_i64(a->imm); do_index(s, a->esz, a->rd, start, incr); - tcg_temp_free_i64(incr); } return true; } From patchwork Tue Apr 26 16:30:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566059 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3784913map; Tue, 26 Apr 2022 10:16:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv/bRADeTHf5X8ouBX9QJEYM7TMu5mTq4Szd0w4TRuaDQBFXv3MUquQhYEyMVIAEHUilsM X-Received: by 2002:a25:dc53:0:b0:645:db08:d242 with SMTP id y80-20020a25dc53000000b00645db08d242mr17540330ybe.56.1650993387364; Tue, 26 Apr 2022 10:16:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650993387; cv=none; d=google.com; s=arc-20160816; b=Jic9+sY3bhgAwP0Sq0QyFi4s/BtkNnBRzW8C4k622N2x0BJMXJFTr2eptcjbOSjvJ/ 9yarZSJ9CvxJJ9O/nlR4C+pa/yxl0ACH1YJJf5oj8yUZp10W563jqGx6G1nU4uo+mlv+ Cu3d2MD+cMZDu3KJYzikNkfpqEmyRcpYjojKwIbFJ9SNXkZcqVdeJBVANeeVOSiDDcxr UX5xZ6GUqixXXJW+aptmb2bB9t1x32dljZezmzosBe+i9yYoLywVdWtEQWlNQIMFxHWy a+k+w0oGQmnZWe6nh5dWWzimc75BRmnZHrA69QjER9/Y8dHBY4tZ7dg2hexViZp7NUCW 2RIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=lbs3KJK7K3c2itFwMrF6zlwFkUuhQKPhP0rTJMiuIOk=; b=iqK8f+pyvgn4YSIv/VVCdZVia+y54tJ75liniFGqWqkg8JhrbISsmwsNL5Whgi1P2u Zd3FDBnCvztLUHrXtBGfykK/aT+PSHYvWMpRs8n0sJVKFkOD7zPTn2nXKNFkvm1j2w/t DcaWf+ckW94zw51MSnGtNHiVBEpDiy+3NkPTzqI2NZC9XN0dnhaAGldbs3/6AJUFI/c3 Xi2iknaG9LzUtNNaGegFGj8VFEpmDhT1qnSFPu2jxuaO4sYVx59NZJ+tJ75DE31hFtr4 2P0L101jwQYQ1jI6z61WTJp7trlIZG14KvJi6JXctB6VFTpy5Ny4DcL+Eq7fcxgz0kwu 5/QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Rma344yO; 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 r188-20020a2544c5000000b006416ada0e6bsi14030246yba.299.2022.04.26.10.16.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 10:16:27 -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=Rma344yO; 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]:60924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOna-0001mn-SX for patch@linaro.org; Tue, 26 Apr 2022 13:16:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO63-0003BG-AE for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:39 -0400 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]:39564) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5z-0003yM-64 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:26 -0400 Received: by mail-pg1-x52a.google.com with SMTP id i62so4321944pgd.6 for ; Tue, 26 Apr 2022 09:31:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lbs3KJK7K3c2itFwMrF6zlwFkUuhQKPhP0rTJMiuIOk=; b=Rma344yO0AWoZRqmX1snpseo0Dj3xLhpKcDEcV7812Z9WuQxH8OpfqKYsXs2HYnmbL A1zvRuTqbl/KqpUlAtF2iQD5z0zDfWFH6e4O6zLBEG48OTXLfDcvD+SSDmDsObUBEgQj xe3WMwHdx4/BPki0xxfMRVDftXIXquje9w/o4QMUBtZWDJq0n0TORQ11zbhFh5PrTrYE aUqcahEaC+YOgJwZqDlODT0z1BFHZZkY2wly6beOuu+P7oqmHS+Z4H1kT+8bgmviTRlC WtaD7I9tDQCYJ/t5/kDCo4DMl2UHbQCMzsbv1rrU0WX2RyYXN8zvkduoH8WJTKiGGv2B TdSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lbs3KJK7K3c2itFwMrF6zlwFkUuhQKPhP0rTJMiuIOk=; b=B9e4KU7lAFPuto6PVerpxePq3HsIzmYFrB8bMRJvs9eK/LJMzLEDpCRkgfIBLfA8xd 7QPmiibvclz+F5Vc4/tbxrDGfNwq3qKTOnpA8fROgxdPq4myf8qHkHsvvjQ8UQhrV6az gLPuDwBON1wi0xzedJw8N6D5xXq9d0ptyqyrYl9e8ugi/D7C70S/YDxdq3GVSUpcnCqv OBko6AFTEFNnYjQ29E26lmrOmxdqYsQ/KaKgVvui8oq7sGY2e5sirwZM73UookJCsJad lrc/OkU7bF9phinWHMq/WZ8mOMZATQ0B13jCWYqK+AmL7BZlYwAntq9qrwXfoR1HLu6T Z2Pw== X-Gm-Message-State: AOAM530E+IjETPCs+7ACxQKndVgx/EEY8TaJhF690cMwfBXctH9DB2Y1 YOjSpOisJNjKJQKN4pBf99jQtJKJ+3dEYw== X-Received: by 2002:a05:6a00:198c:b0:505:c18b:3184 with SMTP id d12-20020a056a00198c00b00505c18b3184mr24929206pfl.82.1650990679444; Tue, 26 Apr 2022 09:31:19 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:18 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 37/47] target/arm: Use tcg_constant in SINCDEC, INCDEC Date: Tue, 26 Apr 2022 09:30:33 -0700 Message-Id: <20220426163043.100432-38-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52a.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-sve.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 8b173f5c4a..9321457f31 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2103,9 +2103,7 @@ static bool trans_SINCDEC_r_32(DisasContext *s, arg_incdec_cnt *a) tcg_gen_ext32s_i64(reg, reg); } } else { - TCGv_i64 t = tcg_const_i64(inc); - do_sat_addsub_32(reg, t, a->u, a->d); - tcg_temp_free_i64(t); + do_sat_addsub_32(reg, tcg_constant_i64(inc), a->u, a->d); } return true; } @@ -2122,9 +2120,7 @@ static bool trans_SINCDEC_r_64(DisasContext *s, arg_incdec_cnt *a) TCGv_i64 reg = cpu_reg(s, a->rd); if (inc != 0) { - TCGv_i64 t = tcg_const_i64(inc); - do_sat_addsub_64(reg, t, a->u, a->d); - tcg_temp_free_i64(t); + do_sat_addsub_64(reg, tcg_constant_i64(inc), a->u, a->d); } return true; } @@ -2141,11 +2137,10 @@ static bool trans_INCDEC_v(DisasContext *s, arg_incdec2_cnt *a) if (inc != 0) { if (sve_access_check(s)) { - TCGv_i64 t = tcg_const_i64(a->d ? -inc : inc); tcg_gen_gvec_adds(a->esz, vec_full_reg_offset(s, a->rd), vec_full_reg_offset(s, a->rn), - t, fullsz, fullsz); - tcg_temp_free_i64(t); + tcg_constant_i64(a->d ? -inc : inc), + fullsz, fullsz); } } else { do_mov_z(s, a->rd, a->rn); @@ -2165,9 +2160,8 @@ static bool trans_SINCDEC_v(DisasContext *s, arg_incdec2_cnt *a) if (inc != 0) { if (sve_access_check(s)) { - TCGv_i64 t = tcg_const_i64(inc); - do_sat_addsub_vec(s, a->esz, a->rd, a->rn, t, a->u, a->d); - tcg_temp_free_i64(t); + do_sat_addsub_vec(s, a->esz, a->rd, a->rn, + tcg_constant_i64(inc), a->u, a->d); } } else { do_mov_z(s, a->rd, a->rn); From patchwork Tue Apr 26 16:30:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566046 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3772677map; Tue, 26 Apr 2022 10:02:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx98InzWO4jHqa+Bif/d9kLLlpU56Ps2ID/flM4wuVIbeW3T/VOu27t96/KiuXS5yxnKvjP X-Received: by 2002:a05:6902:8c:b0:631:ef56:6694 with SMTP id h12-20020a056902008c00b00631ef566694mr21547783ybs.194.1650992543601; Tue, 26 Apr 2022 10:02:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650992543; cv=none; d=google.com; s=arc-20160816; b=IKWp+qzV9mRkU/dfkfDIfrdRDlLKsmu2oRkLpRnwsTuDd0FnplkCe4MuxJESCGJSS9 l6AfaYHAWJVRy5NoGQd8i1cmJIqgI24D8JTwZPWq8SlWz4hXzXMwbVArsST0uPc7LkBg 8qCMuGW29C4VkA1drEWdkkRJBaIKC+4jrGg7K2C3vNJI7b9DSzqDjqh71WiOrWIzLMkj Kd1oeKYREa8EiYfEqWa4DeYWn0OmEj44Rzmtgk8nARYpkjxMlep486g9PhLKXD5AE30O SdV1/sIxJUuNVYlGdAmkF8bWdL3nMYBiz67lt88mh3dSEBZ8h9q/mFkqkxZ5dd6Vn0g2 pvjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=ACpxH01JxErVg11OMtWk96IeWBCSCK3eCBc3FiBtZOg=; b=reRQlvUBHmQPJWzd8NgWItuW9PCk+LvoVmOFE1X1rypvU8xHHeWLFOgx78bVEdm86X fw0E7DoJqBq3kY1ULbviAsFrIU5AG5CUro0LxaDRlc4DhZzPi0HxI3LC3GgcrRrAHZUq Tgbqe79PI5z1lvxf60ls7xHttAV3fnfngiR2cP0rYHwSCC1w5CtA7TO3Wi/cc8Uwlb1w 4128p9gA3xRZa0o05BYksoAhObk3lIcc+Sk/4YcqhFe23Dwq+kCtMt+cgK9WxkDsnuLT Ds1Wq8wna1dBapKCe80OPP8rkG3c+eY5yT6fLqY4t3vlrC19c5UkAUUfDDxOcG39UQb6 clvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=paXVMvY+; 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 s67-20020a0dd046000000b002ef38638be6si13553457ywd.479.2022.04.26.10.02.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 10:02:23 -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=paXVMvY+; 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]:50642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOZz-0000KP-2i for patch@linaro.org; Tue, 26 Apr 2022 13:02:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO63-0003BH-AI for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:39 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:41763) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5z-0003yZ-5g for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:26 -0400 Received: by mail-pf1-x432.google.com with SMTP id p8so18434665pfh.8 for ; Tue, 26 Apr 2022 09:31:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ACpxH01JxErVg11OMtWk96IeWBCSCK3eCBc3FiBtZOg=; b=paXVMvY+rYx8L28mBZA3hCozX+y65yxDNrgzppj/PxLZsGHreW9hQG1aDGXryyvPTJ dq3NgPFVmscDmcME4WRifbaSFlFoIZtMXypp2NWokWlj/HnrYld3BX69FREo5pVG8etK X1jZpArmOTh3189OszJWdnnxarQB8QV8/tFhDUC97+cSj5vwC/H2i7Qcbhr9CFdtdkub 20MQyxQ6+pJqwaY3/0NfvAdO1czrglFUKi0bJjWQ+5QAW0KOhYHTXBB2Xqai0KZ8NH+U Iw2PZl6CC+ueXSEaOByLmfNOc8TK8jkN8d/Lyfy05BPunUV6zltTPAKRnyigNXPRFlTU 4D2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ACpxH01JxErVg11OMtWk96IeWBCSCK3eCBc3FiBtZOg=; b=mvdcmuWismHyOJBRfUu6/oW6kDMeqrp/mVe+oKIrzpXXNb8O3eX7M11Vh3NT63mB19 gv2ZWAtJMoeo83z7t1jiAYz+GmScY55B/H7NyA8ExSpUXZDIKI832pehb6Ec+jRs4tQS WwwNE5NUdxoHwRWuIDM49A9CcVp2MzJPnq+8JFOnnNc1Ubr7q20FnCy3pDVQT9rR15Wc Gz2bH82eFXbCHidgeBRjF9IghW6sf/+2XvRbEVaaEidcgP2nKu7fAC5AoqSJ+2fAAiGh mv/lb2shl5GZN6a0mHTTg1drmBH4qaBGln0dzGsGtlv2dk+NhbDjo5ZvNYSzcD9ALVAr hzcg== X-Gm-Message-State: AOAM5312PrOSNHg3TQJCylghmiw37y8gUSUfys0qHqEkMr501ztOiVuC cRKKANC5eVutgkA/A+/ch8aOOHs/MLXMZg== X-Received: by 2002:aa7:8215:0:b0:4f7:125a:c88c with SMTP id k21-20020aa78215000000b004f7125ac88cmr25623006pfi.70.1650990680328; Tue, 26 Apr 2022 09:31:20 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 38/47] target/arm: Use tcg_constant in FCPY, CPY Date: Tue, 26 Apr 2022 09:30:34 -0700 Message-Id: <20220426163043.100432-39-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-sve.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 9321457f31..ef57d3a2b4 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2259,9 +2259,7 @@ static bool trans_FCPY(DisasContext *s, arg_FCPY *a) if (sve_access_check(s)) { /* Decode the VFP immediate. */ uint64_t imm = vfp_expand_imm(a->esz, a->imm); - TCGv_i64 t_imm = tcg_const_i64(imm); - do_cpy_m(s, a->esz, a->rd, a->rn, a->pg, t_imm); - tcg_temp_free_i64(t_imm); + do_cpy_m(s, a->esz, a->rd, a->rn, a->pg, tcg_constant_i64(imm)); } return true; } @@ -2272,9 +2270,7 @@ static bool trans_CPY_m_i(DisasContext *s, arg_rpri_esz *a) return false; } if (sve_access_check(s)) { - TCGv_i64 t_imm = tcg_const_i64(a->imm); - do_cpy_m(s, a->esz, a->rd, a->rn, a->pg, t_imm); - tcg_temp_free_i64(t_imm); + do_cpy_m(s, a->esz, a->rd, a->rn, a->pg, tcg_constant_i64(a->imm)); } return true; } @@ -2291,11 +2287,10 @@ static bool trans_CPY_z_i(DisasContext *s, arg_CPY_z_i *a) } if (sve_access_check(s)) { unsigned vsz = vec_full_reg_size(s); - TCGv_i64 t_imm = tcg_const_i64(a->imm); tcg_gen_gvec_2i_ool(vec_full_reg_offset(s, a->rd), pred_full_reg_offset(s, a->pg), - t_imm, vsz, vsz, 0, fns[a->esz]); - tcg_temp_free_i64(t_imm); + tcg_constant_i64(a->imm), + vsz, vsz, 0, fns[a->esz]); } return true; } From patchwork Tue Apr 26 16:30:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566041 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3765681map; Tue, 26 Apr 2022 09:53:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEN/RmEDcY6ZEsfZy/995lW//zy3wkjJmMLdP3ZSYpsaJ8isC/dn76NvaQCRx+ppGWF0q9 X-Received: by 2002:a25:6d85:0:b0:645:192e:31ed with SMTP id i127-20020a256d85000000b00645192e31edmr21089393ybc.16.1650992010047; Tue, 26 Apr 2022 09:53:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650992010; cv=none; d=google.com; s=arc-20160816; b=XKzh0Xuw0JVun8+J2cd8F6cIGJSGqRSDNenQJ9gBTRBF9x79HcmBmFCb+WGfC2tkyy ETg8T3nEXhv3zcBxb8zn4S62GQndIsY6iHhtLoUQ/O8dfuvM3tzJ616EJcqLQwnLmS72 1eCetL+7ZYwBPDmL/r6hl2Ej3kEVzrxbqmKnate4JQcsGaCddEk9zQFi6TeEPEgApBzs v4g0dPnwhXfyov7dXk2XF3yup2hWuZxNq4cNCyJS/eaEJR/sRsC4P2m5AA8kDWFKditl pYw6ljYOTfhnkrVK6PDDQpnPZ5KeU4KZDBCl41QH8SpCgws+D0kTzFRivrg/cFLleaQ+ Nkdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=jXIwkULLtYjwWB5mFtKYDvoLy2jORO/B+nK9qMPIgn4=; b=MBZTmvaUxZu4FoPs6WvsBczOVuchh21J1Vt7X5Z7vFZDX4H7IPzsM3kGMAox9FFZYB bLxfm9V4TXibDmDBLEBzj4D7YYgIBFCWucd66cUnBh7CUBkM3fuwev/+QcaarTKyY96T wCBNyjovIXUqixactXiCvsXRfeRK6F278eRwsAN47p7bFUATrysdmpuvWkvjRCt+2b3N K3KTJtAOy2x9RFrJls/JDggBDsEHB5LWDZoE8sZeb/vmHekAKBreGUcvL7sUW2DkncpC wmFwND9gnIoDX62wSoSJNTKGfKzIe2n2RFcnS1oEre1KisAt7ADDcvCXSHcpoerMTHFr WODA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=AkGzlSGR; 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=fail (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 s124-20020a255e82000000b00633994043c6si15697574ybb.48.2022.04.26.09.53.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:53:30 -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=fail header.i=@linaro.org header.s=google header.b=AkGzlSGR; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:33658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njORN-0005bd-Jn for patch@linaro.org; Tue, 26 Apr 2022 12:53:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46066) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO62-0003B6-1q for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:39 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:38611) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5z-0003yi-5X for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:24 -0400 Received: by mail-pf1-x42b.google.com with SMTP id b15so18448131pfm.5 for ; Tue, 26 Apr 2022 09:31:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jXIwkULLtYjwWB5mFtKYDvoLy2jORO/B+nK9qMPIgn4=; b=AkGzlSGRdiI8w8LDdwpf3Hy7O6+ahwsuolzdl/QMo17NPsAYbmaYf15o8YGl0JSdw+ guxcg5FqYC7TV26gNC9aBtZkNhuhmUB4nHUaRZ+W5zQPVHpd8A4O9M0XpnWHOvr0J5Gj tBG2uriwZYbP/h+Zpn/VQfcPTsk1YqlpYTFqyrf/k91/flg8OjCSUGklyq6AZQfNotuN 1GtCskwkT0RCUY8VJwQauRfQT5EjLoVpuBoFqxmo4pVOqY2MMDOCo3Qljr5bisIqQayk UG3iF4cg+qn10uVNR5y06EmUWmV59GXC4zD//RSQF9Fj6N6zW8ESxKsXLpn/wJZOvgz+ cvgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jXIwkULLtYjwWB5mFtKYDvoLy2jORO/B+nK9qMPIgn4=; b=4bXT4TRXbUrn2K6efswNaF+K2E6E1ZaAcHwzFMFkpoAjFDws2qWktICztRg5CiEFoy USS23ZrzCCpb3Bm4CrO/30R9hVPrr/vrg1jImWrYmAexXLeycTDv/sBTCPzSaWb5mcjY v9q8ovo8cnEtN6Rfr4Vqd1GU4S/aEUuWXgFiaTwHoEu2WjLUcdUItjhA4aXD2lV5YdP4 iuCi7S3MdmY/ba0jYfH5lezl+xSJOEXNA2yJoS5QlRroephvrAdqAt3IkTWxRigoF5Js GluvUQWZ2mh/9NktjDVIvCN6wB36FrvnscLk7kF/ml6h422Vk9TRSIxWXkbVkXPxPCOf ZN7A== X-Gm-Message-State: AOAM5315byG7+JXzpEzgFTjvU3g+0SYzp3x6vo3RyTu8kw0N6IEWFE1P d7LSHwmmqoS1rV7Q9dwtQs02HlRsG2bLaA== X-Received: by 2002:a63:2acd:0:b0:3aa:86eb:3dc with SMTP id q196-20020a632acd000000b003aa86eb03dcmr20090038pgq.441.1650990681104; Tue, 26 Apr 2022 09:31:21 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 39/47] target/arm: Use tcg_constant in {incr, wrap}_last_active Date: Tue, 26 Apr 2022 09:30:35 -0700 Message-Id: <20220426163043.100432-40-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42b.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-sve.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index ef57d3a2b4..c3d3f301c9 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2793,11 +2793,9 @@ static void incr_last_active(DisasContext *s, TCGv_i32 last, int esz) if (is_power_of_2(vsz)) { tcg_gen_andi_i32(last, last, vsz - 1); } else { - TCGv_i32 max = tcg_const_i32(vsz); - TCGv_i32 zero = tcg_const_i32(0); + TCGv_i32 max = tcg_constant_i32(vsz); + TCGv_i32 zero = tcg_constant_i32(0); tcg_gen_movcond_i32(TCG_COND_GEU, last, last, max, zero, last); - tcg_temp_free_i32(max); - tcg_temp_free_i32(zero); } } @@ -2809,11 +2807,9 @@ static void wrap_last_active(DisasContext *s, TCGv_i32 last, int esz) if (is_power_of_2(vsz)) { tcg_gen_andi_i32(last, last, vsz - 1); } else { - TCGv_i32 max = tcg_const_i32(vsz - (1 << esz)); - TCGv_i32 zero = tcg_const_i32(0); + TCGv_i32 max = tcg_constant_i32(vsz - (1 << esz)); + TCGv_i32 zero = tcg_constant_i32(0); tcg_gen_movcond_i32(TCG_COND_LT, last, last, zero, max, last); - tcg_temp_free_i32(max); - tcg_temp_free_i32(zero); } } From patchwork Tue Apr 26 16:30:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566050 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3776154map; Tue, 26 Apr 2022 10:05:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzp6nywvocenprNBUrzdNia2+7wsY6Fy9wLPa5EBbrV/QbCLOxXqgw79P2VEGKonVLtpB2x X-Received: by 2002:a25:ed08:0:b0:648:8b96:cb2c with SMTP id k8-20020a25ed08000000b006488b96cb2cmr7348332ybh.370.1650992751747; Tue, 26 Apr 2022 10:05:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650992751; cv=none; d=google.com; s=arc-20160816; b=wkBQlIAWI3xZTE9xk+SWVJmjz29MvgQd9xRHY3hfxprGqus03aUrIFOcaAmmjoyg9P vMGRfr3Q/q5hbDTadu1DSpyIegH8xf3xX3M9abbg2jCVFfYuT6t+w6ofvxF1IViTIEQa SGbeyY3LvBghIQbrpvBjgfDaRa1VPRj4S4/5xaDNcAlKhjkc/axtJKUBIW1DAZMO97Ti 8jWBno+1hYb/yporpIJr888iu4ttM3RVGY8269AnP5egmGSVzoH5QtAtMCJi4AMCCsXE B3BfMWiZXbm/4bXVw8zV/axl2aBGm6rvgOD59NwchtGHloWmih20VGxgp8ptXUitY9+y GbEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=Ah0wax+Io8Un9um16DZI/sPE/uUBnXT9rHc+UFy3E50=; b=MXusJvzYKIOcc+9ygfs5o06JFxlbbegjxD2U9M4okyJE77+KujBaS5b5feC62AACAD ydkYXBxcn/kBzzsCd9MdgZPTjTDb+A5Ty/NrAieD55H8PsBEutfH/5TCWRhrZvKAPEtk pMrzaa2H8jR6K7ld5mg/zDLAxHtcorYlwLAE0txDMe95yZSfVr2jIJwVVkLkrBcvgoMM RL366GYrqhzlgkS2ztqdRcqlce+VqM6XQkSrZBzBa8ENNe23hmgeSIrDo/XgjgIZShrQ rPd9/CVrVQUgqLSV5SuqOOe7KmUVN8NoifrIQyYVXqouRZZYnfkS2z++LFJ1LjGPjwjP 9cRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gmVDydr0; 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 t133-20020a25468b000000b00645d9d29be9si9791319yba.333.2022.04.26.10.05.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 10:05:51 -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=gmVDydr0; 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]:60294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOdL-0006wU-6t for patch@linaro.org; Tue, 26 Apr 2022 13:05:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO8w-0002Dl-OR for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:34:26 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:38628) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO8u-0004Ld-LR for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:34:26 -0400 Received: by mail-pf1-x429.google.com with SMTP id b15so18454675pfm.5 for ; Tue, 26 Apr 2022 09:34:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ah0wax+Io8Un9um16DZI/sPE/uUBnXT9rHc+UFy3E50=; b=gmVDydr0gY8djhkL/xO3d2QJIzDkUsepY3lTk9ngYbBYoqonbtEdSKLI6+js2fl2Gp EuUFPw20RoCweQV9/ZE11UWhgxTawGYhp7wapuwTlgSXqWlROVE5UARqG20SxoQ/CqKo +h/+uqnWjPr9T4rNMp9fwNZRG1tH0Kg+h6sMYlQRETtBFM+fG9O76jQPrEKk/GR1/I/1 vOn4cg/mjJsL0825C1afUgS4IVdd6Ff4SQm0+jySZxWLPFqvNGF+xc1ZYM+DpMTeeUgx 0yVoCX+xZIRejU7+jrCpf7Vq6+4Qe5Q9AYHgXCKGJLhgTI7SDuZlurHuVLyBy7aB/pdz BCIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ah0wax+Io8Un9um16DZI/sPE/uUBnXT9rHc+UFy3E50=; b=jO4OvNOgnCxreKMkMHtXfQebBymFjDgMACRZ902u7ATNahjaHCsytYofTDmdM0yVkL VtTUcb5zCC08HZ5cIiNKdf3Y7q4dgNlwWT/HE0d28WoAbj6CcNQlLz3ZVmXlN4F0GRrA NpmgKnMXGzTreBH7PH1yE/hDTQtzqNMtgC1zoYAMvspdYkizrrY/7krG5Z+GobmVQ8Ff P8WS+i+x32/Jh+VSoe7HnbWwbA43X5K250eiKPIEIuh4/hK6XriydmtA9yQTn8PnZ6w5 wepiH05dNE+i7isnmXgQ6wMY7tJZEOR/IZZg94n884/Du8HERvtKTJVTthPK6Vg23k6Y f40w== X-Gm-Message-State: AOAM53221V8SQQDbJxOmORVOpB8BK+rLYIEinoMWlMKwB7mGhYfowUB0 LmhSYPzuLDXN1WA00vABGSAeL7ye1/AQQQ== X-Received: by 2002:a62:3848:0:b0:50d:376e:57ed with SMTP id f69-20020a623848000000b0050d376e57edmr13571138pfa.71.1650990863085; Tue, 26 Apr 2022 09:34:23 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id a13-20020a17090acb8d00b001d953eb2412sm1132834pju.19.2022.04.26.09.34.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:34:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 40/47] target/arm: Use tcg_constant in do_clast_scalar Date: Tue, 26 Apr 2022 09:30:36 -0700 Message-Id: <20220426163043.100432-41-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x429.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-sve.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index c3d3f301c9..7a39ed0c06 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2926,7 +2926,7 @@ static void do_clast_scalar(DisasContext *s, int esz, int pg, int rm, bool before, TCGv_i64 reg_val) { TCGv_i32 last = tcg_temp_new_i32(); - TCGv_i64 ele, cmp, zero; + TCGv_i64 ele, cmp; find_last_active(s, last, esz, pg); @@ -2946,10 +2946,9 @@ static void do_clast_scalar(DisasContext *s, int esz, int pg, int rm, ele = load_last_active(s, last, rm, esz); tcg_temp_free_i32(last); - zero = tcg_const_i64(0); - tcg_gen_movcond_i64(TCG_COND_GE, reg_val, cmp, zero, ele, reg_val); + tcg_gen_movcond_i64(TCG_COND_GE, reg_val, cmp, tcg_constant_i64(0), + ele, reg_val); - tcg_temp_free_i64(zero); tcg_temp_free_i64(cmp); tcg_temp_free_i64(ele); } From patchwork Tue Apr 26 16:30:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566053 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3778821map; Tue, 26 Apr 2022 10:08:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycv/PPtenkQVAJ9FmVte3vI+XJnS+UN4P+dcuzoNwRxsSrflsdgUTU/PXvLu+GnlXNyvbq X-Received: by 2002:a05:6e02:190c:b0:2cd:9331:2750 with SMTP id w12-20020a056e02190c00b002cd93312750mr4936086ilu.214.1650992937231; Tue, 26 Apr 2022 10:08:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650992937; cv=none; d=google.com; s=arc-20160816; b=SNKW/Sdg9knTqeGbtC9wq4SJiFl+9IUAQwOMzU2xegbwkolLGLns4muS6iY/5cz04s je42ia3F4/yKb2Z7b7eDldNzauO9AroObuJS7MOSGT17Q+JAtGF6bFgjSXIzU/BcIoIr yCxo8byxzWsq0AW0a6AKFcKwVzPc0QWKtmCNUse1CWx1n2aC+Hk70/pZ5Wx+IN0wMlC0 stS2ziYHJxyxriGU5QVSY0IuSbEJLI/Gh3foHQUR5/xOBUD4vHp90XF93xhzse/+f1R3 1D3ze3SkG12Os/Fc0DxQOt5i1QnR2fi8zIYbpurvSjbu7lAWyUWGXKxMrppRS9CeMA31 FrSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=Gu1w/jO8eoHTj1LzEHCTAVluXbeXXyayJtWHm0r4IXU=; b=ZBc+CEIzptU8eDIQeKh38Yuixfxm8hvw2Vb6946fZLjy0GYzqRmNtVZF0ETsxfBCWj EnvwWkQB2xMTNtQ7Tigy0u2Db2QTyTW9VC5L0n6yXyjP2wToENHvE/pkU4sqN7oyXlI4 OqpdNEdXyLVgjx9oi2v73cEEhmN4G23eDHrJgsaBky856lMXWSVhIZPRsKqOVOLz2K4E g8yvlJaLKKfxAXa0zxUYfh040q+EOk0Bm3N7lvNYHkgHdCBLJxiUwCa9VPhF2UfJiu+Z ZYuy+nMm50Ejhac7cLIp3Eod54fRg2EWT9zeCbzmMO0t+9SCOef/FQIYYM0N2QrDP69R EV3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qGvheP2z; 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 q4-20020a5d87c4000000b0065309877af8si9652024ios.65.2022.04.26.10.08.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 10:08:57 -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=qGvheP2z; 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]:40690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOgK-0004TE-Mj for patch@linaro.org; Tue, 26 Apr 2022 13:08:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO8y-0002H2-1k for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:34:28 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:35512) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO8v-0004Ll-79 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:34:27 -0400 Received: by mail-pj1-x1032.google.com with SMTP id w5-20020a17090aaf8500b001d74c754128so2657140pjq.0 for ; Tue, 26 Apr 2022 09:34:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Gu1w/jO8eoHTj1LzEHCTAVluXbeXXyayJtWHm0r4IXU=; b=qGvheP2zI4iWipBg7NqOIpEoSeU7le9kW5tMi7Uul0X+9GyUmiBS6/le3nGmVqobjY hMda/8RULY9KDTcNbIWn8ZTwes+7jJKV8HnmMhIk1LS6yJYfPlJnv/Lpzn/uUInrKNrU O8LJu6ZCcUYvZLa5RiwvQQCoyjiPNfNJQLWTGyDNP+qSV3UFW2ntqgQqsiozwR1Pb7C9 UjAPqBvB0F2LlPj9z+9mR0wX0LUuKLTlyLSVZ4ujwpAuEUjte9E4fPaeRbnFWGDvwoKj ieN16im0+dk6eZDU/Wsql9LfVsEPjKPMyaNmBAHhiYtv8zHFSJxOp9NxbDPgEpMA7kLd RT+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Gu1w/jO8eoHTj1LzEHCTAVluXbeXXyayJtWHm0r4IXU=; b=DV3qHgG0WgnLP0MejUywmZsVD9bV4vTQD0oAF4++OIWIm9DGLNhS9Ug+qDS48l7vfj D9x1+vkHpLfIV0HsUvYCBQYwJOZmCeTBxDfBlsYzX59baI3usZ/4iUvTO8eOHpge56SG rnIYOz5L6unuWfukiOPwsASzurwX8Fiaua4miEZnhM+LiC5FZWKJVJ7G+kH95AxSQAnV 8gadJ1h5JkOf+YYYntVZPkyG1f/D6nbGsRjYuCoRMPolhn+xaF0MKKjBbg1FYCCJVXpx 15Pre8E9vspP4nkLJJgs3mryWZ+w0hjdZEQy1OqEbWNMyjPZj5kvPDJKMJEqPmuiOFZ9 iHXg== X-Gm-Message-State: AOAM531cuJWlL6t4/JmnZ3Nhyd0mMIe+i/4lzs1VICDftWR5FQ27GWh+ DHPYtkP6m0CCks7zCOBolD0L2lYOnwlZCA== X-Received: by 2002:a17:90b:3e84:b0:1d2:c015:2182 with SMTP id rj4-20020a17090b3e8400b001d2c0152182mr27748993pjb.232.1650990863845; Tue, 26 Apr 2022 09:34:23 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id a13-20020a17090acb8d00b001d953eb2412sm1132834pju.19.2022.04.26.09.34.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:34:23 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 41/47] target/arm: Use tcg_constant in WHILE Date: Tue, 26 Apr 2022 09:30:37 -0700 Message-Id: <20220426163043.100432-42-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1032.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-sve.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 7a39ed0c06..727f5cca36 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3568,7 +3568,7 @@ static bool trans_CTERM(DisasContext *s, arg_CTERM *a) static bool trans_WHILE(DisasContext *s, arg_WHILE *a) { TCGv_i64 op0, op1, t0, t1, tmax; - TCGv_i32 t2, t3; + TCGv_i32 t2; TCGv_ptr ptr; unsigned vsz = vec_full_reg_size(s); unsigned desc = 0; @@ -3624,7 +3624,7 @@ static bool trans_WHILE(DisasContext *s, arg_WHILE *a) } } - tmax = tcg_const_i64(vsz >> a->esz); + tmax = tcg_constant_i64(vsz >> a->esz); if (eq) { /* Equality means one more iteration. */ tcg_gen_addi_i64(t0, t0, 1); @@ -3644,7 +3644,6 @@ static bool trans_WHILE(DisasContext *s, arg_WHILE *a) /* Bound to the maximum. */ tcg_gen_umin_i64(t0, t0, tmax); - tcg_temp_free_i64(tmax); /* Set the count to zero if the condition is false. */ tcg_gen_movi_i64(t1, 0); @@ -3661,28 +3660,26 @@ static bool trans_WHILE(DisasContext *s, arg_WHILE *a) desc = FIELD_DP32(desc, PREDDESC, OPRSZ, vsz / 8); desc = FIELD_DP32(desc, PREDDESC, ESZ, a->esz); - t3 = tcg_const_i32(desc); ptr = tcg_temp_new_ptr(); tcg_gen_addi_ptr(ptr, cpu_env, pred_full_reg_offset(s, a->rd)); if (a->lt) { - gen_helper_sve_whilel(t2, ptr, t2, t3); + gen_helper_sve_whilel(t2, ptr, t2, tcg_constant_i32(desc)); } else { - gen_helper_sve_whileg(t2, ptr, t2, t3); + gen_helper_sve_whileg(t2, ptr, t2, tcg_constant_i32(desc)); } do_pred_flags(t2); tcg_temp_free_ptr(ptr); tcg_temp_free_i32(t2); - tcg_temp_free_i32(t3); return true; } static bool trans_WHILE_ptr(DisasContext *s, arg_WHILE_ptr *a) { TCGv_i64 op0, op1, diff, t1, tmax; - TCGv_i32 t2, t3; + TCGv_i32 t2; TCGv_ptr ptr; unsigned vsz = vec_full_reg_size(s); unsigned desc = 0; @@ -3697,7 +3694,7 @@ static bool trans_WHILE_ptr(DisasContext *s, arg_WHILE_ptr *a) op0 = read_cpu_reg(s, a->rn, 1); op1 = read_cpu_reg(s, a->rm, 1); - tmax = tcg_const_i64(vsz); + tmax = tcg_constant_i64(vsz); diff = tcg_temp_new_i64(); if (a->rw) { @@ -3723,7 +3720,6 @@ static bool trans_WHILE_ptr(DisasContext *s, arg_WHILE_ptr *a) /* Bound to the maximum. */ tcg_gen_umin_i64(diff, diff, tmax); - tcg_temp_free_i64(tmax); /* Since we're bounded, pass as a 32-bit type. */ t2 = tcg_temp_new_i32(); @@ -3732,17 +3728,15 @@ static bool trans_WHILE_ptr(DisasContext *s, arg_WHILE_ptr *a) desc = FIELD_DP32(desc, PREDDESC, OPRSZ, vsz / 8); desc = FIELD_DP32(desc, PREDDESC, ESZ, a->esz); - t3 = tcg_const_i32(desc); ptr = tcg_temp_new_ptr(); tcg_gen_addi_ptr(ptr, cpu_env, pred_full_reg_offset(s, a->rd)); - gen_helper_sve_whilel(t2, ptr, t2, t3); + gen_helper_sve_whilel(t2, ptr, t2, tcg_constant_i32(desc)); do_pred_flags(t2); tcg_temp_free_ptr(ptr); tcg_temp_free_i32(t2); - tcg_temp_free_i32(t3); return true; } From patchwork Tue Apr 26 16:30:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566060 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3785487map; Tue, 26 Apr 2022 10:17:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAXC2nE7kI10/TjqVGCnQV0q3muld8bje6CQh9rpFNscTg8dSE5uIfd8Vxkh853e6W8mTz X-Received: by 2002:a81:3214:0:b0:2f4:dc10:33ba with SMTP id y20-20020a813214000000b002f4dc1033bamr23365790ywy.3.1650993431026; Tue, 26 Apr 2022 10:17:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650993431; cv=none; d=google.com; s=arc-20160816; b=kIqF78+eRoYxatbSkQfG1jMyajryij4AwKNQypCLgn8m6Bfrt5tJWKa9/+qoibWnjS f/FUHFT3C545A7hgZfwzekP7E20tFr2V1OYVezArtPQcYVO5eWUxli0zH90ioyg1cy9o MpNmTriKbvZVk2NNcApZAMXX43d7dWpgNHl0f6i1uSpzBKupGl+QnB4JF4QVPHwTCBhP Xv4oMb0CdRrbyXMNv+Rw0k/QB/O9Zb4v6Q5KCoSLx9T9Rhj5qf2Bjwa3REA4qnxgKd1G PQZYdV4ryWNM9Ul2HaIQYIL9wJbF98QOBKaixQpPNiN6w7lubDyIfr0OXGs1D3snGxUB VtvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=rEYpL9+yf+aJ8URnT+Udx9HusvkjZ5AP1kU3tR6FFqM=; b=VBcs/x1QzJC1Q1mETKVTg9RIS7i36Ep6ta4gkGQSm4ZoIPiZNnDSbhcGAjGx+FrheX IvuDjvrIyECFmvhW0hVRNSFDGThmPczPlfZFuBXVfWS7oF+Yj3BTRrfL4SadiCu4aEDA uloGIovr8x8EN4Cf0rnCwKa3gqyg+Lc4yz5Yxqf8I3d3jkkUpETCSsnwIILGNXBhk1fq nwPA6InaoqI3oFdBAxETe8Z+n2ouspyZhODGL5L3JH+yDl3PmXJ/6BmkTa8GbZdsqoAa ey+uQGbyJKHOZlAMr/4/ozoOIircQsK9xnLJnvjV7xNAd24OIO1CguUotgtMCujtn4XV mEXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jtlksooC; 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 t125-20020a254683000000b00636eebfd4d3si13904331yba.56.2022.04.26.10.17.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 10:17:11 -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=jtlksooC; 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]:33794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOoI-0002Yz-HR for patch@linaro.org; Tue, 26 Apr 2022 13:17:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO8x-0002Gz-Vd for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:34:27 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]:45984) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO8w-0004Ly-0O for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:34:27 -0400 Received: by mail-pj1-x1035.google.com with SMTP id n33-20020a17090a5aa400b001d28f5ee3f9so3005783pji.4 for ; Tue, 26 Apr 2022 09:34:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rEYpL9+yf+aJ8URnT+Udx9HusvkjZ5AP1kU3tR6FFqM=; b=jtlksooChHxoDZiaqIL4waU3vHPV1Lf5efkEcZghNamwnTb8f1IiD5A1QKOOW1eudg 5CmcfR+BjJz7jyihveubvwVapxmW2yYOOQ4KrvCwkWiDT0dS1jH/xyYyeEyT9ddJlQEk aqGmeqZLsHxELFdY8nFvKE7S91h1X4+xuRZbBPQwzN2WChA7u5mQH7r47gXv1OSUGrNv qqxH6O3f/WS7V0UVNUM54hxOkn5jINl+zYaRQ/Fcx/C+/MMgG8GKFwO/jz83mi7fO5zX qFYnx1Ut4qLNO7P4gO5+pQYpisNKEPmk7L0jTzokdunxKivPHCoVBaAdWckI9SqFRH5D 4vMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rEYpL9+yf+aJ8URnT+Udx9HusvkjZ5AP1kU3tR6FFqM=; b=ndc56iT7OSa9F1DZgRTI2syOCttn8HtyVn5ip5OiIkleB+IfafI08dZpR8ahiKv2MV u6YFfnek9+9myuCgZ8nfKyG9e5deKXsvSMaQwVuF6R+J0iEfzjPJ9/Qv41aPxrUjCQ+x 92QuwyBVgNZmPATzynWwtn0Si03HtHwDfoz+HWum6JJzTso3/ZVQiURMyVIe3spcY7nA qbOEqh7VE/XhsIeW6O5Rqv6wE0aEPrgStXrui4MYZobtVH/XAU9TYXf6alhgwHYhpyJM C6zB55UtbQxYMQCWZ5bITC7OprGNY93nHRGyt/7nlGL0XOHhv7N3UesH69UGs9WNrtY1 SUJQ== X-Gm-Message-State: AOAM531WxqS34ImJlDs8ace8OZuPu2wl0fiFbttGhCyhNWrtEekkDPH2 sYOWMEVPap4M/IcHwEaDTsP3ynm53gh8Uw== X-Received: by 2002:a17:902:ab5c:b0:15c:ea3a:9437 with SMTP id ij28-20020a170902ab5c00b0015cea3a9437mr17333305plb.9.1650990864616; Tue, 26 Apr 2022 09:34:24 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id a13-20020a17090acb8d00b001d953eb2412sm1132834pju.19.2022.04.26.09.34.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:34:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 42/47] target/arm: Use tcg_constant in LD1, ST1 Date: Tue, 26 Apr 2022 09:30:38 -0700 Message-Id: <20220426163043.100432-43-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1035.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-sve.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 727f5cca36..fcab15a6ec 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -6426,7 +6426,6 @@ static bool trans_LD1_zpiz(DisasContext *s, arg_LD1_zpiz *a) gen_helper_gvec_mem_scatter *fn = NULL; bool be = s->be_data == MO_BE; bool mte = s->mte_active[0]; - TCGv_i64 imm; if (a->esz < a->msz || (a->esz == a->msz && !a->u)) { return false; @@ -6448,9 +6447,8 @@ static bool trans_LD1_zpiz(DisasContext *s, arg_LD1_zpiz *a) /* Treat LD1_zpiz (zn[x] + imm) the same way as LD1_zprz (rn + zm[x]) * by loading the immediate into the scalar parameter. */ - imm = tcg_const_i64(a->imm << a->msz); - do_mem_zpz(s, a->rd, a->pg, a->rn, 0, imm, a->msz, false, fn); - tcg_temp_free_i64(imm); + do_mem_zpz(s, a->rd, a->pg, a->rn, 0, + tcg_constant_i64(a->imm << a->msz), a->msz, false, fn); return true; } @@ -6609,7 +6607,6 @@ static bool trans_ST1_zpiz(DisasContext *s, arg_ST1_zpiz *a) gen_helper_gvec_mem_scatter *fn = NULL; bool be = s->be_data == MO_BE; bool mte = s->mte_active[0]; - TCGv_i64 imm; if (a->esz < a->msz) { return false; @@ -6631,9 +6628,8 @@ static bool trans_ST1_zpiz(DisasContext *s, arg_ST1_zpiz *a) /* Treat ST1_zpiz (zn[x] + imm) the same way as ST1_zprz (rn + zm[x]) * by loading the immediate into the scalar parameter. */ - imm = tcg_const_i64(a->imm << a->msz); - do_mem_zpz(s, a->rd, a->pg, a->rn, 0, imm, a->msz, true, fn); - tcg_temp_free_i64(imm); + do_mem_zpz(s, a->rd, a->pg, a->rn, 0, + tcg_constant_i64(a->imm << a->msz), a->msz, true, fn); return true; } From patchwork Tue Apr 26 16:30:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566056 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3780957map; Tue, 26 Apr 2022 10:11:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx53U2nAbiMA2FlMY6VykJJJguSOX70vBhzEJTnMAx+1k27mKiSN1KUcEVU4QebxQ1QA0gJ X-Received: by 2002:a25:b982:0:b0:640:df8e:fb76 with SMTP id r2-20020a25b982000000b00640df8efb76mr21398882ybg.0.1650993088353; Tue, 26 Apr 2022 10:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650993088; cv=none; d=google.com; s=arc-20160816; b=WwE1WYqII0yeq7baPwlxB9Pdj8mzVwCruG0bt6le8+rOqgkvMsuJ+oU0Ah2bHYuF9R cVpu5QKOJ1lKEgmsObYbxa+qZ2J5nKMc5BaYGzHxcbMhpgJsTPjdAoPcNJYKE2L/O1QZ N1Hh5lE7XhyN1+la/CRseUQzndXdawzitWCMnnmwWyywqK/rEnUfI4o4aWJDY1qBg9IA /fhWM72KcHUB8SZcRXhKY83AKKdqFc7vgUtP8bXOKynL3jb6a7ZmZekIh/HBCc79kvNJ LfAcPy/RN6w1EF2nrdfPyGO61go62IeNhHoOP3T1iicBTkJm+/utFuI2oSswSBht/owg JV7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=H4dw0wU4hRrzI7CX28tAX+ygbbypPvm0F9qWYTV7tlw=; b=ypj2ldcZBKyiYDJtTTg9wemUpUD+6urT2nxYZwZ/4DOmJvigw0CzaYeG8PGwzDjlUu 9FWAoCkT5AYBaJH/a7VqMTHq3osbBK2Eu7paPWFRsMVZNHynZPX+6SlKXogNFMZEnd+R zARCJRzwBekexZd/iKJieIl1owMt/VBROrISV82V9Ee83asaAZjWBm8VMX+198VQHKTz u1eLzbAAV4SPP0RaMOGO8BIsY3ZNlXijKkht9SugKkzo/WR9Vb9CxW95szSDxUaSXH5e EiU26F5+Hf3jR+Gq12iVKJRuoQAg9H+427FNpdjYlhNJKoHH3Gg80A2++CRu+7NVCmx2 yOTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YGdso500; 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 g9-20020a816b09000000b002f4dedb6775si12758594ywc.192.2022.04.26.10.11.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 10:11:28 -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=YGdso500; 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]:49014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOil-0001qa-S7 for patch@linaro.org; Tue, 26 Apr 2022 13:11:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO8y-0002Hl-9S for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:34:28 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]:42617) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO8w-0004MF-Nb for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:34:27 -0400 Received: by mail-pj1-x1036.google.com with SMTP id l11-20020a17090a49cb00b001d923a9ca99so3017781pjm.1 for ; Tue, 26 Apr 2022 09:34:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=H4dw0wU4hRrzI7CX28tAX+ygbbypPvm0F9qWYTV7tlw=; b=YGdso500f13kwaIq+1w+dTAfJ0zbpkcaGBnGSxJR2Z4F2LzYF1QS2YFQWh02iFBACX pD84iY0GsQBUyIqaOODVVcSr+RM0w3f+oQB05BDOr0qpqryR29FfKJpvlxGL92xD6Rdc X9GaAjlcvo3ChvLSv2qJMN+054ZKSw9W9vZraSELi02qsD6LPMngH5RjSLGsop2s9IEb TKTJKXm2ozheC8pt/IwJK11ESS61/zY3PIzFrVXBbRv012O0H/9kQGQLGWKOx4EJ08xl cue+vGGAkY4sZBYONyHxjm0fX9b4LyH7I3ZUG5uIQnCtR7l4GlXNUzse6zmtIg6UMK2I HpWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=H4dw0wU4hRrzI7CX28tAX+ygbbypPvm0F9qWYTV7tlw=; b=aPkOchiLWXUHdK5pPcDQJTAJY/DYVWfMzJHsopMFf2SxLlexRdZyi4h1O9Pind6Bm0 c/ZxTfbrNBpsDhyRht547oX0SEwr5xhy6w4Ph7HQFuemlfOLoJUgEa6uRVMoVCePpM1A VUlqcNGpxl9dc6Qg4n6yfjRoRqE3S3XGl6TURuOKSprjp27yipOh5JcJOE2uH1QuGGpN KIBMYxBSJH2xXvozJ/j6mnhC95a7p/UGxRwAsZcHZFI2D73CPobNGk7/wX5LjcdbaN+A NjI5kcFY26dqBvhyDI4ZER6mAs22+FIOUvIn4LEdpXTUKIn9GE96ntYTMrNXCAXFixU2 adbg== X-Gm-Message-State: AOAM531WAZxjA66k6CUKaNmsPqBoyIAvG9o2fkhUJIN7NdEtsTYkskNW +ZnZbFg4xYydE+3G7waPi65U8l0LqJJ4JA== X-Received: by 2002:a17:902:bf0a:b0:15c:df1b:f37d with SMTP id bi10-20020a170902bf0a00b0015cdf1bf37dmr19018074plb.90.1650990865408; Tue, 26 Apr 2022 09:34:25 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id a13-20020a17090acb8d00b001d953eb2412sm1132834pju.19.2022.04.26.09.34.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:34:25 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 43/47] target/arm: Use tcg_constant in SUBR Date: Tue, 26 Apr 2022 09:30:39 -0700 Message-Id: <20220426163043.100432-44-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1036.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-sve.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index fcab15a6ec..92339a19e3 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3830,11 +3830,9 @@ static bool trans_SUBR_zzi(DisasContext *s, arg_rri_esz *a) } if (sve_access_check(s)) { unsigned vsz = vec_full_reg_size(s); - TCGv_i64 c = tcg_const_i64(a->imm); tcg_gen_gvec_2s(vec_full_reg_offset(s, a->rd), vec_full_reg_offset(s, a->rn), - vsz, vsz, c, &op[a->esz]); - tcg_temp_free_i64(c); + vsz, vsz, tcg_constant_i64(a->imm), &op[a->esz]); } return true; } From patchwork Tue Apr 26 16:30:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566048 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3772920map; Tue, 26 Apr 2022 10:02:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNKfvZuI5BZW7xkhldPdbBeYzqYo/J86K2lVriUxGzUJUvGMYJx78/AURLG5pdFa02BEwD X-Received: by 2002:a25:5043:0:b0:648:70b5:53e5 with SMTP id e64-20020a255043000000b0064870b553e5mr9659157ybb.422.1650992554198; Tue, 26 Apr 2022 10:02:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650992554; cv=none; d=google.com; s=arc-20160816; b=VTOKhsvun191XU09X7/GUsqgdxNwK0P9+oVAY5vsILSgtcS8xRhHde+vSw57PQn6Tv bil9UNNWtCPQCfDf+8HagusJL/G29avBjWpCopsIpKgsG0CMzhNaOk87/9pNDLF9XOE1 XG4O8JnClkq1+TuInqMf35yHVWM+aT34N8RYugNd7N90GbJ2sHcgd0/rgX/2TzKPF6a/ U76pLTNZa6MD4ZzuITZ8tAhKqYMbEzpZOZNklQfS8XU2GtHJmuFHD3vfWYFdx+dJ8ZX3 UxgAbydhqn12QIusZs1Xd2GKfqrPM5QdI+Jq3qK88pOdlj52hZhKCLyH3bYCTEQwx++W EK0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=xpgOAMY6yJE94kKOgo2N7OR1UFD6TR7BUSB7+hLMRTs=; b=axEQCbqsgj4LoLMG7mWkz8BA57RD+q52buCaNzdeZp/kdnynnnieDe+6w7xhTbelax vd6/sJ58tTUg1uD0lRyUbPEKr74ubMpvdaI0W/f3jSecQz4aUiFcJNLc98lqlOfjiMgL 4/yMhqsLQ72TRuD0jk86ExBizlHbDnxy7TfUu4JF1xVLk9HA2lrwl0v1era1bvYXrv0T OOvqB1bY+uuY2mxKdCA57nEX3ykgIqDqbeCFmrXmG75fERje4jaMIrdqACClpNCH3FM9 gXJLeHlDRsCniEF7UdpjdVVUnNCkJdEFM70UOohat9ozMWF4qP18sqgQA+43oVkg0KBN XnJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=fSdcABSn; 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=fail (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 g129-20020a816b87000000b002f4dc4bfbcbsi14474230ywc.74.2022.04.26.10.02.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 10:02:34 -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=fail header.i=@linaro.org header.s=google header.b=fSdcABSn; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:51686 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOa9-000129-NF for patch@linaro.org; Tue, 26 Apr 2022 13:02:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO90-0002Oo-3q for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:34:30 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]:41742) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO8y-0004Mq-Dv for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:34:29 -0400 Received: by mail-pl1-x630.google.com with SMTP id s14so30701123plk.8 for ; Tue, 26 Apr 2022 09:34:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xpgOAMY6yJE94kKOgo2N7OR1UFD6TR7BUSB7+hLMRTs=; b=fSdcABSnvQRXssmPFcWRNnLXTCpQUJuQnBIouHCm1LcPB/mN5DZEBj5hAbw/JFoBAT L0rrMi4tIuwVAHp0vyTMkhb3qjtim2seIJTc/ka+Ujyubn4b90imJEMUEFLlmEcH7KJI rjgE/7qx+d7aKlavg6O6aZDfw4trQqxgpYJ8+OWzHSQCKZ56qKA/mEaG+gHPjOC8K0yV HVU2Wb+ZgA0XbcShNVvjmrzQc5Uk4AWmFSeUjoz3Ycn2ZQ3z1fD4o6Kbs+2cFb1opgMp mtf/foD+mWQAGb7/5uOSXq7kZE8DV6fwWXl2zxUfhedpVm/lb5Wh/vCSK2xdTQWuRV/i f0eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xpgOAMY6yJE94kKOgo2N7OR1UFD6TR7BUSB7+hLMRTs=; b=rR1wghVtTQR4qRhIYjqc1sn0+fmklaT6TyGbyWkSUYlkkDd+sJauF6qj9NnD+Ipbd8 MhtM3Kh5xHGGzAPpFKvq4HEzkreI4alEwNzLvxjyzCfaO3JPetYF4OM56BqAYh0DG7r0 etM2YsomWEjceiFtDAat4ixTaJ1DJ4Y7olGzPl3AnFfFLiuIp/YSgR4q7z7Q2pZO92jb oWD3mQi7x58nPOFWuEjvMZ062cHCB9hRJCkb2ZWTAMafafSTBlqgGpEtoBDN9xKKUnMb CrYUFN5GRpYn8Fn1bCfulwWW4rPuYTsKtx2yTtC5h/utKj8/KjIhGTpoRv27QE7DdNxg 9xHA== X-Gm-Message-State: AOAM531X+XXvfnzEnOaHU78x4bWFzv+5GNjIcjehVLKkM9rv2CtkKT8B G3mU3JT2wAIL+SMintmulRfB9nmX2OJBqQ== X-Received: by 2002:a17:90a:c388:b0:1d9:6336:2d7a with SMTP id h8-20020a17090ac38800b001d963362d7amr14111525pjt.244.1650990866237; Tue, 26 Apr 2022 09:34:26 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id a13-20020a17090acb8d00b001d953eb2412sm1132834pju.19.2022.04.26.09.34.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:34:25 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 44/47] target/arm: Use tcg_constant in do_zzi_{sat, ool}, do_fp_imm Date: Tue, 26 Apr 2022 09:30:40 -0700 Message-Id: <20220426163043.100432-45-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-sve.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 92339a19e3..a684d489d2 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3853,9 +3853,8 @@ static bool do_zzi_sat(DisasContext *s, arg_rri_esz *a, bool u, bool d) return false; } if (sve_access_check(s)) { - TCGv_i64 val = tcg_const_i64(a->imm); - do_sat_addsub_vec(s, a->esz, a->rd, a->rn, val, u, d); - tcg_temp_free_i64(val); + do_sat_addsub_vec(s, a->esz, a->rd, a->rn, + tcg_constant_i64(a->imm), u, d); } return true; } @@ -3884,12 +3883,9 @@ static bool do_zzi_ool(DisasContext *s, arg_rri_esz *a, gen_helper_gvec_2i *fn) { if (sve_access_check(s)) { unsigned vsz = vec_full_reg_size(s); - TCGv_i64 c = tcg_const_i64(a->imm); - tcg_gen_gvec_2i_ool(vec_full_reg_offset(s, a->rd), vec_full_reg_offset(s, a->rn), - c, vsz, vsz, 0, fn); - tcg_temp_free_i64(c); + tcg_constant_i64(a->imm), vsz, vsz, 0, fn); } return true; } @@ -4520,9 +4516,8 @@ static void do_fp_scalar(DisasContext *s, int zd, int zn, int pg, bool is_fp16, static void do_fp_imm(DisasContext *s, arg_rpri_esz *a, uint64_t imm, gen_helper_sve_fp2scalar *fn) { - TCGv_i64 temp = tcg_const_i64(imm); - do_fp_scalar(s, a->rd, a->rn, a->pg, a->esz == MO_16, temp, fn); - tcg_temp_free_i64(temp); + do_fp_scalar(s, a->rd, a->rn, a->pg, a->esz == MO_16, + tcg_constant_i64(imm), fn); } #define DO_FP_IMM(NAME, name, const0, const1) \ From patchwork Tue Apr 26 16:30:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566058 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3783487map; Tue, 26 Apr 2022 10:14:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYlfWf4gKGBfyexmRtjFU4XeZ8ctVLhtZ10q/9m0EDJKcV85Mz1g9kHcL/oXvUodaguNwH X-Received: by 2002:a81:393:0:b0:2f7:c576:7bf7 with SMTP id 141-20020a810393000000b002f7c5767bf7mr17146836ywd.154.1650993271026; Tue, 26 Apr 2022 10:14:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650993271; cv=none; d=google.com; s=arc-20160816; b=z2fpVMf+GSLuTo1kBshv6XEIsee0AZlWEJjWFM8W+4GNTGuKLHf1KSE2VindzywlMO e58JTnZEt0EXP/axmFTxUyaKznOrEuE70qCc2cpgoRUre9iuG8q9RiV8RyO94qZWUHnU 92kT3YMgfQ3PcHpvSY1iQyOSsce7NVA1p04nNmTbU1EuzmdkvCvy/QMOosisaef+LuYs L4wVKpZ/iwj1wHKGAIwRZrG28qMs8aha2vPLJSnifTNo6L5YkguwbpxwOVJbqQislM3o zbbygWFFfBH+VaNfGCh9OPeQhBoOqc81s253hkIKm1Sfyo7FIEwRIRxSOmBI++RR7bMN lOgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=kPxIS+LQrrhxi7Eame1RQNPrYQBPPNss7eTNHNv+3lM=; b=kmwtTdhU02UENVvZsfwEsHPhoUD17gWXQvQUAwwiT/XqKDEy1bWj5Xkuajhyl+wMd6 BwLdnoio7IfjhjrcLqUeDABdzv0JK+icJXS/r69ovWMknuMngTBMBo+bLslaGkuVv0nZ JjBAWgYcrmW1AxrK4bx0d7N2iokBVjxuSC3WFHpVaI3JUy8+o0lYpFX+Xv/5ZvRCkKA3 Ha/n+7/Uewwe4jX52wfAvw/xB7tQc/eCqw9R4S/9xpwylxBuV/QlpU7gu7CJj9VeIczX 9RkP9Hu/qD5EjHMSe5SXKKJuGPtjoCEme6VUIbhPTMjUhgXjvRQeJSb9kxLDRZE/1Tzw UnXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bxoGJiRe; 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 m126-20020a255884000000b0064726e1db64si8680389ybb.637.2022.04.26.10.14.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 10:14:31 -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=bxoGJiRe; 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]:57386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOlh-0007dD-Qm for patch@linaro.org; Tue, 26 Apr 2022 13:14:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO90-0002Qf-K7 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:34:30 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:41743) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO8y-0004N6-Pq for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:34:30 -0400 Received: by mail-pl1-x631.google.com with SMTP id s14so30701144plk.8 for ; Tue, 26 Apr 2022 09:34:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kPxIS+LQrrhxi7Eame1RQNPrYQBPPNss7eTNHNv+3lM=; b=bxoGJiRe37S552M0O4XuxvuVIrEhxICi8kCQhmTYATI4lk2FO8NxJVDHWYY2eNCbMt oz66wPo7eQ1xVM4CRV/puJZjy5K4g0rca/uXDKj/r1NdazXN/D2ERehtE71NULzFtF8/ ipGTAVcML4IHW3ZY7V3PuhMoOytl3NDDvgak5+Jnvp3R5/l8rHpppoQ/M+0DBmjIfScw 8BwrSoCRJODy5ZXTJIy5+vm2MfAl3j2+mAD9ie+HpEWDAFFgkPlOMd3i89VI02iNsmNW 9MaGdICRBKPcs9GBDjtGM7O9zf+LnsY6egr/sDipc0O4ERJbYPlxGX6th1wpbpSRM9dW eraQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kPxIS+LQrrhxi7Eame1RQNPrYQBPPNss7eTNHNv+3lM=; b=XwlfqEXNxP4OnDObOSscaYS2hEFl6yQ0wVlCw5Ia1PjazAirsbjEbKg8c+D3DExa8E osivuC29EphUXU0mNcYeX0MtH2ze/9cFy4pc2eNpHCLJd+aMxqjurzB9CKMIiyW5QRzB WwBC0+T5D5pdiAssrZf/UmLHeSUocM/LqoPX4sahN4Tzif5ugemPTMbrjwK3iQx29Oe5 cjnBS9TBvDBeFIDVT30eIyYfxWnnf8BnAjEGy8LAFtBi+a9IQyRR91oggFrsR1FrUSRH FswGxz2rtg6nFkXLK2fxtxhihguKQKKlDw8Q58NX+S5GbeCjAulIxERAkClAojPjIu/V 2zYw== X-Gm-Message-State: AOAM533l7CLpGnqpdJet8Yr4biWL8P3rN2xxlCI2QX3xPkJloi1A5Ryv HwIkDEb30PI0n3TlwjfU1wfJJvU/Vo2nLA== X-Received: by 2002:a17:90a:4bc2:b0:1b8:cdd3:53e2 with SMTP id u2-20020a17090a4bc200b001b8cdd353e2mr37949436pjl.219.1650990867473; Tue, 26 Apr 2022 09:34:27 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id a13-20020a17090acb8d00b001d953eb2412sm1132834pju.19.2022.04.26.09.34.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:34:27 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 45/47] target/arm: Use tcg_constant for predicate descriptors Date: Tue, 26 Apr 2022 09:30:41 -0700 Message-Id: <20220426163043.100432-46-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" In these cases, 't' did double-duty as zero source and temporary destination. Split the two uses. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-sve.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index a684d489d2..e812f910ce 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -282,13 +282,12 @@ static void do_predtest(DisasContext *s, int dofs, int gofs, int words) { TCGv_ptr dptr = tcg_temp_new_ptr(); TCGv_ptr gptr = tcg_temp_new_ptr(); - TCGv_i32 t; + TCGv_i32 t = tcg_temp_new_i32(); tcg_gen_addi_ptr(dptr, cpu_env, dofs); tcg_gen_addi_ptr(gptr, cpu_env, gofs); - t = tcg_const_i32(words); - gen_helper_sve_predtest(t, dptr, gptr, t); + gen_helper_sve_predtest(t, dptr, gptr, tcg_constant_i32(words)); tcg_temp_free_ptr(dptr); tcg_temp_free_ptr(gptr); @@ -1880,9 +1879,9 @@ static bool do_pfirst_pnext(DisasContext *s, arg_rr_esz *a, tcg_gen_addi_ptr(t_pd, cpu_env, pred_full_reg_offset(s, a->rd)); tcg_gen_addi_ptr(t_pg, cpu_env, pred_full_reg_offset(s, a->rn)); - t = tcg_const_i32(desc); + t = tcg_temp_new_i32(); - gen_fn(t, t_pd, t_pg, t); + gen_fn(t, t_pd, t_pg, tcg_constant_i32(desc)); tcg_temp_free_ptr(t_pd); tcg_temp_free_ptr(t_pg); @@ -3176,7 +3175,7 @@ static bool do_ppzz_flags(DisasContext *s, arg_rprr_esz *a, } vsz = vec_full_reg_size(s); - t = tcg_const_i32(simd_desc(vsz, vsz, 0)); + t = tcg_temp_new_i32(); pd = tcg_temp_new_ptr(); zn = tcg_temp_new_ptr(); zm = tcg_temp_new_ptr(); @@ -3187,7 +3186,7 @@ static bool do_ppzz_flags(DisasContext *s, arg_rprr_esz *a, tcg_gen_addi_ptr(zm, cpu_env, vec_full_reg_offset(s, a->rm)); tcg_gen_addi_ptr(pg, cpu_env, pred_full_reg_offset(s, a->pg)); - gen_fn(t, pd, zn, zm, pg, t); + gen_fn(t, pd, zn, zm, pg, tcg_constant_i32(simd_desc(vsz, vsz, 0))); tcg_temp_free_ptr(pd); tcg_temp_free_ptr(zn); @@ -3261,7 +3260,7 @@ static bool do_ppzi_flags(DisasContext *s, arg_rpri_esz *a, } vsz = vec_full_reg_size(s); - t = tcg_const_i32(simd_desc(vsz, vsz, a->imm)); + t = tcg_temp_new_i32(); pd = tcg_temp_new_ptr(); zn = tcg_temp_new_ptr(); pg = tcg_temp_new_ptr(); @@ -3270,7 +3269,7 @@ static bool do_ppzi_flags(DisasContext *s, arg_rpri_esz *a, tcg_gen_addi_ptr(zn, cpu_env, vec_full_reg_offset(s, a->rn)); tcg_gen_addi_ptr(pg, cpu_env, pred_full_reg_offset(s, a->pg)); - gen_fn(t, pd, zn, pg, t); + gen_fn(t, pd, zn, pg, tcg_constant_i32(simd_desc(vsz, vsz, a->imm))); tcg_temp_free_ptr(pd); tcg_temp_free_ptr(zn); From patchwork Tue Apr 26 16:30:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566062 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3787443map; Tue, 26 Apr 2022 10:19:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/jGIV2lA+JjUKuoOiqUczuRAMRkd4816EVxRnKOMzle/qXzxS2aAn5vSE54+EzOhSVmkF X-Received: by 2002:a05:6902:2cf:b0:648:4029:ab1b with SMTP id w15-20020a05690202cf00b006484029ab1bmr14639483ybh.60.1650993585678; Tue, 26 Apr 2022 10:19:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650993585; cv=none; d=google.com; s=arc-20160816; b=baTLBiNy/kB7ljKWUslXKz0vNc697vgOX2soKa4oTDocJnKwOL1BAtWpUJmS92oL5y 7l00lJHQK1nVVwiItimh3qkjYmBcbbJrG6S0Zvz8ZxVzFZIoPR4PAJhS9mBj2AWtP2dA PBcNXddYGnKdzM/Me4X2jV5ONgvEKIpsevCJB8eKs7jWnXytfcseMAo9/t7A5H1OUKdb wUVz/orrA4liJPCfDxkxOnSzZ8gn+K+KP047osJmlR6ENpEzFd4+OmgHDo0aGS04MciJ Z1sCirL/u3z6caYOopRfB1xWgJbUU6Wyec2g2b/V/kX0LHtB9kHgbjspb1K+FIcJThie 7tOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=Afr+fFSTar2ikBbmWUyJU+wGoh0H9JIJV+912Nb1UHs=; b=SyNjizZdMBWn7iMmna1x3PH+1XcuosH+r79jVi8OOymZ7DcQmx5yQo2XnGwaYgbnuo 2NIi7pnSwKFLtNbDlnJOkSkEdwCXA+DkeOJgKNl37Rlo/imPf5GFW2wgRLKdxrhnQpRP RbuHr4SawdYy5MTbppt4hYdNL1fr1bRBONeRRd6V+QomFJ8cdvJoBQUAQ5znv+xAlEAE YhrDiQ8YK4wxuuWvnkqjEqLUxp9f221Rrf/cIxlqrIYaBqFQR7OA+UgNrXXZgKwSVMP0 sL82BGs4Sdy0ZtFUcnoXAfTM0fNKD+HJMI29woXjPbeSkX+a1TY/NmNPpJIYghtMREWm a9dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XQACcMmh; 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 x3-20020a254a03000000b00633994043casi14146473yba.52.2022.04.26.10.19.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 10:19:45 -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=XQACcMmh; 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]:40534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOqn-0007IB-7T for patch@linaro.org; Tue, 26 Apr 2022 13:19:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47146) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO91-0002St-DY for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:34:31 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:39829) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO8z-0004NV-Id for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:34:31 -0400 Received: by mail-pj1-x1033.google.com with SMTP id bd19-20020a17090b0b9300b001d98af6dcd1so2598360pjb.4 for ; Tue, 26 Apr 2022 09:34:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Afr+fFSTar2ikBbmWUyJU+wGoh0H9JIJV+912Nb1UHs=; b=XQACcMmhJzmWZIGcg5Yp1vN0pLjo4DomsvhGBBNm/6Gl+e+eIhBX+hPF3PTk8HvFod 9DjXX33CMjmciqHOUPEg3GSQTonAa0VWxez5YNM1QNYN6QGcDpBssMr/qHedC+U/JSLG qZLnXwJVJa9/fcO6Qc9x+6fCIrtObb8ksPi4I0Xj+Fdkzrt57AIwAoBBGU1/17dH8leX XY9wvNbB6IMs+OWL5KDQx1d9Y4mRoESAtL4zO1WS6+yQGu7x//E3RC4OTtzJsqpkgxyV cUieWuEVaL+guzowb0tQPvWu9/ScxiZl9UkW4jPswlcYcFn6BqsHVRVx+3UWDcT1G6Rt hnvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Afr+fFSTar2ikBbmWUyJU+wGoh0H9JIJV+912Nb1UHs=; b=SkdHJwstQP7ARnUv+aQVtWkxZrTtyZQJCtcE6cJZV6vAOAuyX15XtO35hPO5Gq6+qX JsQm3dpnvzbziQEqel12/s7TI4fr3mcQsICzmxIIUBcjFPNzkV8/AW8R064Lh4qEiUvJ gHJBXTkXoceXnQ80jvdVOObUM9Q6QCp9xpBF/j0Jc0cLcnCkni2E+fngJE3w/yFrVdQa C3czk3GaBgiSM8INwgVJvsCbzrPomRgAOZeVs2/oDQwTBmcNyfWw1i65y2GqFt9tpLhf kgoKtUt8x5EHcpTW8GXrfcUCBA2gnCm01U74IW5q5tPLDN6dVn3NjziklQnggbW8wgAj ol+A== X-Gm-Message-State: AOAM530hjPOsWj2P0T8TKGS0pHXGqXnu9Dm3ZUj7e35IK5gW1+6vcQIV JZkGNK27caCUmExu0IeqXvuECZoWwoANzw== X-Received: by 2002:a17:90a:af98:b0:1d4:67d4:d122 with SMTP id w24-20020a17090aaf9800b001d467d4d122mr27750778pjq.166.1650990868180; Tue, 26 Apr 2022 09:34:28 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id a13-20020a17090acb8d00b001d953eb2412sm1132834pju.19.2022.04.26.09.34.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:34:27 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 46/47] target/arm: Use tcg_constant for do_brk{2,3} Date: Tue, 26 Apr 2022 09:30:42 -0700 Message-Id: <20220426163043.100432-47-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1033.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" In these cases, 't' did double-duty as zero source and temporary destination. Split the two uses and narrow the scope of the temp. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-sve.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index e812f910ce..82bf094447 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3322,7 +3322,7 @@ static bool do_brk3(DisasContext *s, arg_rprr_s *a, TCGv_ptr n = tcg_temp_new_ptr(); TCGv_ptr m = tcg_temp_new_ptr(); TCGv_ptr g = tcg_temp_new_ptr(); - TCGv_i32 t = tcg_const_i32(FIELD_DP32(0, PREDDESC, OPRSZ, vsz)); + TCGv_i32 desc = tcg_constant_i32(FIELD_DP32(0, PREDDESC, OPRSZ, vsz)); tcg_gen_addi_ptr(d, cpu_env, pred_full_reg_offset(s, a->rd)); tcg_gen_addi_ptr(n, cpu_env, pred_full_reg_offset(s, a->rn)); @@ -3330,16 +3330,17 @@ static bool do_brk3(DisasContext *s, arg_rprr_s *a, tcg_gen_addi_ptr(g, cpu_env, pred_full_reg_offset(s, a->pg)); if (a->s) { - fn_s(t, d, n, m, g, t); + TCGv_i32 t = tcg_temp_new_i32(); + fn_s(t, d, n, m, g, desc); do_pred_flags(t); + tcg_temp_free_i32(t); } else { - fn(d, n, m, g, t); + fn(d, n, m, g, desc); } tcg_temp_free_ptr(d); tcg_temp_free_ptr(n); tcg_temp_free_ptr(m); tcg_temp_free_ptr(g); - tcg_temp_free_i32(t); return true; } @@ -3356,22 +3357,23 @@ static bool do_brk2(DisasContext *s, arg_rpr_s *a, TCGv_ptr d = tcg_temp_new_ptr(); TCGv_ptr n = tcg_temp_new_ptr(); TCGv_ptr g = tcg_temp_new_ptr(); - TCGv_i32 t = tcg_const_i32(FIELD_DP32(0, PREDDESC, OPRSZ, vsz)); + TCGv_i32 desc = tcg_constant_i32(FIELD_DP32(0, PREDDESC, OPRSZ, vsz)); tcg_gen_addi_ptr(d, cpu_env, pred_full_reg_offset(s, a->rd)); tcg_gen_addi_ptr(n, cpu_env, pred_full_reg_offset(s, a->rn)); tcg_gen_addi_ptr(g, cpu_env, pred_full_reg_offset(s, a->pg)); if (a->s) { - fn_s(t, d, n, g, t); + TCGv_i32 t = tcg_temp_new_i32(); + fn_s(t, d, n, g, desc); do_pred_flags(t); + tcg_temp_free_i32(t); } else { - fn(d, n, g, t); + fn(d, n, g, desc); } tcg_temp_free_ptr(d); tcg_temp_free_ptr(n); tcg_temp_free_ptr(g); - tcg_temp_free_i32(t); return true; } From patchwork Tue Apr 26 16:30:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566061 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3786858map; Tue, 26 Apr 2022 10:18:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxN7IJNTPVlb1J3rvgsqrD80bAm0ZYpqpySdm+mlbk+YineAfYSQ2S5WgypCWUtdeAFGinC X-Received: by 2002:a81:57c6:0:b0:2f4:d5b6:dc94 with SMTP id l189-20020a8157c6000000b002f4d5b6dc94mr22429135ywb.90.1650993538857; Tue, 26 Apr 2022 10:18:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650993538; cv=none; d=google.com; s=arc-20160816; b=vKRsGwPwW7LX5qHOl1e4EszLmzXGjzArZdVCjPzYAmQiH9Qq7dMRd/FFmlXeqy0wtV KmnAfao2CB+ot+A8mwZ47QWQGKRhNQPbJJlMv6JBEXYhxOcu5KOagTbeJPW9VqAyhLP6 VYc1CG/xoBMsTxJFL3HrAlt0fZO8e00s2FZZlIMRKp5bREzJAg40l/vhBUBcy8s2Wlp0 lLTEzBaH2+g4wSZ52X0U7wOL5AYPMRQ3QBSlp3zhngrqKKVlm8QAhYgozItqSkVlTqZ9 AiLLBelfDuao3rhLieOh37zBVeYg/GuG5zUJ8sH++WYg33s9SD8uiFx4MtR3bOaKvEoB MgWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=40ck44OW/2AAXYFbuytVYTaszbOW+Vcyas+8jB0+QD8=; b=Qhr+vDCf1NPxfxNEAkj+VjnRZRxsUEJckSFyPKjfQiJYuay1ts14tAoFdM7nbZMitH zmm0gePxQvuDhXQoVOY15C4EUVX8D5KmB5BBP4MYv/EUDOx505stFf3UImy+34I851b7 WOjn2+F3E19Y8+J9eikJ/SzkMPetXXeSF7U4luR77OS3mGcjWtMYpv/paHB2yRnfudbH 7ox3A1elMYGLamscdV6efOSlDvdjbux/taYG3uK1/oL/Fg7yb51d6+TATorlpYJXJNxW lnziSmyI/3hA5Q9woWGp+7Ur0BQ+azfcKnAYhjmJdQdLVPNn6ufyfkyR4jH1BquDxmjo FnmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QueI3SDE; 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 131-20020a250389000000b0064546fb1d85si17881173ybd.611.2022.04.26.10.18.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 10:18:58 -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=QueI3SDE; 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]:37440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOq2-0005DP-BF for patch@linaro.org; Tue, 26 Apr 2022 13:18:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO92-0002Vw-Hi for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:34:32 -0400 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]:46773) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO90-0004Nl-DZ for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:34:32 -0400 Received: by mail-pg1-x531.google.com with SMTP id q12so16476504pgj.13 for ; Tue, 26 Apr 2022 09:34:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=40ck44OW/2AAXYFbuytVYTaszbOW+Vcyas+8jB0+QD8=; b=QueI3SDEfxI43FPF7e+H5I620JM6aOzHzNmQydwrUmUjggYux9HRE889EQoMHbU2Za hIezvIWewkiFNXPvNhs0UZLcwu0e+p8bqGpfYUPREQMl26LoJOn2cFZG9vU57qUxUudf IqWkIXrEIkmMUdxvdsPF1gXJAmyrKp7LhAOjVtdCtJZlE0/PWhAz2UfmXMVuXe37QpZu WPUnEsnsw2cGSr+3ywlB0h+YP2Y1/bAZ4gKQh025kEdbZTC5800fbD20UjXbKSmkZph3 9Pr0izATyRTOgLjIFuXoiiRuMSnCEKqu+zVs9esEabmHLHW1GpfudFdZIwuNg6xcEIij NxHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=40ck44OW/2AAXYFbuytVYTaszbOW+Vcyas+8jB0+QD8=; b=crolwWpmnbQUrqiF0SNmv2FBHsb4LTCu6J7Ckt2UT7PWtTmWqhEZPYKF6kIVMxhluS b3yalDfq1a3ryyzXOhenbVFQX+N3igRccz4aVQWy0H1sbk3EzIab+HW54doSBvyxWfN1 OUNCMPZANuBDA8Xl0dv5cL5bs8C+cOgs4IU6ecNr4Ei0cUlIcTNbny1UgntPVt5fu6gt Sbvr6xRWvAIKQhPOkpEAplRil/s8TggenARPZQ9LwqAzta1yX74HxgpBV2IE5HyW1IAc XifL6XgXfkTzGDOF0/yUwTP3ygRks7FaPQZfhPpWlzxt0jaLURTPIgEJvu//2L9GqpeO UMiA== X-Gm-Message-State: AOAM533y0fp133+JxcWXBt2H7OaxeRlRK4/Nt5y8164q7h44NppbNqzB wdoiJ+TL3fadU1dr9zdmnT2XX4LGMz/P/A== X-Received: by 2002:a63:ad4d:0:b0:378:4b82:b881 with SMTP id y13-20020a63ad4d000000b003784b82b881mr20940899pgo.282.1650990868946; Tue, 26 Apr 2022 09:34:28 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id a13-20020a17090acb8d00b001d953eb2412sm1132834pju.19.2022.04.26.09.34.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:34:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 47/47] target/arm: Use tcg_constant for vector descriptor Date: Tue, 26 Apr 2022 09:30:43 -0700 Message-Id: <20220426163043.100432-48-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::531; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x531.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-sve.c | 54 ++++++++++---------------------------- 1 file changed, 14 insertions(+), 40 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 82bf094447..dd4a5b23ab 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -888,7 +888,7 @@ static bool do_vpz_ool(DisasContext *s, arg_rpr_esz *a, return true; } - desc = tcg_const_i32(simd_desc(vsz, vsz, 0)); + desc = tcg_constant_i32(simd_desc(vsz, vsz, 0)); temp = tcg_temp_new_i64(); t_zn = tcg_temp_new_ptr(); t_pg = tcg_temp_new_ptr(); @@ -898,7 +898,6 @@ static bool do_vpz_ool(DisasContext *s, arg_rpr_esz *a, fn(temp, t_zn, t_pg, desc); tcg_temp_free_ptr(t_zn); tcg_temp_free_ptr(t_pg); - tcg_temp_free_i32(desc); write_fp_dreg(s, a->rd, temp); tcg_temp_free_i64(temp); @@ -1235,7 +1234,7 @@ static void do_index(DisasContext *s, int esz, int rd, TCGv_i64 start, TCGv_i64 incr) { unsigned vsz = vec_full_reg_size(s); - TCGv_i32 desc = tcg_const_i32(simd_desc(vsz, vsz, 0)); + TCGv_i32 desc = tcg_constant_i32(simd_desc(vsz, vsz, 0)); TCGv_ptr t_zd = tcg_temp_new_ptr(); tcg_gen_addi_ptr(t_zd, cpu_env, vec_full_reg_offset(s, rd)); @@ -1259,7 +1258,6 @@ static void do_index(DisasContext *s, int esz, int rd, tcg_temp_free_i32(i32); } tcg_temp_free_ptr(t_zd); - tcg_temp_free_i32(desc); } static bool trans_INDEX_ii(DisasContext *s, arg_INDEX_ii *a) @@ -1988,7 +1986,7 @@ static void do_sat_addsub_vec(DisasContext *s, int esz, int rd, int rn, nptr = tcg_temp_new_ptr(); tcg_gen_addi_ptr(dptr, cpu_env, vec_full_reg_offset(s, rd)); tcg_gen_addi_ptr(nptr, cpu_env, vec_full_reg_offset(s, rn)); - desc = tcg_const_i32(simd_desc(vsz, vsz, 0)); + desc = tcg_constant_i32(simd_desc(vsz, vsz, 0)); switch (esz) { case MO_8: @@ -2057,7 +2055,6 @@ static void do_sat_addsub_vec(DisasContext *s, int esz, int rd, int rn, tcg_temp_free_ptr(dptr); tcg_temp_free_ptr(nptr); - tcg_temp_free_i32(desc); } static bool trans_CNT_r(DisasContext *s, arg_CNT_r *a) @@ -2233,7 +2230,7 @@ static void do_cpy_m(DisasContext *s, int esz, int rd, int rn, int pg, gen_helper_sve_cpy_m_s, gen_helper_sve_cpy_m_d, }; unsigned vsz = vec_full_reg_size(s); - TCGv_i32 desc = tcg_const_i32(simd_desc(vsz, vsz, 0)); + TCGv_i32 desc = tcg_constant_i32(simd_desc(vsz, vsz, 0)); TCGv_ptr t_zd = tcg_temp_new_ptr(); TCGv_ptr t_zn = tcg_temp_new_ptr(); TCGv_ptr t_pg = tcg_temp_new_ptr(); @@ -2247,7 +2244,6 @@ static void do_cpy_m(DisasContext *s, int esz, int rd, int rn, int pg, tcg_temp_free_ptr(t_zd); tcg_temp_free_ptr(t_zn); tcg_temp_free_ptr(t_pg); - tcg_temp_free_i32(desc); } static bool trans_FCPY(DisasContext *s, arg_FCPY *a) @@ -2390,7 +2386,7 @@ static void do_insr_i64(DisasContext *s, arg_rrr_esz *a, TCGv_i64 val) gen_helper_sve_insr_s, gen_helper_sve_insr_d, }; unsigned vsz = vec_full_reg_size(s); - TCGv_i32 desc = tcg_const_i32(simd_desc(vsz, vsz, 0)); + TCGv_i32 desc = tcg_constant_i32(simd_desc(vsz, vsz, 0)); TCGv_ptr t_zd = tcg_temp_new_ptr(); TCGv_ptr t_zn = tcg_temp_new_ptr(); @@ -2401,7 +2397,6 @@ static void do_insr_i64(DisasContext *s, arg_rrr_esz *a, TCGv_i64 val) tcg_temp_free_ptr(t_zd); tcg_temp_free_ptr(t_zn); - tcg_temp_free_i32(desc); } static bool trans_INSR_f(DisasContext *s, arg_rrr_esz *a) @@ -2520,7 +2515,6 @@ static bool do_perm_pred3(DisasContext *s, arg_rrr_esz *a, bool high_odd, TCGv_ptr t_d = tcg_temp_new_ptr(); TCGv_ptr t_n = tcg_temp_new_ptr(); TCGv_ptr t_m = tcg_temp_new_ptr(); - TCGv_i32 t_desc; uint32_t desc = 0; desc = FIELD_DP32(desc, PREDDESC, OPRSZ, vsz); @@ -2530,14 +2524,12 @@ static bool do_perm_pred3(DisasContext *s, arg_rrr_esz *a, bool high_odd, tcg_gen_addi_ptr(t_d, cpu_env, pred_full_reg_offset(s, a->rd)); tcg_gen_addi_ptr(t_n, cpu_env, pred_full_reg_offset(s, a->rn)); tcg_gen_addi_ptr(t_m, cpu_env, pred_full_reg_offset(s, a->rm)); - t_desc = tcg_const_i32(desc); - fn(t_d, t_n, t_m, t_desc); + fn(t_d, t_n, t_m, tcg_constant_i32(desc)); tcg_temp_free_ptr(t_d); tcg_temp_free_ptr(t_n); tcg_temp_free_ptr(t_m); - tcg_temp_free_i32(t_desc); return true; } @@ -2551,7 +2543,6 @@ static bool do_perm_pred2(DisasContext *s, arg_rr_esz *a, bool high_odd, unsigned vsz = pred_full_reg_size(s); TCGv_ptr t_d = tcg_temp_new_ptr(); TCGv_ptr t_n = tcg_temp_new_ptr(); - TCGv_i32 t_desc; uint32_t desc = 0; tcg_gen_addi_ptr(t_d, cpu_env, pred_full_reg_offset(s, a->rd)); @@ -2560,11 +2551,9 @@ static bool do_perm_pred2(DisasContext *s, arg_rr_esz *a, bool high_odd, desc = FIELD_DP32(desc, PREDDESC, OPRSZ, vsz); desc = FIELD_DP32(desc, PREDDESC, ESZ, a->esz); desc = FIELD_DP32(desc, PREDDESC, DATA, high_odd); - t_desc = tcg_const_i32(desc); - fn(t_d, t_n, t_desc); + fn(t_d, t_n, tcg_constant_i32(desc)); - tcg_temp_free_i32(t_desc); tcg_temp_free_ptr(t_d); tcg_temp_free_ptr(t_n); return true; @@ -2766,18 +2755,15 @@ static void find_last_active(DisasContext *s, TCGv_i32 ret, int esz, int pg) * round up, as we do elsewhere, because we need the exact size. */ TCGv_ptr t_p = tcg_temp_new_ptr(); - TCGv_i32 t_desc; unsigned desc = 0; desc = FIELD_DP32(desc, PREDDESC, OPRSZ, pred_full_reg_size(s)); desc = FIELD_DP32(desc, PREDDESC, ESZ, esz); tcg_gen_addi_ptr(t_p, cpu_env, pred_full_reg_offset(s, pg)); - t_desc = tcg_const_i32(desc); - gen_helper_sve_last_active_element(ret, t_p, t_desc); + gen_helper_sve_last_active_element(ret, t_p, tcg_constant_i32(desc)); - tcg_temp_free_i32(t_desc); tcg_temp_free_ptr(t_p); } @@ -3442,19 +3428,16 @@ static void do_cntp(DisasContext *s, TCGv_i64 val, int esz, int pn, int pg) TCGv_ptr t_pn = tcg_temp_new_ptr(); TCGv_ptr t_pg = tcg_temp_new_ptr(); unsigned desc = 0; - TCGv_i32 t_desc; desc = FIELD_DP32(desc, PREDDESC, OPRSZ, psz); desc = FIELD_DP32(desc, PREDDESC, ESZ, esz); tcg_gen_addi_ptr(t_pn, cpu_env, pred_full_reg_offset(s, pn)); tcg_gen_addi_ptr(t_pg, cpu_env, pred_full_reg_offset(s, pg)); - t_desc = tcg_const_i32(desc); - gen_helper_sve_cntp(val, t_pn, t_pg, t_desc); + gen_helper_sve_cntp(val, t_pn, t_pg, tcg_constant_i32(desc)); tcg_temp_free_ptr(t_pn); tcg_temp_free_ptr(t_pg); - tcg_temp_free_i32(t_desc); } } @@ -4190,7 +4173,7 @@ static void do_reduce(DisasContext *s, arg_rpr_esz *a, { unsigned vsz = vec_full_reg_size(s); unsigned p2vsz = pow2ceil(vsz); - TCGv_i32 t_desc = tcg_const_i32(simd_desc(vsz, vsz, p2vsz)); + TCGv_i32 t_desc = tcg_constant_i32(simd_desc(vsz, vsz, p2vsz)); TCGv_ptr t_zn, t_pg, status; TCGv_i64 temp; @@ -4206,7 +4189,6 @@ static void do_reduce(DisasContext *s, arg_rpr_esz *a, tcg_temp_free_ptr(t_zn); tcg_temp_free_ptr(t_pg); tcg_temp_free_ptr(status); - tcg_temp_free_i32(t_desc); write_fp_dreg(s, a->rd, temp); tcg_temp_free_i64(temp); @@ -4383,11 +4365,10 @@ static bool trans_FADDA(DisasContext *s, arg_rprr_esz *a) tcg_gen_addi_ptr(t_rm, cpu_env, vec_full_reg_offset(s, a->rm)); tcg_gen_addi_ptr(t_pg, cpu_env, pred_full_reg_offset(s, a->pg)); t_fpst = fpstatus_ptr(a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); - t_desc = tcg_const_i32(simd_desc(vsz, vsz, 0)); + t_desc = tcg_constant_i32(simd_desc(vsz, vsz, 0)); fns[a->esz - 1](t_val, t_val, t_rm, t_pg, t_fpst, t_desc); - tcg_temp_free_i32(t_desc); tcg_temp_free_ptr(t_fpst); tcg_temp_free_ptr(t_pg); tcg_temp_free_ptr(t_rm); @@ -4504,10 +4485,9 @@ static void do_fp_scalar(DisasContext *s, int zd, int zn, int pg, bool is_fp16, tcg_gen_addi_ptr(t_pg, cpu_env, pred_full_reg_offset(s, pg)); status = fpstatus_ptr(is_fp16 ? FPST_FPCR_F16 : FPST_FPCR); - desc = tcg_const_i32(simd_desc(vsz, vsz, 0)); + desc = tcg_constant_i32(simd_desc(vsz, vsz, 0)); fn(t_zd, t_zn, t_pg, scalar, status, desc); - tcg_temp_free_i32(desc); tcg_temp_free_ptr(status); tcg_temp_free_ptr(t_pg); tcg_temp_free_ptr(t_zn); @@ -5265,7 +5245,6 @@ static void do_mem_zpa(DisasContext *s, int zt, int pg, TCGv_i64 addr, { unsigned vsz = vec_full_reg_size(s); TCGv_ptr t_pg; - TCGv_i32 t_desc; int desc = 0; /* @@ -5287,14 +5266,12 @@ static void do_mem_zpa(DisasContext *s, int zt, int pg, TCGv_i64 addr, } desc = simd_desc(vsz, vsz, zt | desc); - t_desc = tcg_const_i32(desc); t_pg = tcg_temp_new_ptr(); tcg_gen_addi_ptr(t_pg, cpu_env, pred_full_reg_offset(s, pg)); - fn(cpu_env, t_pg, addr, t_desc); + fn(cpu_env, t_pg, addr, tcg_constant_i32(desc)); tcg_temp_free_ptr(t_pg); - tcg_temp_free_i32(t_desc); } /* Indexed by [mte][be][dtype][nreg] */ @@ -6037,7 +6014,6 @@ static void do_mem_zpz(DisasContext *s, int zt, int pg, int zm, TCGv_ptr t_zm = tcg_temp_new_ptr(); TCGv_ptr t_pg = tcg_temp_new_ptr(); TCGv_ptr t_zt = tcg_temp_new_ptr(); - TCGv_i32 t_desc; int desc = 0; if (s->mte_active[0]) { @@ -6049,17 +6025,15 @@ static void do_mem_zpz(DisasContext *s, int zt, int pg, int zm, desc <<= SVE_MTEDESC_SHIFT; } desc = simd_desc(vsz, vsz, desc | scale); - t_desc = tcg_const_i32(desc); tcg_gen_addi_ptr(t_pg, cpu_env, pred_full_reg_offset(s, pg)); tcg_gen_addi_ptr(t_zm, cpu_env, vec_full_reg_offset(s, zm)); tcg_gen_addi_ptr(t_zt, cpu_env, vec_full_reg_offset(s, zt)); - fn(cpu_env, t_zt, t_pg, t_zm, scalar, t_desc); + fn(cpu_env, t_zt, t_pg, t_zm, scalar, tcg_constant_i32(desc)); tcg_temp_free_ptr(t_zt); tcg_temp_free_ptr(t_zm); tcg_temp_free_ptr(t_pg); - tcg_temp_free_i32(t_desc); } /* Indexed by [mte][be][ff][xs][u][msz]. */