From patchwork Wed Mar 1 02:56:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 657780 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp3271283wrb; Tue, 28 Feb 2023 19:03:17 -0800 (PST) X-Google-Smtp-Source: AK7set9XcUOSRXHUTb2nLfLX488AtrqDC+K9fVx5lk7wbbM1tKKhdYo4q/Pc2OoFr87EUPfMBEBu X-Received: by 2002:ac8:7f89:0:b0:3bf:c346:a743 with SMTP id z9-20020ac87f89000000b003bfc346a743mr9445332qtj.39.1677639797301; Tue, 28 Feb 2023 19:03:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677639797; cv=none; d=google.com; s=arc-20160816; b=n/cUfT8Uitagy5zUFeVCT/tGJvVxyGUgLGtf+4FzbVUsAqTonEll+FOlKzZ4FaA/Yv dTTQ08ZPVfAuiEEUwdgxfhQX4lVke4OvNPSn8ug6A4TVUOsD3NYcYn97+hUU8GSPJ8Ya p2BqYPgKXrmu5SMaOQ8WSL9wOQpoyWow/6VXbZKl7Tgh0sgQKvpGFDRz8AG1u1Lfzg24 T7JledTWqkhYqAFaIwNuPME75rb9qXAYSBK8VKHGafUWBuZ9HC1e+q6/iEZPGL91f+8e PaE55ODNqPkC7D3cpI7EUWJMFslTPZ/pjD247dbI6FluHq1yXWJ6PHLhqPz+A5mMqLh1 aPJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DKuK62hxv2vXEM1ktPotl0poAfziKcuIlZAl/cEb0MU=; b=iIyHbvFjN2H+Na4uWI7UQLJbAaDh64b1xF/IIJRG4ULXbNaCCwjixoauHR+MKXmGlD scurzh1815xayWqE+HNl/Q7FkTjPbdQD5GEITxu3FrAXm/yrKwBS9KZ8W9MlwE2t2sQL jk8xbOj6HtrEfevXaWMYTWMQJhj4QxFjOuF61sMFIcvHT6BP8GdjrGc+vzNNOfaNpJEj 9efWjUzNq2VDfpL7r+qyQTv6YLcbYglGcUgO3w3v3MrrjfJDFboJkE24fPvlYPwrx5UL AbALZPSu9fYKcPn8ofqFPKjMLpnzyjD4MOXY7NtTzYOOSRR7dWE5z/piUInA0raFzVA+ 2yrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y61lSzMT; 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 o11-20020ac87c4b000000b003bfc346a74dsi10957989qtv.266.2023.02.28.19.03.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Feb 2023 19:03:17 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y61lSzMT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXCie-0002zv-NP; Tue, 28 Feb 2023 22:01:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXCib-0002Xs-DF for qemu-devel@nongnu.org; Tue, 28 Feb 2023 22:01:25 -0500 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pXCiI-0004H7-Jx for qemu-devel@nongnu.org; Tue, 28 Feb 2023 22:01:08 -0500 Received: by mail-pl1-x62b.google.com with SMTP id a2so2127757plm.4 for ; Tue, 28 Feb 2023 19:01:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DKuK62hxv2vXEM1ktPotl0poAfziKcuIlZAl/cEb0MU=; b=y61lSzMTlk3P/5yKLDD03ajoGxJYPOB1ToKby5FIVrt4TNisFCNV2IDU9jsO5v/QEr beVzb6Pf0RETC01yaO6qNusclEF1X+XnP+xj5aeMiTq7L8JQtf1rWOWA+Gst8yc+Lo4s N0oXcLsSGp9LvHkOuBTXAh05nurm2kRFen1EVfBk1Cks+fXZLdPVKjmpIVbxkawqLt6u eHn7CBzvJT8wNzS6kmQTp5l4fbV3AHf/+mQFoZGhmSqIVObft2sPw0z9l859vokmtX0x ieoAAvqwNvuitVAcl+6K3mvMLiH3wkV9SKMspj4SwiEcU3ZT7pNY2/Pm64dgIUudokSB Sa2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DKuK62hxv2vXEM1ktPotl0poAfziKcuIlZAl/cEb0MU=; b=7iWY2QjpOCI1AvgcbXfjIZCS0V6u5odQl7iKgX8xZvc5tP1Hobs4l4bp2Hh811NlQX vrLPsOzrmFulZS5vtv5E2phwb581lS91KYm2E+ilmPtq+Op99ApOiyAZeI9dPDE0aayS GfX+d9tEaL6bRUDWZyipHneoK0V/DhNRjkFD9TpwRmtbu2dkOM9ieF3Ul885a38s5FN3 3k27XOlmZuuACspgiJHW1YLT/T/alumTRL5DVS5Nzoc6HFYZNCtvyCW84L/Hkxwim7qv otq3DPCkd1Xb5F/dfnyz08toyLCjTUrdEHfXmBCLT8EgpukL+o2S00IhLJbq+oEcfRYC 1XMw== X-Gm-Message-State: AO0yUKVC0LI85V8TMneUVQWDa768kp0Uuh3Xb0ejyS9Gwxp9hvAKU0hc v891AsdLyQItku+THI6dJmZeZUD7VmMVWF6Bst0= X-Received: by 2002:a17:903:284f:b0:19c:eb9a:76fe with SMTP id kq15-20020a170903284f00b0019ceb9a76femr4001218plb.62.1677639665015; Tue, 28 Feb 2023 19:01:05 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id r11-20020a170902be0b00b0019aca830869sm7181444pls.238.2023.02.28.19.01.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Feb 2023 19:01:04 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 46/62] accel/tcg/plugin: Use tcg_temp_ebb_* Date: Tue, 28 Feb 2023 16:56:27 -1000 Message-Id: <20230301025643.1227244-47-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230301025643.1227244-1-richard.henderson@linaro.org> References: <20230301025643.1227244-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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org All of these uses have quite local scope. Avoid tcg_const_*, because we haven't added a corresponding interface for TEMP_EBB. Use explicit tcg_gen_movi_* instead. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index 17a686bd9e..9b793ac62c 100644 --- a/accel/tcg/plugin-gen.c +++ b/accel/tcg/plugin-gen.c @@ -93,11 +93,13 @@ void HELPER(plugin_vcpu_mem_cb)(unsigned int vcpu_index, static void do_gen_mem_cb(TCGv vaddr, uint32_t info) { - TCGv_i32 cpu_index = tcg_temp_new_i32(); - TCGv_i32 meminfo = tcg_const_i32(info); - TCGv_i64 vaddr64 = tcg_temp_new_i64(); - TCGv_ptr udata = tcg_const_ptr(NULL); + TCGv_i32 cpu_index = tcg_temp_ebb_new_i32(); + TCGv_i32 meminfo = tcg_temp_ebb_new_i32(); + TCGv_i64 vaddr64 = tcg_temp_ebb_new_i64(); + TCGv_ptr udata = tcg_temp_ebb_new_ptr(); + tcg_gen_movi_i32(meminfo, info); + tcg_gen_movi_ptr(udata, 0); tcg_gen_ld_i32(cpu_index, cpu_env, -offsetof(ArchCPU, env) + offsetof(CPUState, cpu_index)); tcg_gen_extu_tl_i64(vaddr64, vaddr); @@ -112,9 +114,10 @@ static void do_gen_mem_cb(TCGv vaddr, uint32_t info) static void gen_empty_udata_cb(void) { - TCGv_i32 cpu_index = tcg_temp_new_i32(); - TCGv_ptr udata = tcg_const_ptr(NULL); /* will be overwritten later */ + TCGv_i32 cpu_index = tcg_temp_ebb_new_i32(); + TCGv_ptr udata = tcg_temp_ebb_new_ptr(); + tcg_gen_movi_ptr(udata, 0); tcg_gen_ld_i32(cpu_index, cpu_env, -offsetof(ArchCPU, env) + offsetof(CPUState, cpu_index)); gen_helper_plugin_vcpu_udata_cb(cpu_index, udata); @@ -129,9 +132,10 @@ static void gen_empty_udata_cb(void) */ static void gen_empty_inline_cb(void) { - TCGv_i64 val = tcg_temp_new_i64(); - TCGv_ptr ptr = tcg_const_ptr(NULL); /* overwritten later */ + TCGv_i64 val = tcg_temp_ebb_new_i64(); + TCGv_ptr ptr = tcg_temp_ebb_new_ptr(); + tcg_gen_movi_ptr(ptr, 0); tcg_gen_ld_i64(val, ptr, 0); /* pass an immediate != 0 so that it doesn't get optimized away */ tcg_gen_addi_i64(val, val, 0xdeadface); @@ -151,9 +155,9 @@ static void gen_empty_mem_cb(TCGv addr, uint32_t info) */ static void gen_empty_mem_helper(void) { - TCGv_ptr ptr; + TCGv_ptr ptr = tcg_temp_ebb_new_ptr(); - ptr = tcg_const_ptr(NULL); + tcg_gen_movi_ptr(ptr, 0); tcg_gen_st_ptr(ptr, cpu_env, offsetof(CPUState, plugin_mem_cbs) - offsetof(ArchCPU, env)); tcg_temp_free_ptr(ptr);