From patchwork Thu Jan 7 20:14:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 358282 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp792905jai; Thu, 7 Jan 2021 12:42:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQsE2lsQ+lLI3fiLKG3HeUwTtu7fWRhu85mRahWZMpJFYRQ00AHnI8Xyw/nJwYLPKqS3Cs X-Received: by 2002:a25:3206:: with SMTP id y6mr934254yby.127.1610052169041; Thu, 07 Jan 2021 12:42:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610052169; cv=none; d=google.com; s=arc-20160816; b=FEqiHwIReD+MUVIF/4RKa4ysOXtxviOfBY2euLOgU9nVyaeQ/E53u0qiSnimqEvVpq 1pu2d4DrUEOB/qUJNRr+fo9cqxnxfJGQByfgSD8DC6RTJjIhGcwbf556r5PCkZcwBVtu P7TGQv5HnDCvAj8M5QZYxHs0MTolnH1MXph8S8iRgyUIxKPTGUbNNLzDc28GRXT0AOMP 5X7mFmepC7XX239hZs/OjM1jhsvDTnJ4vcsbUEMdOYYjq+K11In5yhLDBAwYZ8n72mFV ppO7ijMlY+KK4YCwB1HSpi/vmJF7PPPqs07JGs1kTkjeRGoQszOYbaBk5R9AZ5mRWzsd WI+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=/axlOMlK9mP+17efpjcCMV26tl84bU61W0fMNh0sRdI=; b=MGsof3o2xP3rwh2eJzjKaAn0/kYrOTVFuTbDUyni73Ir13RABNQQowKbxThdKvyVuR ox+Q8uSNV5ooSPwtfWQepZvehQkexQv9fKexbA4FL0GsPDm3NMYH/IPC0vs80buA/DP3 jffZGEtQKffXOefUhvHc4sAjkzGo/G2zgymvuoMB/mZkpsfl3R1C60OOzYoLdBV2v0cW 4oOg/la34DD6tUORfz/mLxfSwLht2RjrgVVvyhhqT6il4Y4GTXZwzpbD2Jzox5FGrn0e IL4Zi4ECh1bcscceDo+dvo5Z60xR5RfPeVUTfw+g5z4X9kcvMGPWWoSwOktJFq23KN4o Urow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Mvlb87Ax; 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 c131si7760974yba.383.2021.01.07.12.42.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Jan 2021 12:42:49 -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=Mvlb87Ax; 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]:44324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxc7M-0002Kt-GB for patch@linaro.org; Thu, 07 Jan 2021 15:42:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxbhf-0001fT-Pw for qemu-devel@nongnu.org; Thu, 07 Jan 2021 15:16:16 -0500 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]:46473) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kxbhd-0001nk-Mw for qemu-devel@nongnu.org; Thu, 07 Jan 2021 15:16:15 -0500 Received: by mail-pf1-x433.google.com with SMTP id s21so4543457pfu.13 for ; Thu, 07 Jan 2021 12:16:13 -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=/axlOMlK9mP+17efpjcCMV26tl84bU61W0fMNh0sRdI=; b=Mvlb87Ax8F1pSxrYId/kf8csdowCkIiQ7FVPeo2DOX5HpaxtWP3G/vRT2SN/uEN4D7 XgKtln3HncNPkltdkVomAdWVK+/rRIwQSJqkaNtagVBsaw9b+E5v6/YUhqH/8e5a1PDs d2VBq5DsCMdJOD5WNXddSlqhtoiwOnluEy2VZcUP/gcTlCR+CFNiXnWnWbfly2CWeIHU fIg5pulSgGs0seIHDhRM4nt7n9s4fvq/OMm88uAIdGJkFlqwO3udeGcFVuTAW9mYJBQR UKuwUaADdgN6nOTNNHJdW2C7rWWKDOmVSGCRPRDBPBWnqInFyaXS73VaaZnsuVmwD/OU Osig== 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=/axlOMlK9mP+17efpjcCMV26tl84bU61W0fMNh0sRdI=; b=eevCAkRkfS6c5jn8fLKhfnsIN5Ny/w2bXj5wY4ny/22qzFhl6UVjRwTj+VBj9nOOjb 8R5H4S/9M7/CRqNnXPpshjH1JzDkt0PBnQg2Q4uGYOBDjdAwAANERcUYfuZnYPcpWkb5 H7I3a76ENvT8J6nA5fwlvQXgLIczazWm+6ZKFoQ11BYrfSoWvgr7L1YN40tmr/rKkrtn Fq1dySuznsAEHvwsMZQ+E1k3A2PQpZlWTpGx4JtVzrMx2qbY9599L+wvMSMP4fM0VghQ 0h1o4NHJ6ZrN1WK6MIT5t+oWow4r7URomMZ1c8GaNCtOaC423qhwbjmVRXcD/bLZAtzm AbYg== X-Gm-Message-State: AOAM530kVn8HG1mBZR1Lc7n3ywkP4kq4xZBINObVbNx04AA3XfVSC34c 7hls3RhktS/yLQlI1vz5YdxTu7oZnHHD+A== X-Received: by 2002:a05:6a00:a88:b029:19e:4ba8:bbe4 with SMTP id b8-20020a056a000a88b029019e4ba8bbe4mr3675085pfl.41.1610050571831; Thu, 07 Jan 2021 12:16:11 -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.16.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 12:16:11 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 47/47] tcg: Constify TCGLabelQemuLdst.raddr Date: Thu, 7 Jan 2021 10:14:48 -1000 Message-Id: <20210107201448.1152301-48-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::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x433.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 , =?utf-8?q?Ph?= =?utf-8?q?ilippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Now that all native tcg hosts support splitwx, make this pointer const. Reviewed-by: Joelle van Dyne Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c.inc | 3 +-- tcg/arm/tcg-target.c.inc | 3 +-- tcg/i386/tcg-target.c.inc | 3 +-- tcg/mips/tcg-target.c.inc | 3 +-- tcg/ppc/tcg-target.c.inc | 3 +-- tcg/riscv/tcg-target.c.inc | 3 +-- tcg/s390/tcg-target.c.inc | 3 +-- tcg/tcg-ldst.c.inc | 2 +- 8 files changed, 8 insertions(+), 15 deletions(-) -- 2.25.1 diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc index 0b7eb09a27..ab199b143f 100644 --- a/tcg/aarch64/tcg-target.c.inc +++ b/tcg/aarch64/tcg-target.c.inc @@ -1636,8 +1636,7 @@ static void add_qemu_ldst_label(TCGContext *s, bool is_ld, TCGMemOpIdx oi, label->type = ext; label->datalo_reg = data_reg; label->addrlo_reg = addr_reg; - /* TODO: Cast goes away when all hosts converted */ - label->raddr = (void *)tcg_splitwx_to_rx(raddr); + label->raddr = tcg_splitwx_to_rx(raddr); label->label_ptr[0] = label_ptr; } diff --git a/tcg/arm/tcg-target.c.inc b/tcg/arm/tcg-target.c.inc index d6cb19ca9f..0fd1126454 100644 --- a/tcg/arm/tcg-target.c.inc +++ b/tcg/arm/tcg-target.c.inc @@ -1340,8 +1340,7 @@ static void add_qemu_ldst_label(TCGContext *s, bool is_ld, TCGMemOpIdx oi, label->datahi_reg = datahi; label->addrlo_reg = addrlo; label->addrhi_reg = addrhi; - /* TODO: Cast goes away when all hosts converted */ - label->raddr = (void *)tcg_splitwx_to_rx(raddr); + label->raddr = tcg_splitwx_to_rx(raddr); label->label_ptr[0] = label_ptr; } diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc index 91400d575c..46e856f442 100644 --- a/tcg/i386/tcg-target.c.inc +++ b/tcg/i386/tcg-target.c.inc @@ -1795,8 +1795,7 @@ static void add_qemu_ldst_label(TCGContext *s, bool is_ld, bool is_64, label->datahi_reg = datahi; label->addrlo_reg = addrlo; label->addrhi_reg = addrhi; - /* TODO: Cast goes away when all hosts converted */ - label->raddr = (void *)tcg_splitwx_to_rx(raddr); + label->raddr = tcg_splitwx_to_rx(raddr); label->label_ptr[0] = label_ptr[0]; if (TARGET_LONG_BITS > TCG_TARGET_REG_BITS) { label->label_ptr[1] = label_ptr[1]; diff --git a/tcg/mips/tcg-target.c.inc b/tcg/mips/tcg-target.c.inc index 18fd474593..add157f6c3 100644 --- a/tcg/mips/tcg-target.c.inc +++ b/tcg/mips/tcg-target.c.inc @@ -1283,8 +1283,7 @@ static void add_qemu_ldst_label(TCGContext *s, int is_ld, TCGMemOpIdx oi, label->datahi_reg = datahi; label->addrlo_reg = addrlo; label->addrhi_reg = addrhi; - /* TODO: Cast goes away when all hosts converted */ - label->raddr = (void *)tcg_splitwx_to_rx(raddr); + label->raddr = tcg_splitwx_to_rx(raddr); label->label_ptr[0] = label_ptr[0]; if (TCG_TARGET_REG_BITS < TARGET_LONG_BITS) { label->label_ptr[1] = label_ptr[1]; diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index 5f191c03d9..19a4a12f15 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -2001,8 +2001,7 @@ static void add_qemu_ldst_label(TCGContext *s, bool is_ld, TCGMemOpIdx oi, label->datahi_reg = datahi_reg; label->addrlo_reg = addrlo_reg; label->addrhi_reg = addrhi_reg; - /* TODO: Cast goes away when all hosts converted */ - label->raddr = (void *)tcg_splitwx_to_rx(raddr); + label->raddr = tcg_splitwx_to_rx(raddr); label->label_ptr[0] = lptr; } diff --git a/tcg/riscv/tcg-target.c.inc b/tcg/riscv/tcg-target.c.inc index c76dc9f9ca..c60b91ba58 100644 --- a/tcg/riscv/tcg-target.c.inc +++ b/tcg/riscv/tcg-target.c.inc @@ -996,8 +996,7 @@ static void add_qemu_ldst_label(TCGContext *s, int is_ld, TCGMemOpIdx oi, label->datahi_reg = datahi; label->addrlo_reg = addrlo; label->addrhi_reg = addrhi; - /* TODO: Cast goes away when all hosts converted */ - label->raddr = (void *)tcg_splitwx_to_rx(raddr); + label->raddr = tcg_splitwx_to_rx(raddr); label->label_ptr[0] = label_ptr[0]; } diff --git a/tcg/s390/tcg-target.c.inc b/tcg/s390/tcg-target.c.inc index b3660ffedf..d7ef079055 100644 --- a/tcg/s390/tcg-target.c.inc +++ b/tcg/s390/tcg-target.c.inc @@ -1587,8 +1587,7 @@ static void add_qemu_ldst_label(TCGContext *s, bool is_ld, TCGMemOpIdx oi, label->oi = oi; label->datalo_reg = data; label->addrlo_reg = addr; - /* TODO: Cast goes away when all hosts converted */ - label->raddr = (void *)tcg_splitwx_to_rx(raddr); + label->raddr = tcg_splitwx_to_rx(raddr); label->label_ptr[0] = label_ptr; } diff --git a/tcg/tcg-ldst.c.inc b/tcg/tcg-ldst.c.inc index 05f9b3ccd6..c3ce88e69d 100644 --- a/tcg/tcg-ldst.c.inc +++ b/tcg/tcg-ldst.c.inc @@ -28,7 +28,7 @@ typedef struct TCGLabelQemuLdst { TCGReg addrhi_reg; /* reg index for high word of guest virtual addr */ TCGReg datalo_reg; /* reg index for low word to be loaded or stored */ TCGReg datahi_reg; /* reg index for high word to be loaded or stored */ - tcg_insn_unit *raddr; /* gen code addr of the next IR of qemu_ld/st IR */ + const tcg_insn_unit *raddr; /* addr of the next IR of qemu_ld/st IR */ tcg_insn_unit *label_ptr[2]; /* label pointers to be updated */ QSIMPLEQ_ENTRY(TCGLabelQemuLdst) next; } TCGLabelQemuLdst;