From patchwork Tue Jan 5 17:19:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 356917 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp194852jai; Tue, 5 Jan 2021 09:56:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJzi4ICEiP99SrkxY0lvSuIdSRGO7WIqn7OzG/tHlR4MBD56yq87VffQMptz1aBiCO3D71TN X-Received: by 2002:a05:620a:140c:: with SMTP id d12mr683732qkj.340.1609869360244; Tue, 05 Jan 2021 09:56:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609869360; cv=none; d=google.com; s=arc-20160816; b=iZV/VoOLYp7KSf6/OnGOEmYO/7Wat/MQeroqbbC7QyqoYaZayvq4o5l6aq8zNyuVa6 E7THSjFpCLHCNMcglkfhJfwHhzX5ejEujkhG29Cvgdrmxtok+pOnFcOKglZ7EEC/JwgV utMm7Hfdmf/B2e1CMM1JbWU2LZTmxnXRqAVOslItQWSiaSTI7TXyXRyyxKes4Jc1sLTC wjFrBeSgC0FP2FrS8k+fW0QvYb74kBSX1xLBZ/jyz/xJEvpP/87bIm1lq8tm2OTOGP4L 1iLki8blwIq+Sqvk/UqDgrtJe2wagIcXZzPfF/qcIwvMou5/tUuvGp99lHy0nsjb06Uf DSXA== 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=DDt9G4G0380iY4uD326AhbzaTibvzTwO85rcnYobk9o=; b=FGWLaOjOrjPrq4ZdhAuih+wKk+F7WgO5AQVJWvVic0FJWmjNyyNvIlt+ClTGuNiWRD SrFqllyAUFW73cOCYvf6z+iETKAtAY/nhLhnYCKefwO8d8JSyeJ9HzN2rkkKqLCx0tnA y33ww/y3zpxdNlCo7FJKLuLFKx2/q7zCgib+uM+JZ1TaYZOcMDzPhaVhUYfIjFuD3Y0M U9TyxSYqXGZSpN6K683ooFs15Y1Dff4UVjXwg2WmWReDqp59G7Bo461lptSF62JX68Y5 77owniXQGKVjvUkhPPuvZrSw6dCDwqCRqEGmBjE/mkyBrG5tT3VwpVx2tDEE/QVcfWjh OmWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HDP2nytz; 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 f7si31774qtf.160.2021.01.05.09.55.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Jan 2021 09:56:00 -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=HDP2nytz; 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]:57158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwqYn-0000Ol-TT for patch@linaro.org; Tue, 05 Jan 2021 12:55:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwq1A-0003Jc-QO for qemu-devel@nongnu.org; Tue, 05 Jan 2021 12:21:14 -0500 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:54345) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kwq15-0006n4-9l for qemu-devel@nongnu.org; Tue, 05 Jan 2021 12:21:12 -0500 Received: by mail-pj1-x1033.google.com with SMTP id f14so13668pju.4 for ; Tue, 05 Jan 2021 09:21:06 -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=DDt9G4G0380iY4uD326AhbzaTibvzTwO85rcnYobk9o=; b=HDP2nytzc/Y8eGQiCFchpkgmcdojCFDZCAR8hWWpdnPWXBRucxocoVT2TdknZbQmbz MRIYsFYyighvXoYVVJczBAQKtx+EtWCVCnrqAlQsPbdUY2RmKEll/YbGzwXxsdqCfVBd EvyM3DKaPPM6Gwx2DfQgf5fwRnDBC4hhBdovWKpYo7jWImrbBFY+n1qZTXbE2R+8Kje/ 7s+xn25sC4gtUiSFl9zWKcyyWOTEFqd3AWSeXXnekRr4EDhDpAshnWwZ0OjEy2VNwt62 haZubOytL1hx7f0sMu4zB45X9jp91qyGvohYsFKVX9DuivhcLOM8TAHUolQOeL/9ZZzt PvHA== 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=DDt9G4G0380iY4uD326AhbzaTibvzTwO85rcnYobk9o=; b=poCNoq0DyWBTrDBjeb3/RMrbt+hmCEYALNWu3gFUjwmedmiIChD1NhWNpLnAkKkliL cfN/kVgYMgodrcoxaGKYsLM2153JsPolAq9PSGwLOdUwhjSLOlFjojXyGwDCLk1VRXzp zWFTjn41jrzQHVrFhrnQ2RJE+Rv47efXmKSxMYSDqYsoAFTqzOKYmLIWmziaPQAqjeUs wfqqmyTKZWv2eqYfd7SKMJp3bLGJJ1nfr+pBATwiSH89AmGGgHKI4ao0/sICiMd20lt0 s5wWYyJq6nRlO3xCv401AEOx8OB6Cspwk/AYfsoBGUNn++fJOx2Hsc3FDIrMFYeh0Tz2 qdZA== X-Gm-Message-State: AOAM533hrr7tIfm6uEVo/S4ZbYV2djrsRnN9mQQQAsGJlrzeMIUQ1Tn9 MC9dIdHqhohaCARrYqCHG5ZXA1O746n04A== X-Received: by 2002:a17:902:6b89:b029:da:fc41:baec with SMTP id p9-20020a1709026b89b02900dafc41baecmr528675plk.39.1609867265841; Tue, 05 Jan 2021 09:21:05 -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.21.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jan 2021 09:21:05 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v5 43/43] tcg: Constify TCGLabelQemuLdst.raddr Date: Tue, 5 Jan 2021 07:19:50 -1000 Message-Id: <20210105171950.415486-44-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::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: Joelle van Dyne 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 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 Reviewed-by: Philippe Mathieu-Daudé 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;