From nobody Mon Nov 25 11:54:59 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1715760017; cv=none; d=zohomail.com; s=zohoarc; b=aCzVqb/ffrcmQD3HvQGyWKrRa3MsZpF5TTJ18TDjsiZGrhFyRHbTsNbOU7X+xMwyTua5I6P1d71+37dzH+kxwk33F/y1ewrqU3jbHMyatbmozSC4kpYRLEa7v7UXULW9xpjS9cIKGAkbX7+VR1kNl0z7es4gg0K7yUdzPwcRJrI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1715760017; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=QME3RTbGMfJpkg4v/+6E8q/97o230nz7+xr7hPnvphQ=; b=c2nnawaN78gUifbMBAbWx8KCsX1+cHxnh9V6VRgHQXNj2OpAYl/CmPnOXszzgHO32HX4HfIFaZs6Au4XS/2fEZD6BjTWk5pG6DPtPRCXlmt4k4a6Yy/QqXxpxCTH+sh2MidFlHFhwkfmeE3p17Txdisrnw/uetY++tNTbpeuCEQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1715760017716639.3268040975018; Wed, 15 May 2024 01:00:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s79Re-00046k-06; Wed, 15 May 2024 03:53:02 -0400 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 1s79RW-000415-Hx for qemu-devel@nongnu.org; Wed, 15 May 2024 03:52:54 -0400 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s79RT-0001XQ-8J for qemu-devel@nongnu.org; Wed, 15 May 2024 03:52:53 -0400 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2e0a34b2899so97510901fa.3 for ; Wed, 15 May 2024 00:52:50 -0700 (PDT) Received: from stoup.. ([149.14.240.163]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41fccee9292sm222611855e9.37.2024.05.15.00.52.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 00:52:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715759569; x=1716364369; darn=nongnu.org; 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=QME3RTbGMfJpkg4v/+6E8q/97o230nz7+xr7hPnvphQ=; b=XyJmGYikq8NllYveg6JSEmxlHiAdvHe6bRZmada2p1ABnQtNXo0SjNOuOk5WzIzaa/ sq5UDyWagokT8fkPPDV9lyeKsmfmFpUr2C746znPuJ9uE8kKrGyaYoTc1LCRMhjJY8xG apdRvn1z7oJP7+KQlwCV5nkiQkFKJglZMLyc4+sTbR/RugEzS9+IaIZw4jUqtxVUbdsc jXI6iOe23qgqWSTrRtbzqnoMz4G2H2guQIFxKYQnqWqxVFFbqDCYb5uCAd6pxYmQ/jpF 2pBju+mPMgW5LkfDITZBONI/oXxrakmqC5UWZH2dsn3frbko4AGGSReCmuQ7loIahe+a WPmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715759569; x=1716364369; 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=QME3RTbGMfJpkg4v/+6E8q/97o230nz7+xr7hPnvphQ=; b=Eh0q9m5fVePi3E6AIYrca6gClDndE+mXk6Nc7gn8K+mtksnkGWs+G0z3x/BhkWPeyx dHMiRphxlTAqckEbRZcbXSXzAyC5jTYRxXkfUlFmipBGSyOO5FxuROegLHL7ELxlGDzq qBULSsBkzHJPN7uE6qGV9Wsk9jou7fz7g3wzOdX5LJyu+N3+UPJRPei+/nsYENBQPHs7 UbrBYSaMn8014PGC7OaWQRANzN6+GISVWZo7JgE8jhU6Nfx6ieeE9sxvooHS4Y1duABw UI7nXb1FUUiN2PwXgbxrMiaXQ2bKmirReEuoaHBq9ToTBLoOZf+KrD9Wjz+EUShPVC1+ 4SLg== X-Gm-Message-State: AOJu0Yx+YaocWEXDPmqDmLZT2OMPwaxBiGpP/YKwhU7wl5a/mvs3HOEj iawuM/Y6LVR/GmBK5jpN9Mt7WYAg7iYYXeYPUFJ7tXM0czbQMYM6jAmR9J/mcQZJHBm6SJtqWIX n7oc= X-Google-Smtp-Source: AGHT+IF5bwlXz4KQbyyGmKF89FVki54N0Nv8Ca94cWHDc7eGZi0xwUYAwzLoeg+0TMQIq1N9CLfmtw== X-Received: by 2002:a2e:905a:0:b0:2e0:4216:6fa8 with SMTP id 38308e7fff4ca-2e5203b421emr140198451fa.39.1715759569222; Wed, 15 May 2024 00:52:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 01/34] accel/tcg: Use vaddr in translator_ld* Date: Wed, 15 May 2024 09:52:14 +0200 Message-Id: <20240515075247.68024-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240515075247.68024-1-richard.henderson@linaro.org> References: <20240515075247.68024-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::236; envelope-from=richard.henderson@linaro.org; helo=mail-lj1-x236.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1715760018286100020 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- include/exec/translator.h | 21 +++++++++------------ accel/tcg/translator.c | 15 ++++++++------- target/hexagon/translate.c | 1 + target/microblaze/translate.c | 1 + 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/include/exec/translator.h b/include/exec/translator.h index 6cd937ac5c..51489c181c 100644 --- a/include/exec/translator.h +++ b/include/exec/translator.h @@ -19,10 +19,7 @@ */ =20 #include "qemu/bswap.h" -#include "exec/cpu-common.h" -#include "exec/cpu-defs.h" -#include "exec/abi_ptr.h" -#include "cpu.h" +#include "exec/vaddr.h" =20 /** * gen_intermediate_code @@ -185,14 +182,14 @@ bool translator_io_start(DisasContextBase *db); * the relevant information at translation time. */ =20 -uint8_t translator_ldub(CPUArchState *env, DisasContextBase *db, abi_ptr p= c); -uint16_t translator_lduw(CPUArchState *env, DisasContextBase *db, abi_ptr = pc); -uint32_t translator_ldl(CPUArchState *env, DisasContextBase *db, abi_ptr p= c); -uint64_t translator_ldq(CPUArchState *env, DisasContextBase *db, abi_ptr p= c); +uint8_t translator_ldub(CPUArchState *env, DisasContextBase *db, vaddr pc); +uint16_t translator_lduw(CPUArchState *env, DisasContextBase *db, vaddr pc= ); +uint32_t translator_ldl(CPUArchState *env, DisasContextBase *db, vaddr pc); +uint64_t translator_ldq(CPUArchState *env, DisasContextBase *db, vaddr pc); =20 static inline uint16_t translator_lduw_swap(CPUArchState *env, DisasContextBase *db, - abi_ptr pc, bool do_swap) + vaddr pc, bool do_swap) { uint16_t ret =3D translator_lduw(env, db, pc); if (do_swap) { @@ -203,7 +200,7 @@ translator_lduw_swap(CPUArchState *env, DisasContextBas= e *db, =20 static inline uint32_t translator_ldl_swap(CPUArchState *env, DisasContextBase *db, - abi_ptr pc, bool do_swap) + vaddr pc, bool do_swap) { uint32_t ret =3D translator_ldl(env, db, pc); if (do_swap) { @@ -214,7 +211,7 @@ translator_ldl_swap(CPUArchState *env, DisasContextBase= *db, =20 static inline uint64_t translator_ldq_swap(CPUArchState *env, DisasContextBase *db, - abi_ptr pc, bool do_swap) + vaddr pc, bool do_swap) { uint64_t ret =3D translator_ldq(env, db, pc); if (do_swap) { @@ -233,7 +230,7 @@ translator_ldq_swap(CPUArchState *env, DisasContextBase= *db, * re-synthesised for s390x "ex"). It ensures we update other areas of * the translator with details of the executed instruction. */ -void translator_fake_ldb(uint8_t insn8, abi_ptr pc); +void translator_fake_ldb(uint8_t insn8, vaddr pc); =20 /* * Return whether addr is on the same page as where disassembly started. diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index 6832e55135..53225290b1 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -14,6 +14,7 @@ #include "exec/translator.h" #include "exec/cpu_ldst.h" #include "exec/plugin-gen.h" +#include "exec/cpu_ldst.h" #include "tcg/tcg-op-common.h" #include "internal-target.h" =20 @@ -294,11 +295,11 @@ static void *translator_access(CPUArchState *env, Dis= asContextBase *db, return host + (pc - base); } =20 -static void plugin_insn_append(abi_ptr pc, const void *from, size_t size) +static void plugin_insn_append(vaddr pc, const void *from, size_t size) { #ifdef CONFIG_PLUGIN struct qemu_plugin_insn *insn =3D tcg_ctx->plugin_insn; - abi_ptr off; + size_t off; =20 if (insn =3D=3D NULL) { return; @@ -315,7 +316,7 @@ static void plugin_insn_append(abi_ptr pc, const void *= from, size_t size) #endif } =20 -uint8_t translator_ldub(CPUArchState *env, DisasContextBase *db, abi_ptr p= c) +uint8_t translator_ldub(CPUArchState *env, DisasContextBase *db, vaddr pc) { uint8_t ret; void *p =3D translator_access(env, db, pc, sizeof(ret)); @@ -329,7 +330,7 @@ uint8_t translator_ldub(CPUArchState *env, DisasContext= Base *db, abi_ptr pc) return ret; } =20 -uint16_t translator_lduw(CPUArchState *env, DisasContextBase *db, abi_ptr = pc) +uint16_t translator_lduw(CPUArchState *env, DisasContextBase *db, vaddr pc) { uint16_t ret, plug; void *p =3D translator_access(env, db, pc, sizeof(ret)); @@ -344,7 +345,7 @@ uint16_t translator_lduw(CPUArchState *env, DisasContex= tBase *db, abi_ptr pc) return ret; } =20 -uint32_t translator_ldl(CPUArchState *env, DisasContextBase *db, abi_ptr p= c) +uint32_t translator_ldl(CPUArchState *env, DisasContextBase *db, vaddr pc) { uint32_t ret, plug; void *p =3D translator_access(env, db, pc, sizeof(ret)); @@ -359,7 +360,7 @@ uint32_t translator_ldl(CPUArchState *env, DisasContext= Base *db, abi_ptr pc) return ret; } =20 -uint64_t translator_ldq(CPUArchState *env, DisasContextBase *db, abi_ptr p= c) +uint64_t translator_ldq(CPUArchState *env, DisasContextBase *db, vaddr pc) { uint64_t ret, plug; void *p =3D translator_access(env, db, pc, sizeof(ret)); @@ -374,7 +375,7 @@ uint64_t translator_ldq(CPUArchState *env, DisasContext= Base *db, abi_ptr pc) return ret; } =20 -void translator_fake_ldb(uint8_t insn8, abi_ptr pc) +void translator_fake_ldb(uint8_t insn8, vaddr pc) { plugin_insn_append(pc, &insn8, sizeof(insn8)); } diff --git a/target/hexagon/translate.c b/target/hexagon/translate.c index 0904dc2d38..fcba82f7dc 100644 --- a/target/hexagon/translate.c +++ b/target/hexagon/translate.c @@ -25,6 +25,7 @@ #include "exec/translation-block.h" #include "exec/cpu_ldst.h" #include "exec/log.h" +#include "exec/cpu_ldst.h" #include "internal.h" #include "attribs.h" #include "insn.h" diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 6d89c1a175..84cca04962 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -26,6 +26,7 @@ #include "tcg/tcg-op.h" #include "exec/helper-proto.h" #include "exec/helper-gen.h" +#include "exec/cpu_ldst.h" #include "exec/translator.h" #include "qemu/qemu-print.h" =20 --=20 2.34.1