From patchwork Tue Jan 5 17:19:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 356888 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp308331ejs; Tue, 5 Jan 2021 09:33:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+zkc5FO7eAbjI/Ot8JJsLKSAb75St7dhtmhxGfQP5wMKgjRnelP7mRD/IqLBQQro8I/Qm X-Received: by 2002:a25:348a:: with SMTP id b132mr725175yba.378.1609868015918; Tue, 05 Jan 2021 09:33:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609868015; cv=none; d=google.com; s=arc-20160816; b=UXVxZKFvbKxUyMI04o10e6ltYXdtk2oal3J6g2d0mb/81PoW9CMdea6iQkVa9PqkTu o3HxEqdwJWgquQb2S51l0i/PKhCkzC233YohETPpkv90un1ahkf2FFsGewxBs6JEXVsa fsAAdaN0qG31dyTUmTEIkhL+zp6U2HRl+huRJsN1SUZp+hj7zsjzheYgfFmW7zJ92c7D OFyrcTtC/Xm1B5/tdbswjN0+i3N+mGqUQxBGf+5nYAR9Wp1L+ZbMG0RbFVKz2brYmRJr BySbhX36ZXDEdkA+EdM1UU0UKzAMd3ikX01vN1K60mFlW1AcSQpsksfVL/CcFbS+wCcC eNjg== 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=0dGYHAMORlz6CHmMDMkx2/Gm6vP9g5b1rsUhiAV0hUyVEQZw7rCdGhx8f0dFCsmEBV GQGJu6X335w5dG6JjQGT+M7ZrrbDbwW3YlswJDMSBMj+6CPMx6ULFkGOHIf3H2C+BPOG EWxs5hP2pGKM4p8I9H9VTls0yXNwdYfqF/H5oGpJRSA3xvgiDNfQBoK04TB08RRRmQdX t5dLdoafi4drEjZUvyVqpa0BEjOlvoklcXqT4SMkKIWZAeKaaxp4qorvDwrObLDXbnp+ uJKS+Dd9EXyj36vxTt91fojFAzNGnR3LJ4CETZgl1w3ZCmWCuBN6hi7vup2jrS2PTF6Z 5QQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="EY+M/8gN"; 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 n69si543013yba.348.2021.01.05.09.33.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Jan 2021 09:33:35 -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="EY+M/8gN"; 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]:38418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwqD9-0001a1-An for patch@linaro.org; Tue, 05 Jan 2021 12:33:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwq0S-0002Mk-KH for qemu-devel@nongnu.org; Tue, 05 Jan 2021 12:20:30 -0500 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]:37703) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kwq0J-0006XA-TC for qemu-devel@nongnu.org; Tue, 05 Jan 2021 12:20:27 -0500 Received: by mail-pg1-x536.google.com with SMTP id z21so287114pgj.4 for ; Tue, 05 Jan 2021 09:20:19 -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=EY+M/8gNzVhdKntpBBWgdB1gsDvy2Vd5rYKdBhF7OVi5oaZ/qxF+a0u/eyYGW5S+yF Hs0RLKfU2Q5j1ng9GhghIrN0bLqvsuwDKR7QR+otdQ3SmChF5jvmhWGSXQ/4S101GTYT F7gLZPMXA4TSAs98GJTUSl5poVWC3ZYy1TphtZpByDWa/z+2ZAOFw3gicG0qGncoebJJ jZQ1E1dunezKTfgW1xa3aO03jDXuPnKlCcV1dqmsivljLIVNz2dLBfBELVMUdHOyh+hk Fn4lJUwKm9EwXkaRsAciNB/oo3akNHro7EQchX+kcx8gtfph4v9fOzKJs9d2xuU2RD2c hnPA== 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=uL3F0YhcbZNwsIsCYvtYkr9G2ilAaVUR+0udfG/rLZXNq2INPVxjcWRiD9aOSv5LKa Hca15HKbQnIDHjwUsJ/HqlU+m26bO2Obw1LvuMTLE38NGr0p+os9WGDqAKSs6MaTANMN Lnss/FTLm70ClnXtw7eBceO1D3zLD0tYl+nJA2hXNwYv8Ui4605vCYNgyqp92srBYG+J T1PVT3TGw1FQofiHprY7y05gkpkYlxfYtIiSUEO6ZRN42H/3/e1CpAwiCt+n3QtXSWic YmLYSCAte5nznfA0lG67uOK/19XJ4LQYjne0ZgAhi0cWrT47B5iptWe1He+qjkQh4KDK DY5A== X-Gm-Message-State: AOAM533feOeoFo6acQgKyHsh7L4IG0Ce+JIQLoM2App/NGCWN7eXqDgn 24jr0CyxeZeUYuAlRYI8e9KsaVpvyZ0r/w== X-Received: by 2002:a05:6a00:88b:b029:19c:780e:1cd with SMTP id q11-20020a056a00088bb029019c780e01cdmr456388pfj.64.1609867218037; Tue, 05 Jan 2021 09:20:18 -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 u12sm2010pfh.98.2021.01.05.09.20.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jan 2021 09:20:17 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v5 12/43] tcg: Adjust tcg_register_jit for const Date: Tue, 5 Jan 2021 07:19:19 -1000 Message-Id: <20210105171950.415486-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210105171950.415486-1-richard.henderson@linaro.org> References: <20210105171950.415486-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x536.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: 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)); }