From patchwork Thu Jan 7 20:14:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 358253 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp780927jai; Thu, 7 Jan 2021 12:22:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwjs4oQn3/s73Nng48e5s11dQv8vlC+6Vshoyp9GXhv7lA7I5D1sVpXUQdPAGK/Gzkkl5Zj X-Received: by 2002:a25:8743:: with SMTP id e3mr799945ybn.362.1610050921897; Thu, 07 Jan 2021 12:22:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610050921; cv=none; d=google.com; s=arc-20160816; b=uYACxjyHzyyLnOG9wLW7cnca3MgM9CEIQCWXOAhgxEadDIKt+MRZPgsIebYuMhMuaQ RspRa2UjelIfTeLp+qT9w4AjAI8OmqUUSouvUGapa76pWq9OkTpH+f2zj9ssEy/U+Rv3 3ICmB8PZQ7qFx2aRUHVq02e3iD1AWqcknovcoJwP3KCtyCiDFjHJR2OXEfBs2VZwJsM4 vbjZWqXoAuLpvLrBtw3FQZehWu4VfSGTod0K42kASeksUezmzgwNtL0/WCNRSxXNJdCT ToCOcr2+Ws0/NRqFdPVXWFqqk5sbq0dAhNx8bTsUOutIwzV+GXoXZRVLrBs6HQfZm2kn g8Zw== 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=rtXLHEnFm6PYImUKUfsTMRutoZrBjCY0hpS4NqovFSw=; b=kEtbUaV+LVCi3ML9OPVW53e1H45/5NF4K6HSBIKLbOrKjWdbyP4AesVZBbdkei1kpV F+fo5kSwpXYRbKDGAxbm4xJjjarx/OcRcsuoKLxar5oWwvipGmWPOuuAFT4+ugIFmKQy mui9vTe72YgFKFe2iAZC6t5GiPT34mSArDS6CUVnRrk53YvFS428HnUtZBnccb+8bIev mfaSofcWRWoOsYmS5r4Lxw54k57UkLYdKmTGLfcdoeQ9W9a3SmrbJVlrauw/C+03wlhb DYfvU5qLNo45m4W+SO1hxyQaxiI+gcHbpC7QUiq9/lZNuBa20Ts7Pca85VwZ2HhI+hgn EyoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IDQ37mg0; 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 f21si7049156ybg.275.2021.01.07.12.22.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Jan 2021 12:22:01 -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=IDQ37mg0; 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]:34998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxbnF-00080L-9l for patch@linaro.org; Thu, 07 Jan 2021 15:22:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxbh0-0001BG-Vo for qemu-devel@nongnu.org; Thu, 07 Jan 2021 15:15:35 -0500 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:51490) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kxbgq-0001Zh-1S for qemu-devel@nongnu.org; Thu, 07 Jan 2021 15:15:34 -0500 Received: by mail-pj1-x1033.google.com with SMTP id z12so2113424pjn.1 for ; Thu, 07 Jan 2021 12:15:22 -0800 (PST) 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=rtXLHEnFm6PYImUKUfsTMRutoZrBjCY0hpS4NqovFSw=; b=IDQ37mg04ipoga/gdigKisakv9sEGUi1r0LS5oym5igu9gMjZBcDAIeSXFC4U1jnwI KvbSVeqdS+K4/dwRwt/laxGe8n+8dLO2Izj9lI4hkEgay5TBI0KUzBqkDbbqGTyF+hOj 9rMinCylZAd/6MYHPoLbU2TB7KKXBfHdwmHlYxPaG0FPRbxGV2SykgM+WXZanfskCJy7 sUcH28sTSDA9tfYaxeUGU6rneAWrbouL7WS2xfz7TN1u9m4RHZSI+4Jea6KrhGxdLjQH 6jDEGP1nhF/39eVM8qkZXnRgqaTOz5pmoIzkPs7lMIXU3TwzvqAhbXaR/IXaCnF7fQA4 V1hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rtXLHEnFm6PYImUKUfsTMRutoZrBjCY0hpS4NqovFSw=; b=n9kw/9S9vAdBMd1+K85EfK+wc+1YOkKmJWnUI6/yZIjHK2b5P7TS1Gv1ehRVAyE1o3 I58PDdZr0ljC4Gx5ZGWhqcHQjl/XOabzzW9NK+GBYWMyFb3wRzU8Na+v5Qz1cVGxLp9e /57w7ZWCDJCU++K9OyNl9Y7BnsC6NBrpo+hzc3UO0r7YI2hQYWr3mBKp5SljNLdob7r9 NZSR13z2/OKAlXg/Am7JI9+vnAasjNr39KDn38LC2pLGQpEvAF/K745YUN4BLngY5KGP JdGH554Y0ZY2eGUKeUbanGvYucjv2TeqFuX+24+2ea58uKhGATjgUnTu9kj+FV/4auWQ fI3A== X-Gm-Message-State: AOAM530+Bv0MH75vXl4pNzF+RwaxN+u9UprZZUyrrzkoYqc2H6Ad7kGk 3a3ANfTrbJYoscswWUd07oVt3Ty7G0i0zw== X-Received: by 2002:a17:90a:1c02:: with SMTP id s2mr186707pjs.212.1610050521080; Thu, 07 Jan 2021 12:15:21 -0800 (PST) Received: from localhost.localdomain (rrcs-173-197-107-21.west.biz.rr.com. [173.197.107.21]) by smtp.gmail.com with ESMTPSA id v6sm6516265pfi.31.2021.01.07.12.15.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 12:15:20 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 16/47] tcg: Adjust tcg_register_jit for const Date: Thu, 7 Jan 2021 10:14:17 -1000 Message-Id: <20210107201448.1152301-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107201448.1152301-1-richard.henderson@linaro.org> References: <20210107201448.1152301-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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Joelle van Dyne Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We must change all targets at once, since all must match the declaration in tcg.c. Reviewed-by: Joelle van Dyne Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 2 +- tcg/tcg.c | 10 +++++----- tcg/aarch64/tcg-target.c.inc | 2 +- tcg/arm/tcg-target.c.inc | 2 +- tcg/i386/tcg-target.c.inc | 2 +- tcg/mips/tcg-target.c.inc | 2 +- tcg/ppc/tcg-target.c.inc | 2 +- tcg/riscv/tcg-target.c.inc | 2 +- tcg/s390/tcg-target.c.inc | 2 +- tcg/sparc/tcg-target.c.inc | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) -- 2.25.1 diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index e9af279738..e744a1ce02 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -1255,7 +1255,7 @@ typedef uintptr_t tcg_prologue_fn(CPUArchState *env, const void *tb_ptr); extern tcg_prologue_fn *tcg_qemu_tb_exec; #endif -void tcg_register_jit(void *buf, size_t buf_size); +void tcg_register_jit(const void *buf, size_t buf_size); #if TCG_TARGET_MAYBE_vec /* Return zero if the tuple (opc, type, vece) is unsupportable; diff --git a/tcg/tcg.c b/tcg/tcg.c index 898c4bd1b6..f278772512 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -97,7 +97,7 @@ typedef struct QEMU_PACKED { DebugFrameFDEHeader fde; } DebugFrameHeader; -static void tcg_register_jit_int(void *buf, size_t size, +static void tcg_register_jit_int(const void *buf, size_t size, const void *debug_frame, size_t debug_frame_size) __attribute__((unused)); @@ -1137,7 +1137,7 @@ void tcg_prologue_init(TCGContext *s) total_size -= prologue_size; s->code_gen_buffer_size = total_size; - tcg_register_jit(s->code_gen_buffer, total_size); + tcg_register_jit(tcg_splitwx_to_rx(s->code_gen_buffer), total_size); #ifdef DEBUG_DISAS if (qemu_loglevel_mask(CPU_LOG_TB_OUT_ASM)) { @@ -4511,7 +4511,7 @@ static int find_string(const char *strtab, const char *str) } } -static void tcg_register_jit_int(void *buf_ptr, size_t buf_size, +static void tcg_register_jit_int(const void *buf_ptr, size_t buf_size, const void *debug_frame, size_t debug_frame_size) { @@ -4713,13 +4713,13 @@ static void tcg_register_jit_int(void *buf_ptr, size_t buf_size, /* No support for the feature. Provide the entry point expected by exec.c, and implement the internal function we declared earlier. */ -static void tcg_register_jit_int(void *buf, size_t size, +static void tcg_register_jit_int(const void *buf, size_t size, const void *debug_frame, size_t debug_frame_size) { } -void tcg_register_jit(void *buf, size_t buf_size) +void tcg_register_jit(const void *buf, size_t buf_size) { } #endif /* ELF_HOST_MACHINE */ diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc index 6d8152c468..9ace859db3 100644 --- a/tcg/aarch64/tcg-target.c.inc +++ b/tcg/aarch64/tcg-target.c.inc @@ -2964,7 +2964,7 @@ static const DebugFrame debug_frame = { } }; -void tcg_register_jit(void *buf, size_t buf_size) +void tcg_register_jit(const void *buf, size_t buf_size) { tcg_register_jit_int(buf, buf_size, &debug_frame, sizeof(debug_frame)); } diff --git a/tcg/arm/tcg-target.c.inc b/tcg/arm/tcg-target.c.inc index a197e6bc45..9b9400f164 100644 --- a/tcg/arm/tcg-target.c.inc +++ b/tcg/arm/tcg-target.c.inc @@ -2353,7 +2353,7 @@ static const DebugFrame debug_frame = { } }; -void tcg_register_jit(void *buf, size_t buf_size) +void tcg_register_jit(const void *buf, size_t buf_size) { tcg_register_jit_int(buf, buf_size, &debug_frame, sizeof(debug_frame)); } diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc index 197e3006c8..d272975ff1 100644 --- a/tcg/i386/tcg-target.c.inc +++ b/tcg/i386/tcg-target.c.inc @@ -3976,7 +3976,7 @@ static const DebugFrame debug_frame = { #endif #if defined(ELF_HOST_MACHINE) -void tcg_register_jit(void *buf, size_t buf_size) +void tcg_register_jit(const void *buf, size_t buf_size) { tcg_register_jit_int(buf, buf_size, &debug_frame, sizeof(debug_frame)); } diff --git a/tcg/mips/tcg-target.c.inc b/tcg/mips/tcg-target.c.inc index 6d2c369a85..e9c8c24741 100644 --- a/tcg/mips/tcg-target.c.inc +++ b/tcg/mips/tcg-target.c.inc @@ -2703,7 +2703,7 @@ static const DebugFrame debug_frame = { } }; -void tcg_register_jit(void *buf, size_t buf_size) +void tcg_register_jit(const void *buf, size_t buf_size) { tcg_register_jit_int(buf, buf_size, &debug_frame, sizeof(debug_frame)); } diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index 38dabe40c4..a0a5bac13f 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -3847,7 +3847,7 @@ static DebugFrame debug_frame = { } }; -void tcg_register_jit(void *buf, size_t buf_size) +void tcg_register_jit(const void *buf, size_t buf_size) { uint8_t *p = &debug_frame.fde_reg_ofs[3]; int i; diff --git a/tcg/riscv/tcg-target.c.inc b/tcg/riscv/tcg-target.c.inc index 90588ca2a3..0518595742 100644 --- a/tcg/riscv/tcg-target.c.inc +++ b/tcg/riscv/tcg-target.c.inc @@ -1907,7 +1907,7 @@ static const DebugFrame debug_frame = { } }; -void tcg_register_jit(void *buf, size_t buf_size) +void tcg_register_jit(const void *buf, size_t buf_size) { tcg_register_jit_int(buf, buf_size, &debug_frame, sizeof(debug_frame)); } diff --git a/tcg/s390/tcg-target.c.inc b/tcg/s390/tcg-target.c.inc index 37f4dc4cfd..1444914428 100644 --- a/tcg/s390/tcg-target.c.inc +++ b/tcg/s390/tcg-target.c.inc @@ -2620,7 +2620,7 @@ static const DebugFrame debug_frame = { } }; -void tcg_register_jit(void *buf, size_t buf_size) +void tcg_register_jit(const void *buf, size_t buf_size) { tcg_register_jit_int(buf, buf_size, &debug_frame, sizeof(debug_frame)); } diff --git a/tcg/sparc/tcg-target.c.inc b/tcg/sparc/tcg-target.c.inc index 1a40911660..4c81d5f1c2 100644 --- a/tcg/sparc/tcg-target.c.inc +++ b/tcg/sparc/tcg-target.c.inc @@ -1816,7 +1816,7 @@ static const DebugFrame debug_frame = { .fde_ret_save = { 9, 15, 31 }, /* DW_CFA_register o7, i7 */ }; -void tcg_register_jit(void *buf, size_t buf_size) +void tcg_register_jit(const void *buf, size_t buf_size) { tcg_register_jit_int(buf, buf_size, &debug_frame, sizeof(debug_frame)); }