From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018308; cv=none; d=zohomail.com; s=zohoarc; b=Aax243wBCt3NHMH1TbttVNqgu9C6og2oAsVKRh9kHDIw2+dgfSazlo9vKP7wLO96mR6wz4KDowPSrgAmXvqt4MEvTpC/06IX4c/peB6gH31MIGqCgox6B0jYdWYphzvvc1zocb0UNecgZuc8klHVeyIWTH3SxNeYX2ueNOXh+F8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018308; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=n0DAaP4sVuZn7T4BCAKTXQKVP4+d7qu4MFcOstQQMlI=; b=lS468EpKyVCyPO2cqeTwdX3bULlg97zM1hqMoeYjvUQ3w8LM18aqxa9g/gSTrbppq2XN+qfYbFiIubd+GddfUk+mllSl4Q3i1pjwOYF0rDGwPrnLI3xUkEB6rgSGKm/E8onuMoeqBRSoNFWjMdo6i7kDv7QzX/vAZh5Ohb0HeG4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018308298145.16149576110683; Tue, 21 Feb 2023 14:25:08 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUay5-0005vO-Mq; Tue, 21 Feb 2023 17:18:37 -0500 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 1pUay3-0005uc-HC for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:35 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUay1-0005lM-QE for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=n0DAaP4sVuZn7T4BCAKTXQKVP4+d7qu4MFcOstQQMlI=; b=Gy6odTjOG4z1ezbI1Fh4E64lpJ XqM8Q6XoS2ZTK1PStZSINlz6PJH0wAAU3elO84RjB3VRjggA1n5YIBhN1cZUgiYswj6270SGQnspD NPcTIlcrpb34GWFBGDXw5VVlzgnf4PNGMmTM0l8LGcDk/nNP0gyGQ9RkSKIvRGgtntZ8=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 01/27] include/exec: Introduce `CF_PCREL` Date: Tue, 21 Feb 2023 23:17:52 +0100 Message-Id: <20230221221818.9382-2-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> MIME-Version: 1.0 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018309214100003 Content-Type: text/plain; charset="utf-8" Adds a new field to TranslationBlock.cflags denoting whether or not the instructions of a given translation block are pc-relative. This field aims to replace the macro `TARGET_TB_PCREL`. Signed-off-by: Anton Johansson Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/exec/exec-all.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 0e36f4d063..9186a58554 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -545,6 +545,7 @@ struct TranslationBlock { #define CF_INVALID 0x00040000 /* TB is stale. Set with @jmp_lock hel= d */ #define CF_PARALLEL 0x00080000 /* Generate code for a parallel contex= t */ #define CF_NOIRQ 0x00100000 /* Generate an uninterruptible TB */ +#define CF_PCREL 0x00200000 /* Opcodes in TB are PC-relative */ #define CF_CLUSTER_MASK 0xff000000 /* Top 8 bits are cluster ID */ #define CF_CLUSTER_SHIFT 24 =20 --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677017941; cv=none; d=zohomail.com; s=zohoarc; b=Bsokgy4D8N3enFyQco2udf+4Sixb7ACUEexAE2F3TFNdiYx88kdtZZICaANy2vNImeph2s1igDBsDNr3ZpbaKeC/skOzNMrfPPd2hFOk4QUmHGeXuaKupEy5SYWRaBmhcdPmqUKHCd2htWoYRJMZYGIU3Ck7+GUZH7/KQczcRfE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677017941; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=cuUZBMX/VXDjcuE/bVBJEpwIvu8iTfj/mJKO3kd5jDo=; b=HCB/M2VES46C1s7ytCtf3lP1vgLqEhA1PAIei2t13cS66XqGzh8Tqq0Q9RxfxQtgjKk2KhUo8mAqYDJKMvYNh41zhWMBaXsrWsPZfYn91sI9GI3iYT0uzrny1g9WTzJ85TJWGeVDaZTDMjLTnk8BxCIOVSyP0KeigmqWZk0lxn0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677017941060812.4293614993273; Tue, 21 Feb 2023 14:19:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUay6-0005vP-3S; Tue, 21 Feb 2023 17:18:38 -0500 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 1pUay3-0005um-Ve for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:36 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUay1-0005lO-QE for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=cuUZBMX/VXDjcuE/bVBJEpwIvu8iTfj/mJKO3kd5jDo=; b=BdjOp6XP72myteSCK4q9sW7Ykk MaYic88e/AgTDPiX6G6K1sYjEseyQ9yrEMPDZ6YtzaQeFesb5O/whwXaDuxqWN1uTCc4JFCcljAig KM0sXz59c5jY1ZAz6PXHefhzgfvQhT3t441DLKMaZroX2pOEFvL6Re7Vq+Ye73LkE8uE=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 02/27] target/i386: set `CF_PCREL` in `x86_cpu_realizefn` Date: Tue, 21 Feb 2023 23:17:53 +0100 Message-Id: <20230221221818.9382-3-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677017942370100001 Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/i386/cpu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 4d2b8d0444..5be294b122 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -6404,6 +6404,11 @@ static void x86_cpu_realizefn(DeviceState *dev, Erro= r **errp) static bool ht_warned; unsigned requested_lbr_fmt; =20 + /* Use pc-relative instructions in system-mode */ +#ifndef CONFIG_USER_ONLY + cs->tcg_cflags |=3D CF_PCREL; +#endif + if (cpu->apic_id =3D=3D UNASSIGNED_APIC_ID) { error_setg(errp, "apic-id property was not initialized properly"); return; --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677017965; cv=none; d=zohomail.com; s=zohoarc; b=LLPkcB7ph8u4QRGA4ux9WX0YJqRLl9OiupxVHKn3S3FDP0eIU26PU3wn8dfFU+onOnDIRa8waZUsqjhI2K0abqYUaXwnIsRTc3+zBhNkOIDUQgV5MTGL0IBuipJIIlbRGKqrvIeqlFsP6/PHQPMl24XRQcO07tIDLhG15jV8Epg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677017965; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=O05+soEBGfNiFxui8eVc890P7BMfErthp0BayCzbJuo=; b=k5o5P8eSSXlsK//fa+hG3ejIIUH+n8J826079CQfSmHvr7R1TZhNGUeRY2hS9feM1NWuHQLbMxCBqzn8I8lNMvr070hCP2V4PqL4nz8G6zsr2s7ZHjj2hMB53mh3CBRUH2vrm849LyuQ5gvbm0P+wqTpqUzbXERUd/Dk0TIs4RQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677017965792298.96231411302085; Tue, 21 Feb 2023 14:19:25 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayA-0005x3-7b; Tue, 21 Feb 2023 17:18:42 -0500 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 1pUay3-0005ul-Sx for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:35 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUay1-0005lU-QW for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=O05+soEBGfNiFxui8eVc890P7BMfErthp0BayCzbJuo=; b=mwySYFr1JdaHBzxL+k/056Rm6V 2vpc2dsV2zh4rb1SOoYznBO5zOJtUlJGXfdEHGTtUEJE6GKNpBYKUvGLGhZzkR5czMcDCdMc6pfp3 9nS9cndCWwpkOZy05VbwIBujd+0E93oFkntQN7TZrtItJL93KBbDhZ5PedNIyfe2VfGI=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 03/27] target/arm: set `CF_PCREL` in `arm_cpu_realizefn` Date: Tue, 21 Feb 2023 23:17:54 +0100 Message-Id: <20230221221818.9382-4-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677017967729100005 Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/cpu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 876ab8f3bf..c38420a4d1 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1554,6 +1554,11 @@ static void arm_cpu_realizefn(DeviceState *dev, Erro= r **errp) Error *local_err =3D NULL; bool no_aa32 =3D false; =20 + /* Use pc-relative instructions in system-mode */ +#ifndef CONFIG_USER_ONLY + cs->tcg_cflags |=3D CF_PCREL; +#endif + /* If we needed to query the host kernel for the CPU features * then it's possible that might have failed in the initfn, but * this is the first point where we can report it. --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018284; cv=none; d=zohomail.com; s=zohoarc; b=TNwY6+MChopjWVabyS4LR7j/WpW0F3t+uttAE6he2JOhP/GWI9R9K0sW7pIsfPlZtRMKHiS4JrK41sjjSg6gzUXPgR8IVg0x39QpT4GlYelqqwcMORn9eNYzPsvb/nTXoBr2EoWEqp3SSr5BnHx8d1S/mgGB7HqvscPLyL6gH84= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018284; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=ZoHXIPnoMvDmnxpBuEC/qwhQiJCJcIus8W7TNDt4pNY=; b=GEEJoTkmHP4S8oQ03Nv7IivjX6A8HlWlWch7sPQm49L0Ii/CySnyMUjSQSBbWgKWq6a3RICtqyZL2ZzLsJBJCPiYuZ6gkNPN2Ja1PKBbzaXak9rgEVqL2EmwDyQIXDouNqAD82o4Civoe4FQnIYrzGg90NICqWpRprOiXZOSVGk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018284727537.4019914990316; Tue, 21 Feb 2023 14:24:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayE-0005xO-Sd; Tue, 21 Feb 2023 17:18:46 -0500 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 1pUay5-0005vK-Ag for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:37 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUay3-0005lm-1K for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ZoHXIPnoMvDmnxpBuEC/qwhQiJCJcIus8W7TNDt4pNY=; b=eE7v9D3WNzwJJ+TNPLY2whG/Z8 C1GxTo3ZqKpZliCsB+UpNoQAJCNSNu9q94m+b2bk9SJgfuhLvUV4QLiU1J9Na55ngxpkmXtBkoYgb BlydIetWQKlw5HyRoyYnJYW9uB3LPpeNMrXVBT64ofDeULlxx6af/QkOInsbUMbx+wp0=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 04/27] accel/tcg: Replace `TARGET_TB_PCREL` with `CF_PCREL` Date: Tue, 21 Feb 2023 23:17:55 +0100 Message-Id: <20230221221818.9382-5-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018285269100003 Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- accel/tcg/cpu-exec.c | 8 +++---- accel/tcg/internal.h | 10 ++++---- accel/tcg/perf.c | 2 +- accel/tcg/tb-jmp-cache.h | 48 +++++++++++++++++++-------------------- accel/tcg/tb-maint.c | 8 +++---- accel/tcg/translate-all.c | 14 ++++++------ 6 files changed, 44 insertions(+), 46 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 5357608b14..92b833adcf 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -185,7 +185,7 @@ static bool tb_lookup_cmp(const void *p, const void *d) const TranslationBlock *tb =3D p; const struct tb_desc *desc =3D d; =20 - if ((TARGET_TB_PCREL || tb_pc(tb) =3D=3D desc->pc) && + if ((tb_cflags(tb) & CF_PCREL || tb_pc(tb) =3D=3D desc->pc) && tb_page_addr0(tb) =3D=3D desc->page_addr0 && tb->cs_base =3D=3D desc->cs_base && tb->flags =3D=3D desc->flags && @@ -237,7 +237,7 @@ static TranslationBlock *tb_htable_lookup(CPUState *cpu= , target_ulong pc, return NULL; } desc.page_addr0 =3D phys_pc; - h =3D tb_hash_func(phys_pc, (TARGET_TB_PCREL ? 0 : pc), + h =3D tb_hash_func(phys_pc, (cflags & CF_PCREL ? 0 : pc), flags, cflags, *cpu->trace_dstate); return qht_lookup_custom(&tb_ctx.htable, &desc, h, tb_lookup_cmp); } @@ -256,7 +256,7 @@ static inline TranslationBlock *tb_lookup(CPUState *cpu= , target_ulong pc, =20 hash =3D tb_jmp_cache_hash_func(pc); jc =3D cpu->tb_jmp_cache; - tb =3D tb_jmp_cache_get_tb(jc, hash); + tb =3D tb_jmp_cache_get_tb(jc, cflags, hash); =20 if (likely(tb && tb_jmp_cache_get_pc(jc, hash, tb) =3D=3D pc && @@ -459,7 +459,7 @@ cpu_tb_exec(CPUState *cpu, TranslationBlock *itb, int *= tb_exit) if (cc->tcg_ops->synchronize_from_tb) { cc->tcg_ops->synchronize_from_tb(cpu, last_tb); } else { - assert(!TARGET_TB_PCREL); + tcg_debug_assert(!(tb_cflags(last_tb) & CF_PCREL)); assert(cc->set_pc); cc->set_pc(cpu, tb_pc(last_tb)); } diff --git a/accel/tcg/internal.h b/accel/tcg/internal.h index 6edff16fb0..261924e7fa 100644 --- a/accel/tcg/internal.h +++ b/accel/tcg/internal.h @@ -57,11 +57,11 @@ void cpu_restore_state_from_tb(CPUState *cpu, Translati= onBlock *tb, /* Return the current PC from CPU, which may be cached in TB. */ static inline target_ulong log_pc(CPUState *cpu, const TranslationBlock *t= b) { -#if TARGET_TB_PCREL - return cpu->cc->get_pc(cpu); -#else - return tb_pc(tb); -#endif + if (tb_cflags(tb) & CF_PCREL) { + return cpu->cc->get_pc(cpu); + } else { + return tb_pc(tb); + } } =20 #endif /* ACCEL_TCG_INTERNAL_H */ diff --git a/accel/tcg/perf.c b/accel/tcg/perf.c index ae19f6e28f..65e35ea3b9 100644 --- a/accel/tcg/perf.c +++ b/accel/tcg/perf.c @@ -328,7 +328,7 @@ void perf_report_code(uint64_t guest_pc, TranslationBlo= ck *tb, for (insn =3D 0; insn < tb->icount; insn++) { /* FIXME: This replicates the restore_state_to_opc() logic. */ q[insn].address =3D tcg_ctx->gen_insn_data[insn][0]; - if (TARGET_TB_PCREL) { + if (tb_cflags(tb) & CF_PCREL) { q[insn].address |=3D (guest_pc & TARGET_PAGE_MASK); } else { #if defined(TARGET_I386) diff --git a/accel/tcg/tb-jmp-cache.h b/accel/tcg/tb-jmp-cache.h index b3f6e78835..083939b302 100644 --- a/accel/tcg/tb-jmp-cache.h +++ b/accel/tcg/tb-jmp-cache.h @@ -14,53 +14,51 @@ =20 /* * Accessed in parallel; all accesses to 'tb' must be atomic. - * For TARGET_TB_PCREL, accesses to 'pc' must be protected by - * a load_acquire/store_release to 'tb'. + * For CF_PCREL, accesses to 'pc' must be protected by a + * load_acquire/store_release to 'tb'. */ struct CPUJumpCache { struct rcu_head rcu; struct { TranslationBlock *tb; -#if TARGET_TB_PCREL target_ulong pc; -#endif } array[TB_JMP_CACHE_SIZE]; }; =20 static inline TranslationBlock * -tb_jmp_cache_get_tb(CPUJumpCache *jc, uint32_t hash) +tb_jmp_cache_get_tb(CPUJumpCache *jc, uint32_t cflags, uint32_t hash) { -#if TARGET_TB_PCREL - /* Use acquire to ensure current load of pc from jc. */ - return qatomic_load_acquire(&jc->array[hash].tb); -#else - /* Use rcu_read to ensure current load of pc from *tb. */ - return qatomic_rcu_read(&jc->array[hash].tb); -#endif + if (cflags & CF_PCREL) { + /* Use acquire to ensure current load of pc from jc. */ + return qatomic_load_acquire(&jc->array[hash].tb); + } else { + /* Use rcu_read to ensure current load of pc from *tb. */ + return qatomic_rcu_read(&jc->array[hash].tb); + } } =20 static inline target_ulong tb_jmp_cache_get_pc(CPUJumpCache *jc, uint32_t hash, TranslationBlock *tb) { -#if TARGET_TB_PCREL - return jc->array[hash].pc; -#else - return tb_pc(tb); -#endif + if (tb_cflags(tb) & CF_PCREL) { + return jc->array[hash].pc; + } else { + return tb_pc(tb); + } } =20 static inline void tb_jmp_cache_set(CPUJumpCache *jc, uint32_t hash, TranslationBlock *tb, target_ulong pc) { -#if TARGET_TB_PCREL - jc->array[hash].pc =3D pc; - /* Use store_release on tb to ensure pc is written first. */ - qatomic_store_release(&jc->array[hash].tb, tb); -#else - /* Use the pc value already stored in tb->pc. */ - qatomic_set(&jc->array[hash].tb, tb); -#endif + if (tb_cflags(tb) & CF_PCREL) { + jc->array[hash].pc =3D pc; + /* Use store_release on tb to ensure pc is written first. */ + qatomic_store_release(&jc->array[hash].tb, tb); + } else{ + /* Use the pc value already stored in tb->pc. */ + qatomic_set(&jc->array[hash].tb, tb); + } } =20 #endif /* ACCEL_TCG_TB_JMP_CACHE_H */ diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index b3d6529ae2..2dbc2ce172 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -44,7 +44,7 @@ static bool tb_cmp(const void *ap, const void *bp) const TranslationBlock *a =3D ap; const TranslationBlock *b =3D bp; =20 - return ((TARGET_TB_PCREL || tb_pc(a) =3D=3D tb_pc(b)) && + return ((tb_cflags(a) & CF_PCREL || tb_pc(a) =3D=3D tb_pc(b)) && a->cs_base =3D=3D b->cs_base && a->flags =3D=3D b->flags && (tb_cflags(a) & ~CF_INVALID) =3D=3D (tb_cflags(b) & ~CF_INVALI= D) && @@ -847,7 +847,7 @@ static void tb_jmp_cache_inval_tb(TranslationBlock *tb) { CPUState *cpu; =20 - if (TARGET_TB_PCREL) { + if (tb_cflags(tb) & CF_PCREL) { /* A TB may be at any virtual address */ CPU_FOREACH(cpu) { tcg_flush_jmp_cache(cpu); @@ -885,7 +885,7 @@ static void do_tb_phys_invalidate(TranslationBlock *tb,= bool rm_from_page_list) =20 /* remove the TB from the hash list */ phys_pc =3D tb_page_addr0(tb); - h =3D tb_hash_func(phys_pc, (TARGET_TB_PCREL ? 0 : tb_pc(tb)), + h =3D tb_hash_func(phys_pc, (orig_cflags & CF_PCREL ? 0 : tb_pc(tb)), tb->flags, orig_cflags, tb->trace_vcpu_dstate); if (!qht_remove(&tb_ctx.htable, tb, h)) { return; @@ -966,7 +966,7 @@ TranslationBlock *tb_link_page(TranslationBlock *tb, tb= _page_addr_t phys_pc, tb_record(tb, p, p2); =20 /* add in the hash table */ - h =3D tb_hash_func(phys_pc, (TARGET_TB_PCREL ? 0 : tb_pc(tb)), + h =3D tb_hash_func(phys_pc, (tb->cflags & CF_PCREL ? 0 : tb_pc(tb)), tb->flags, tb->cflags, tb->trace_vcpu_dstate); qht_insert(&tb_ctx.htable, tb, h, &existing_tb); =20 diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 9e925c10f3..6ae3cc9d71 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -135,7 +135,7 @@ static int encode_search(TranslationBlock *tb, uint8_t = *block) =20 for (j =3D 0; j < TARGET_INSN_START_WORDS; ++j) { if (i =3D=3D 0) { - prev =3D (!TARGET_TB_PCREL && j =3D=3D 0 ? tb_pc(tb) : 0); + prev =3D (!(tb_cflags(tb) & CF_PCREL) && j =3D=3D 0 ? tb_p= c(tb) : 0); } else { prev =3D tcg_ctx->gen_insn_data[i - 1][j]; } @@ -170,7 +170,7 @@ static int cpu_unwind_data_from_tb(TranslationBlock *tb= , uintptr_t host_pc, } =20 memset(data, 0, sizeof(uint64_t) * TARGET_INSN_START_WORDS); - if (!TARGET_TB_PCREL) { + if (!(tb_cflags(tb) & CF_PCREL)) { data[0] =3D tb_pc(tb); } =20 @@ -341,9 +341,9 @@ TranslationBlock *tb_gen_code(CPUState *cpu, =20 gen_code_buf =3D tcg_ctx->code_gen_ptr; tb->tc.ptr =3D tcg_splitwx_to_rx(gen_code_buf); -#if !TARGET_TB_PCREL - tb->pc =3D pc; -#endif + if (!(cflags & CF_PCREL)) { + tb->pc =3D pc; + } tb->cs_base =3D cs_base; tb->flags =3D flags; tb->cflags =3D cflags; @@ -408,8 +408,8 @@ TranslationBlock *tb_gen_code(CPUState *cpu, tb->tc.size =3D gen_code_size; =20 /* - * For TARGET_TB_PCREL, attribute all executions of the generated - * code to its first mapping. + * For CF_PCREL, attribute all executions of the generated code + * to its first mapping. */ perf_report_code(pc, tb, tcg_splitwx_to_rx(gen_code_buf)); =20 --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018310; cv=none; d=zohomail.com; s=zohoarc; b=DfXa2D1iwfoim+9ODACj0TUpu8IHlde+ZR6dXtEgvu5jHiVbFg4kOwlpP5Vbdgobmtg7i+y0ZGcktiDDYBS/yh/8kQhMf9D6ycN/6F2RPd1vGnvoTxNUY0m44wMxOpXNzLKBl5BPqM7BcoQUn/b6uIfmvKrCp+h296xTFiukVXI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018310; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=aZNIf8SUhPVCHgfGtfdH0W55b3rV4YfHsWUUCtHkfLk=; b=lt2Ii6mRbZPG7RZVUfQJ+woEh98ZpmbdTeW1IMrUsvYDYs0l8R3Uido+ErAyZtH6yA5Qfoti/THz51s+8qCcOKTy0OY7KpIcAQR0XkJv81pz5kzVeJGCjNYE8h+C7tuPGaRtQ1gzGDQgjR6NrulGL4i/rTvRqyVLUaecW0bYUkw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018310638727.7306931459143; Tue, 21 Feb 2023 14:25:10 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayT-00069f-RC; Tue, 21 Feb 2023 17:19:01 -0500 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 1pUay5-0005vH-9f for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:37 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUay3-0005ls-B9 for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=aZNIf8SUhPVCHgfGtfdH0W55b3rV4YfHsWUUCtHkfLk=; b=FE7W4Bh4G6JnLgISCuhj8yG2OJ NUlqcTujInv45Qgxo+T+hTZdlqV+nlwneMEmmOzyr4ZwbNzl8Y5/UYONVXVcsSoMU+Vv8tgaesD+O kgJMwYAzsPX+JO3RNNHhhwY69xmnPRX0b4luPviF1wNonW/sJ1Q/OqUMv5II/qW/mPHU=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 05/27] include/exec: Replace `TARGET_TB_PCREL` with `CF_PCREL` Date: Tue, 21 Feb 2023 23:17:56 +0100 Message-Id: <20230221221818.9382-6-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018311308100001 Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/exec/exec-all.h | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 9186a58554..f1615af7cb 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -505,22 +505,20 @@ struct tb_tc { }; =20 struct TranslationBlock { -#if !TARGET_TB_PCREL /* * Guest PC corresponding to this block. This must be the true * virtual address. Therefore e.g. x86 stores EIP + CS_BASE, and * targets like Arm, MIPS, HP-PA, which reuse low bits for ISA or * privilege, must store those bits elsewhere. * - * If TARGET_TB_PCREL, the opcodes for the TranslationBlock are - * written such that the TB is associated only with the physical - * page and may be run in any virtual address context. In this case, - * PC must always be taken from ENV in a target-specific manner. + * If CF_PCREL, the opcodes for the TranslationBlock are written + * such that the TB is associated only with the physical page and + * may be run in any virtual address context. In this case, PC + * must always be taken from ENV in a target-specific manner. * Unwind information is taken as offsets from the page, to be * deposited into the "current" PC. */ target_ulong pc; -#endif =20 /* * Target-specific data associated with the TranslationBlock, e.g.: @@ -614,22 +612,19 @@ struct TranslationBlock { uintptr_t jmp_dest[2]; }; =20 -/* Hide the read to avoid ifdefs for TARGET_TB_PCREL. */ -static inline target_ulong tb_pc(const TranslationBlock *tb) -{ -#if TARGET_TB_PCREL - qemu_build_not_reached(); -#else - return tb->pc; -#endif -} - /* Hide the qatomic_read to make code a little easier on the eyes */ static inline uint32_t tb_cflags(const TranslationBlock *tb) { return qatomic_read(&tb->cflags); } =20 +/* Hide the read to avoid ifdefs for CF_PCREL. */ +static inline target_ulong tb_pc(const TranslationBlock *tb) +{ + assert(!(tb_cflags(tb) & CF_PCREL)); + return tb->pc; +} + static inline tb_page_addr_t tb_page_addr0(const TranslationBlock *tb) { #ifdef CONFIG_USER_ONLY --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018092; cv=none; d=zohomail.com; s=zohoarc; b=N/emoZOM/49wZBMCcOcr6j1nvYhje1PIcDjM+DeZyidtaaC9J7FAVO6uQWtycyeDrfG0lvbCQEC8WhtEe7XNUMo8ahjpt79JjKsrLvmwBchcZuBq7XV17jnKCRIrf4weURKWfBCUFJs/NyJdWaPHkxFDc+sbS4YiqYE/uRiiqL0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018092; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=FPAnU2eoTUOHIVAPGWUVJM936af5bDpPeKc/JrTBUuo=; b=CxPcz/Up3bcKCRF0+6WOL1TJK+5N20fexlPCmiZR9h8SU/AFDGE34qqsncqdU2j3ZtfOIPk6vQaB/yU4oV9Dx6l1692AbUiOZAkD8USfiVo0NvsH4fiBQVQuZgWN3WUU0/fYqCckdgMeGY5BRRs7jydA3vvE2rSucjjN4zf4zZs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018092022758.5659908636885; Tue, 21 Feb 2023 14:21:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayW-0006D3-2g; Tue, 21 Feb 2023 17:19:04 -0500 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 1pUay5-0005vd-Tq for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:38 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUay4-0005lw-4K for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=FPAnU2eoTUOHIVAPGWUVJM936af5bDpPeKc/JrTBUuo=; b=gYAD2xUjttiT85qnWq/yrGAgPm PGzeevq8U+AQU0iedF4uXcZ/LRusLOqu1NWrrIgEWpqbZ60CnvLDG5izvGx+k2590BrgKxsbT0Bpn yLRedYp3NHsgw/aYZnCwI90OKBTdvv/Yt5k1MMMpI6++onFdetPJ9tNfNvPJDwedhrLw=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 06/27] target/arm: Replace `TARGET_TB_PCREL` with `CF_PCREL` Date: Tue, 21 Feb 2023 23:17:57 +0100 Message-Id: <20230221221818.9382-7-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018094225100003 Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/cpu.c | 8 ++++---- target/arm/translate-a64.c | 8 ++++---- target/arm/translate.c | 6 +++--- target/arm/translate.h | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index c38420a4d1..c05cb86a47 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -78,8 +78,8 @@ static vaddr arm_cpu_get_pc(CPUState *cs) void arm_cpu_synchronize_from_tb(CPUState *cs, const TranslationBlock *tb) { - /* The program counter is always up to date with TARGET_TB_PCREL. */ - if (!TARGET_TB_PCREL) { + /* The program counter is always up to date with CF_PCREL. */ + if (!(tb_cflags(tb) & CF_PCREL)) { CPUARMState *env =3D cs->env_ptr; /* * It's OK to look at env for the current mode here, because it's @@ -100,7 +100,7 @@ void arm_restore_state_to_opc(CPUState *cs, CPUARMState *env =3D cs->env_ptr; =20 if (is_a64(env)) { - if (TARGET_TB_PCREL) { + if (tb_cflags(tb) & CF_PCREL) { env->pc =3D (env->pc & TARGET_PAGE_MASK) | data[0]; } else { env->pc =3D data[0]; @@ -108,7 +108,7 @@ void arm_restore_state_to_opc(CPUState *cs, env->condexec_bits =3D 0; env->exception.syndrome =3D data[2] << ARM_INSN_START_WORD2_SHIFT; } else { - if (TARGET_TB_PCREL) { + if (tb_cflags(tb) & CF_PCREL) { env->regs[15] =3D (env->regs[15] & TARGET_PAGE_MASK) | data[0]; } else { env->regs[15] =3D data[0]; diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index da9f877476..b6d00b81da 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -143,7 +143,7 @@ static void reset_btype(DisasContext *s) static void gen_pc_plus_diff(DisasContext *s, TCGv_i64 dest, target_long d= iff) { assert(s->pc_save !=3D -1); - if (TARGET_TB_PCREL) { + if (tb_cflags(s->base.tb) & CF_PCREL) { tcg_gen_addi_i64(dest, cpu_pc, (s->pc_curr - s->pc_save) + diff); } else { tcg_gen_movi_i64(dest, s->pc_curr + diff); @@ -393,7 +393,7 @@ static void gen_goto_tb(DisasContext *s, int n, int64_t= diff) * update to pc to the unlinked path. A long chain of links * can thus avoid many updates to the PC. */ - if (TARGET_TB_PCREL) { + if (tb_cflags(s->base.tb) & CF_PCREL) { gen_a64_update_pc(s, diff); tcg_gen_goto_tb(n); } else { @@ -4297,7 +4297,7 @@ static void disas_pc_rel_adr(DisasContext *s, uint32_= t insn) if (page) { /* ADRP (page based) */ offset <<=3D 12; - /* The page offset is ok for TARGET_TB_PCREL. */ + /* The page offset is ok for CF_PCREL. */ offset -=3D s->pc_curr & 0xfff; } =20 @@ -14809,7 +14809,7 @@ static void aarch64_tr_insn_start(DisasContextBase = *dcbase, CPUState *cpu) DisasContext *dc =3D container_of(dcbase, DisasContext, base); target_ulong pc_arg =3D dc->base.pc_next; =20 - if (TARGET_TB_PCREL) { + if (tb_cflags(dcbase->tb) & CF_PCREL) { pc_arg &=3D ~TARGET_PAGE_MASK; } tcg_gen_insn_start(pc_arg, 0, 0); diff --git a/target/arm/translate.c b/target/arm/translate.c index c23a3462bf..0e7d3b8561 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -269,7 +269,7 @@ static target_long jmp_diff(DisasContext *s, target_lon= g diff) static void gen_pc_plus_diff(DisasContext *s, TCGv_i32 var, target_long di= ff) { assert(s->pc_save !=3D -1); - if (TARGET_TB_PCREL) { + if (tb_cflags(s->base.tb) & CF_PCREL) { tcg_gen_addi_i32(var, cpu_R[15], (s->pc_curr - s->pc_save) + diff); } else { tcg_gen_movi_i32(var, s->pc_curr + diff); @@ -2620,7 +2620,7 @@ static void gen_goto_tb(DisasContext *s, int n, targe= t_long diff) * update to pc to the unlinked path. A long chain of links * can thus avoid many updates to the PC. */ - if (TARGET_TB_PCREL) { + if (tb_cflags(s->base.tb) & CF_PCREL) { gen_update_pc(s, diff); tcg_gen_goto_tb(n); } else { @@ -9542,7 +9542,7 @@ static void arm_tr_insn_start(DisasContextBase *dcbas= e, CPUState *cpu) uint32_t condexec_bits; target_ulong pc_arg =3D dc->base.pc_next; =20 - if (TARGET_TB_PCREL) { + if (tb_cflags(dcbase->tb) & CF_PCREL) { pc_arg &=3D ~TARGET_PAGE_MASK; } if (dc->eci) { diff --git a/target/arm/translate.h b/target/arm/translate.h index 3717824b75..4001372acd 100644 --- a/target/arm/translate.h +++ b/target/arm/translate.h @@ -23,7 +23,7 @@ typedef struct DisasContext { /* The address of the current instruction being translated. */ target_ulong pc_curr; /* - * For TARGET_TB_PCREL, the full value of cpu_pc is not known + * For CF_PCREL, the full value of cpu_pc is not known * (although the page offset is known). For convenience, the * translation loop uses the full virtual address that triggered * the translation, from base.pc_start through pc_curr. --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018298; cv=none; d=zohomail.com; s=zohoarc; b=H7MeU/BuyHu37Fv4/xI0M5yO23NGF6a+F0ekt/JWTLlf//95b8RLPz6aJU9NLxIrQoiJ4d5AmLeg5Qm2V5ZSFBeZImtluioLiDWf2uvxRqouPQu5FTQuu+3eDlk7Q3icBId66PGibACYJB/ohhdOShiWEOCvHr19iz5YAYxQU2g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018298; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=C6mjPvLTY+Rt4ddZV5rRt65dkzbQtkDCLBJ25teMr1Q=; b=FemXPRLkWSRXZ5N3IyODIuZFs4I9cbUd6TgGw0H09eTNZZ8/ibAAcyT8O1zZEq0nMmGzIMiK+In3AA+L68ZMDtsZPbhxdra3FXP8tbAaKPLCi1P2OjSnOkl19wpVFVx/cM4yxMEK6RU0PtsAw4k2t8Fxc9SiqpBELm84a2Hh7ss= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018298639345.0693955430871; Tue, 21 Feb 2023 14:24:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUaye-0006R5-9f; Tue, 21 Feb 2023 17:19:12 -0500 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 1pUay7-0005w4-1e for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:40 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUay5-0005m0-4o for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=C6mjPvLTY+Rt4ddZV5rRt65dkzbQtkDCLBJ25teMr1Q=; b=ScLSzXZq20T7YYz75/yhBX5Bk5 YMu3CMsrbr9vdGLfP1ckQAx95zWbFDzO+IjTYqPwG20/x6gXOemzc7PcYNd2woygMru5WqLjefvUV QR0ggmQc/i1o6cVqf1lj6tUG0ijRd8SRtfFWnnHCi1kiheU/WRm3c+Veu9ZmFRPneBSo=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 07/27] target/i386: Replace `TARGET_TB_PCREL` with `CF_PCREL` Date: Tue, 21 Feb 2023 23:17:58 +0100 Message-Id: <20230221221818.9382-8-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018299222100003 Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/i386/helper.c | 2 +- target/i386/tcg/tcg-cpu.c | 6 +++--- target/i386/tcg/translate.c | 26 +++++++++++++------------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/target/i386/helper.c b/target/i386/helper.c index 0ac2da066d..8857444819 100644 --- a/target/i386/helper.c +++ b/target/i386/helper.c @@ -520,7 +520,7 @@ static inline target_ulong get_memio_eip(CPUX86State *e= nv) } =20 /* Per x86_restore_state_to_opc. */ - if (TARGET_TB_PCREL) { + if (cs->tcg_cflags & CF_PCREL) { return (env->eip & TARGET_PAGE_MASK) | data[0]; } else { return data[0] - env->segs[R_CS].base; diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index 79ac5908f7..c090ce152b 100644 --- a/target/i386/tcg/tcg-cpu.c +++ b/target/i386/tcg/tcg-cpu.c @@ -49,8 +49,8 @@ static void x86_cpu_exec_exit(CPUState *cs) static void x86_cpu_synchronize_from_tb(CPUState *cs, const TranslationBlock *tb) { - /* The instruction pointer is always up to date with TARGET_TB_PCREL. = */ - if (!TARGET_TB_PCREL) { + /* The instruction pointer is always up to date with CF_PCREL. */ + if (!(tb_cflags(tb) & CF_PCREL)) { CPUX86State *env =3D cs->env_ptr; env->eip =3D tb_pc(tb) - tb->cs_base; } @@ -64,7 +64,7 @@ static void x86_restore_state_to_opc(CPUState *cs, CPUX86State *env =3D &cpu->env; int cc_op =3D data[1]; =20 - if (TARGET_TB_PCREL) { + if (tb_cflags(tb) & CF_PCREL) { env->eip =3D (env->eip & TARGET_PAGE_MASK) | data[0]; } else { env->eip =3D data[0] - tb->cs_base; diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 9d9392b009..3fed6d96f9 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -545,7 +545,7 @@ static inline void gen_op_st_rm_T0_A0(DisasContext *s, = int idx, int d) static void gen_update_eip_cur(DisasContext *s) { assert(s->pc_save !=3D -1); - if (TARGET_TB_PCREL) { + if (tb_cflags(s->base.tb) & CF_PCREL) { tcg_gen_addi_tl(cpu_eip, cpu_eip, s->base.pc_next - s->pc_save); } else { tcg_gen_movi_tl(cpu_eip, s->base.pc_next - s->cs_base); @@ -556,7 +556,7 @@ static void gen_update_eip_cur(DisasContext *s) static void gen_update_eip_next(DisasContext *s) { assert(s->pc_save !=3D -1); - if (TARGET_TB_PCREL) { + if (tb_cflags(s->base.tb) & CF_PCREL) { tcg_gen_addi_tl(cpu_eip, cpu_eip, s->pc - s->pc_save); } else { tcg_gen_movi_tl(cpu_eip, s->pc - s->cs_base); @@ -588,7 +588,7 @@ static TCGv_i32 eip_next_i32(DisasContext *s) if (CODE64(s)) { return tcg_constant_i32(-1); } - if (TARGET_TB_PCREL) { + if (tb_cflags(s->base.tb) & CF_PCREL) { TCGv_i32 ret =3D tcg_temp_new_i32(); tcg_gen_trunc_tl_i32(ret, cpu_eip); tcg_gen_addi_i32(ret, ret, s->pc - s->pc_save); @@ -601,7 +601,7 @@ static TCGv_i32 eip_next_i32(DisasContext *s) static TCGv eip_next_tl(DisasContext *s) { assert(s->pc_save !=3D -1); - if (TARGET_TB_PCREL) { + if (tb_cflags(s->base.tb) & CF_PCREL) { TCGv ret =3D tcg_temp_new(); tcg_gen_addi_tl(ret, cpu_eip, s->pc - s->pc_save); return ret; @@ -613,7 +613,7 @@ static TCGv eip_next_tl(DisasContext *s) static TCGv eip_cur_tl(DisasContext *s) { assert(s->pc_save !=3D -1); - if (TARGET_TB_PCREL) { + if (tb_cflags(s->base.tb) & CF_PCREL) { TCGv ret =3D tcg_temp_new(); tcg_gen_addi_tl(ret, cpu_eip, s->base.pc_next - s->pc_save); return ret; @@ -1830,7 +1830,7 @@ static void gen_rot_rm_T1(DisasContext *s, MemOp ot, = int op1, int is_right) tcg_temp_free_i32(t0); tcg_temp_free_i32(t1); =20 - /* The CC_OP value is no longer predictable. */=20 + /* The CC_OP value is no longer predictable. */ set_cc_op(s, CC_OP_DYNAMIC); } =20 @@ -1923,7 +1923,7 @@ static void gen_rotc_rm_T1(DisasContext *s, MemOp ot,= int op1, gen_op_ld_v(s, ot, s->T0, s->A0); else gen_op_mov_v_reg(s, ot, s->T0, op1); - =20 + if (is_right) { switch (ot) { case MO_8: @@ -2319,7 +2319,7 @@ static TCGv gen_lea_modrm_1(DisasContext *s, AddressP= arts a, bool is_vsib) ea =3D cpu_regs[a.base]; } if (!ea) { - if (TARGET_TB_PCREL && a.base =3D=3D -2) { + if (tb_cflags(s->base.tb) & CF_PCREL && a.base =3D=3D -2) { /* With cpu_eip ~=3D pc_save, the expression is pc-relative. */ tcg_gen_addi_tl(s->A0, cpu_eip, a.disp - s->pc_save); } else { @@ -2867,7 +2867,7 @@ static void gen_jmp_rel(DisasContext *s, MemOp ot, in= t diff, int tb_num) if (!CODE64(s)) { if (ot =3D=3D MO_16) { mask =3D 0xffff; - if (TARGET_TB_PCREL && CODE32(s)) { + if (tb_cflags(s->base.tb) & CF_PCREL && CODE32(s)) { use_goto_tb =3D false; } } else { @@ -2879,7 +2879,7 @@ static void gen_jmp_rel(DisasContext *s, MemOp ot, in= t diff, int tb_num) gen_update_cc_op(s); set_cc_op(s, CC_OP_DYNAMIC); =20 - if (TARGET_TB_PCREL) { + if (tb_cflags(s->base.tb) & CF_PCREL) { tcg_gen_addi_tl(cpu_eip, cpu_eip, new_pc - s->pc_save); /* * If we can prove the branch does not leave the page and we have @@ -2896,13 +2896,13 @@ static void gen_jmp_rel(DisasContext *s, MemOp ot, = int diff, int tb_num) translator_use_goto_tb(&s->base, new_eip + s->cs_base)) { /* jump to same page: we can use a direct jump */ tcg_gen_goto_tb(tb_num); - if (!TARGET_TB_PCREL) { + if (!(tb_cflags(s->base.tb) & CF_PCREL)) { tcg_gen_movi_tl(cpu_eip, new_eip); } tcg_gen_exit_tb(s->base.tb, tb_num); s->base.is_jmp =3D DISAS_NORETURN; } else { - if (!TARGET_TB_PCREL) { + if (!(tb_cflags(s->base.tb) & CF_PCREL)) { tcg_gen_movi_tl(cpu_eip, new_eip); } if (s->jmp_opt) { @@ -7065,7 +7065,7 @@ static void i386_tr_insn_start(DisasContextBase *dcba= se, CPUState *cpu) target_ulong pc_arg =3D dc->base.pc_next; =20 dc->prev_insn_end =3D tcg_last_op(); - if (TARGET_TB_PCREL) { + if (tb_cflags(dcbase->tb) & CF_PCREL) { pc_arg -=3D dc->cs_base; pc_arg &=3D ~TARGET_PAGE_MASK; } --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018079; cv=none; d=zohomail.com; s=zohoarc; b=A4Ejops0hW8i7eATyGBLO9AbYUAF9l/7REPOtwHZ0lLXaFqU4QCUMUK/6ORTEqkHONuWcjY4yPD+vMjd+TwVh8I62q+KAyhMjX9vVIXLP2QEPb6aG+/+DbrDUKc+vzVPCwgN1BURo8xHBFV1bhbPYe7ELyCzmOAMN0YcP6Rh2Mg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018079; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=twE+Bc5W2i97XN1qglAozciMEAwV5rvkuTbCKqTFb4g=; b=EsWNo2Oq/Mk4IZ9sybbnNtk+Hyc3CbIpTSM+wS9FkUqoBDcL017Blc6Z1A/sTP8Ay7Rby6wnqauVhW0UfhEchmj3J7gAwk7yXzl8zMp9eg+SQfwG0zNQ5FguhFZu+142OSKsRLG/FL3NHx3Cy9U2OsZaSo4Ucy/bFcsxbKTLyVo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018079652382.1607829542146; Tue, 21 Feb 2023 14:21:19 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayI-0005yN-Ez; Tue, 21 Feb 2023 17:18:50 -0500 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 1pUay7-0005w6-Ho for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:40 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUay6-0005m8-2y for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=twE+Bc5W2i97XN1qglAozciMEAwV5rvkuTbCKqTFb4g=; b=foKqGMmHFLuaFpaBYG/ENke6+y N/x3G0AeuF5b/4Ygsq9EabUNqFSYw5OmT9Pr7lBzV9PZOpjqTJ83nPysohwHBYV+bQotA7A4iEXcc p3iXoxemZdHoAKQIR0JwzI0JxTz9nqkV1wGgM/NmKhZ1RyEUwYOLTqOGKbRH1yBK1TBU=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 08/27] include/exec: Remove `TARGET_TB_PCREL` define Date: Tue, 21 Feb 2023 23:17:59 +0100 Message-Id: <20230221221818.9382-9-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018080158100001 Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/exec/cpu-defs.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h index 21309cf567..67239b4e5e 100644 --- a/include/exec/cpu-defs.h +++ b/include/exec/cpu-defs.h @@ -54,9 +54,6 @@ # error TARGET_PAGE_BITS must be defined in cpu-param.h # endif #endif -#ifndef TARGET_TB_PCREL -# define TARGET_TB_PCREL 0 -#endif =20 #define TARGET_LONG_SIZE (TARGET_LONG_BITS / 8) =20 --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677017945; cv=none; d=zohomail.com; s=zohoarc; b=jsLJHLlJ+Bmkoh7A4piB7ZHdfUgLgAtXyV+QmfgE+iJkqRZme/KbRITnnRtO7xbixw5EXqUvsHgfX8Xsx7iuMAET8Uv4bm79sPzpsJoEW+8LJwOWSD/7aoBtjVwimAscbuQn47AKp65Ey0zTEULq0C/FwDCwx2yj7AvHUJ7GbfY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677017945; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=tIM39efNQiTGvD+PeJE3ysaYSM6wWV+Rn7T42r6/dw8=; b=L8hsEMtfYpL/mSHyH9pNbQO2GhBBvot7mHqWFV/HmVZOsvw58AmhrNE0e/yjkIeUc/S/fQ+2azxPgwcG5+Ju5HKfaZTrJD3KRLxX0t8+3MxLqW5s58lnc81gFoBf2KjA1zdfFJIpqnPV4yCuBum1/ZskCPdRjqqxKliCcgQkJ+w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677017945027424.67849459199385; Tue, 21 Feb 2023 14:19:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayA-0005x9-UC; Tue, 21 Feb 2023 17:18:42 -0500 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 1pUay8-0005wH-AZ for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:40 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUay6-0005mK-QF for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=tIM39efNQiTGvD+PeJE3ysaYSM6wWV+Rn7T42r6/dw8=; b=Y8EUW6+kaWPIzEuhFxwd/fTJ3p VGTLDocCMjN9GOLdFuhIqdvDiX/7TQ2brUMyznsDIo7hy3+FGiK1JmmxvCUplFz4YTmOjGiIam0+X 2yBrrzK4YG2FAEwiojB17/f082eLE6MejID+zRwaW67evk/D+d0ybxZoynOzXUAd+aRg=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 09/27] target/arm: Remove `TARGET_TB_PCREL` define Date: Tue, 21 Feb 2023 23:18:00 +0100 Message-Id: <20230221221818.9382-10-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677017945848100001 Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/cpu-param.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/arm/cpu-param.h b/target/arm/cpu-param.h index 53cac9c89b..b7bde18986 100644 --- a/target/arm/cpu-param.h +++ b/target/arm/cpu-param.h @@ -31,8 +31,6 @@ # define TARGET_PAGE_BITS_VARY # define TARGET_PAGE_BITS_MIN 10 =20 -# define TARGET_TB_PCREL 1 - /* * Cache the attrs and shareability fields from the page table entry. * --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018290; cv=none; d=zohomail.com; s=zohoarc; b=N87cFTpMxPB9tn7m4eEIrUJUcika8uGhpa9bmfzPzT728djvRhmtk9zY5VYJOsYDjsTGduaQRC/m73fk3VmoS80r7SqoSyapYutbdaCnSejclNIXcnQqiMS+J7tGvaSv+BuyKNv7gMUTZ1z8Dmi4nqvPsaWMJFVk/JFO9H6vpFE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018290; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=doywirzJsUyO+xWivsb+ifEE0x9f5qOf0b+nsDb3XMY=; b=mpfatf89txAERiCvhHYOVqL0AYid1veJEzdyvWHNDbjkfmOhwcCs0g370O9KYcZbtC3dhpw7u/09w+qWIQo5zqq9J6gqwftFeX7yDXsNDtJiOwIT+0oyoZhisdB0ZQYR7NXgkGGrD2huFMng6F2F10uB9rB86BGtKUhO2agZvzI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018290219818.0875265539541; Tue, 21 Feb 2023 14:24:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayW-0006DX-7R; Tue, 21 Feb 2023 17:19:04 -0500 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 1pUayD-0005xm-5m for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:46 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUayB-0005mW-L4 for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=doywirzJsUyO+xWivsb+ifEE0x9f5qOf0b+nsDb3XMY=; b=WHp/VGU7EB9/avWi4dJ7yssaP0 lkGmequ1+WNI57naN7eqBsXsY75GpQTijJ8ClAN7DiLXVigsYOWjYJGp7OZiLbO0kjzqrAAF2HhGu bLHbfL/BraAoICoMXJ+tnpbE6TRvq2QbVlcqNZEsdtl5ca05HG1DVBd2ZdV4jxtnT0jU=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 10/27] target/i386: Remove `TARGET_TB_PCREL` define Date: Tue, 21 Feb 2023 23:18:01 +0100 Message-Id: <20230221221818.9382-11-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018291174100003 Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/i386/cpu-param.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/target/i386/cpu-param.h b/target/i386/cpu-param.h index f579b16bd2..abad52af20 100644 --- a/target/i386/cpu-param.h +++ b/target/i386/cpu-param.h @@ -25,8 +25,4 @@ #define TARGET_PAGE_BITS 12 #define NB_MMU_MODES 5 =20 -#ifndef CONFIG_USER_ONLY -# define TARGET_TB_PCREL 1 -#endif - #endif --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018286; cv=none; d=zohomail.com; s=zohoarc; b=Oz+nhq6A9zIKP+dhKyG+DWwj75NcuaRGxNqx3idv4Td3b/2FmOGwKFUuDP4Ee8iHNLYDAYKBGPjTotweMzXW9ZGGqJIYrWYobq4Tfsu3OtMzLGjw7SB5Ubeb2re3OeYQ0S8OTBDFfaFGJHTj/dXztc1YmcSDg0mqc8kzvc8MoGU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018286; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Kyj94S60eyBmWpfmTBuSsKSdTXoHeHrERXIVoe5UlCg=; b=C7UVgAdZMIv1aU6dvAI9iDcYrU6JvNGyVOqaJstWFALkdfqi6BDfx4ttT+T/TpSW4i9N/RtDbQTFNJRdD+k+OHb2h86lEmiV8/LiyXksbNk6j+oEMF8xxZQoq1GkmOhH8d5+EdiAm0PHdj1matujOu5+BxQCMnNr6+vK6k53rG8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018286357923.7097976769194; Tue, 21 Feb 2023 14:24:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayZ-0006JO-Eu; Tue, 21 Feb 2023 17:19:07 -0500 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 1pUayE-0005xr-BQ for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:46 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUayC-0005ml-Cs for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Kyj94S60eyBmWpfmTBuSsKSdTXoHeHrERXIVoe5UlCg=; b=FPpvw0f71VkF0UjhCzT/GrgaiG k2rSBfkozRWpqkOuc0efgGvmGPVmztM9u9RZ41ihjT93Oc8eVGb46ykRmQkVPvXVF9LEVWabV3Qaq NwiKNvGNbLEhaSOVNVwZYEA2T7qY/HrQH1qyosvC3BgqxlZcvOaONTKkXY3rMAvgKIPw=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 11/27] accel/tcg: Move jmp-cache `CF_PCREL` checks to caller Date: Tue, 21 Feb 2023 23:18:02 +0100 Message-Id: <20230221221818.9382-12-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> MIME-Version: 1.0 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018287178100015 Content-Type: text/plain; charset="utf-8" tb-jmp-cache.h contains a few small functions that only exist to hide a CF_PCREL check, however the caller often already performs such a check. This patch moves CF_PCREL checks from the callee to the caller, and also removes these functions which now only hide an access of the jmp-cache. Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- accel/tcg/cpu-exec.c | 56 +++++++++++++++++++++++++++++----------- accel/tcg/tb-jmp-cache.h | 36 -------------------------- 2 files changed, 41 insertions(+), 51 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 92b833adcf..5efa8bf42a 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -256,21 +256,46 @@ static inline TranslationBlock *tb_lookup(CPUState *c= pu, target_ulong pc, =20 hash =3D tb_jmp_cache_hash_func(pc); jc =3D cpu->tb_jmp_cache; - tb =3D tb_jmp_cache_get_tb(jc, cflags, hash); - - if (likely(tb && - tb_jmp_cache_get_pc(jc, hash, tb) =3D=3D pc && - tb->cs_base =3D=3D cs_base && - tb->flags =3D=3D flags && - tb->trace_vcpu_dstate =3D=3D *cpu->trace_dstate && - tb_cflags(tb) =3D=3D cflags)) { - return tb; - } - tb =3D tb_htable_lookup(cpu, pc, cs_base, flags, cflags); - if (tb =3D=3D NULL) { - return NULL; + + if (cflags & CF_PCREL) { + /* Use acquire to ensure current load of pc from jc. */ + tb =3D qatomic_load_acquire(&jc->array[hash].tb); + + if (likely(tb && + jc->array[hash].pc =3D=3D pc && + tb->cs_base =3D=3D cs_base && + tb->flags =3D=3D flags && + tb->trace_vcpu_dstate =3D=3D *cpu->trace_dstate && + tb_cflags(tb) =3D=3D cflags)) { + return tb; + } + tb =3D tb_htable_lookup(cpu, pc, cs_base, flags, cflags); + if (tb =3D=3D NULL) { + return NULL; + } + jc->array[hash].pc =3D pc; + /* Use store_release on tb to ensure pc is written first. */ + qatomic_store_release(&jc->array[hash].tb, tb); + } else { + /* Use rcu_read to ensure current load of pc from *tb. */ + tb =3D qatomic_rcu_read(&jc->array[hash].tb); + + if (likely(tb && + tb_pc(tb) =3D=3D pc && + tb->cs_base =3D=3D cs_base && + tb->flags =3D=3D flags && + tb->trace_vcpu_dstate =3D=3D *cpu->trace_dstate && + tb_cflags(tb) =3D=3D cflags)) { + return tb; + } + tb =3D tb_htable_lookup(cpu, pc, cs_base, flags, cflags); + if (tb =3D=3D NULL) { + return NULL; + } + /* Use the pc value already stored in tb->pc. */ + qatomic_set(&jc->array[hash].tb, tb); } - tb_jmp_cache_set(jc, hash, tb, pc); + return tb; } =20 @@ -959,7 +984,8 @@ cpu_exec_loop(CPUState *cpu, SyncClocks *sc) * for the fast lookup */ h =3D tb_jmp_cache_hash_func(pc); - tb_jmp_cache_set(cpu->tb_jmp_cache, h, tb, pc); + /* Use the pc value already stored in tb->pc. */ + qatomic_set(&cpu->tb_jmp_cache->array[h].tb, tb); } =20 #ifndef CONFIG_USER_ONLY diff --git a/accel/tcg/tb-jmp-cache.h b/accel/tcg/tb-jmp-cache.h index 083939b302..bee87eb840 100644 --- a/accel/tcg/tb-jmp-cache.h +++ b/accel/tcg/tb-jmp-cache.h @@ -25,40 +25,4 @@ struct CPUJumpCache { } array[TB_JMP_CACHE_SIZE]; }; =20 -static inline TranslationBlock * -tb_jmp_cache_get_tb(CPUJumpCache *jc, uint32_t cflags, uint32_t hash) -{ - if (cflags & CF_PCREL) { - /* Use acquire to ensure current load of pc from jc. */ - return qatomic_load_acquire(&jc->array[hash].tb); - } else { - /* Use rcu_read to ensure current load of pc from *tb. */ - return qatomic_rcu_read(&jc->array[hash].tb); - } -} - -static inline target_ulong -tb_jmp_cache_get_pc(CPUJumpCache *jc, uint32_t hash, TranslationBlock *tb) -{ - if (tb_cflags(tb) & CF_PCREL) { - return jc->array[hash].pc; - } else { - return tb_pc(tb); - } -} - -static inline void -tb_jmp_cache_set(CPUJumpCache *jc, uint32_t hash, - TranslationBlock *tb, target_ulong pc) -{ - if (tb_cflags(tb) & CF_PCREL) { - jc->array[hash].pc =3D pc; - /* Use store_release on tb to ensure pc is written first. */ - qatomic_store_release(&jc->array[hash].tb, tb); - } else{ - /* Use the pc value already stored in tb->pc. */ - qatomic_set(&jc->array[hash].tb, tb); - } -} - #endif /* ACCEL_TCG_TB_JMP_CACHE_H */ --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018269; cv=none; d=zohomail.com; s=zohoarc; b=Ec697G9EqpERxnXl84y8uiZBSpVaKpw03XDSexbrhhT4nKhlO1uwXkE7LMfbNFV6Gm6wRNa/62M0S4c3J79D6cGptG4MMb98L4OzPokzGB10iJY3+yl9MMJqfpZKkznCk0yDDya30Q+/dgm83om1KI5ypaqUGPT9Hm6kR3/3HPQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018269; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=6VgdMLs8oHPK6o7CEm3aAGdG4O2Bp2IBzAWvxLQWnkA=; b=U4WrN26M44a7JmUDVtAj3DeOEyZUX2uH89sdoBsc9ukBwDxg5eBoP372v5QyH3ouvbjzbNUPGY6GvNRNb+8DqEfRvmZ7kDceKGksWcVRDtlJ5hwk931DhbGTmjzOtObDl4uxx/WLVKFgOzBwIzayW98qFfgErIvn2KypFp6GKQ0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018269301213.57298779631924; Tue, 21 Feb 2023 14:24:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayZ-0006Ip-5E; Tue, 21 Feb 2023 17:19:07 -0500 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 1pUayF-0005y3-1h for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:47 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUayD-0005mx-Dm for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=6VgdMLs8oHPK6o7CEm3aAGdG4O2Bp2IBzAWvxLQWnkA=; b=Gk0bbcPWAlBdC8m9QpKdt8yFZA uNrBMFAacKQY5UMkY9WxwuIEVWUl8NOfW/KE7F08epb/hP1yQwH6jgkHz+BDto5y0hYfaaLRjLIhi t7Du0Kj3Q2bA03tnnAgiFgJ/eiFSlWqzXvfvtspusgvO9RwSuRcREvvc6ula3MDz9fyU=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 12/27] accel/tcg: Replace `tb_pc()` with `tb->pc` Date: Tue, 21 Feb 2023 23:18:03 +0100 Message-Id: <20230221221818.9382-13-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> MIME-Version: 1.0 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018271153100006 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- accel/tcg/cpu-exec.c | 6 +++--- accel/tcg/internal.h | 2 +- accel/tcg/tb-maint.c | 8 ++++---- accel/tcg/translate-all.c | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 5efa8bf42a..9fb0fabf95 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -185,7 +185,7 @@ static bool tb_lookup_cmp(const void *p, const void *d) const TranslationBlock *tb =3D p; const struct tb_desc *desc =3D d; =20 - if ((tb_cflags(tb) & CF_PCREL || tb_pc(tb) =3D=3D desc->pc) && + if ((tb_cflags(tb) & CF_PCREL || tb->pc =3D=3D desc->pc) && tb_page_addr0(tb) =3D=3D desc->page_addr0 && tb->cs_base =3D=3D desc->cs_base && tb->flags =3D=3D desc->flags && @@ -281,7 +281,7 @@ static inline TranslationBlock *tb_lookup(CPUState *cpu= , target_ulong pc, tb =3D qatomic_rcu_read(&jc->array[hash].tb); =20 if (likely(tb && - tb_pc(tb) =3D=3D pc && + tb->pc =3D=3D pc && tb->cs_base =3D=3D cs_base && tb->flags =3D=3D flags && tb->trace_vcpu_dstate =3D=3D *cpu->trace_dstate && @@ -486,7 +486,7 @@ cpu_tb_exec(CPUState *cpu, TranslationBlock *itb, int *= tb_exit) } else { tcg_debug_assert(!(tb_cflags(last_tb) & CF_PCREL)); assert(cc->set_pc); - cc->set_pc(cpu, tb_pc(last_tb)); + cc->set_pc(cpu, last_tb->pc); } if (qemu_loglevel_mask(CPU_LOG_EXEC)) { target_ulong pc =3D log_pc(cpu, last_tb); diff --git a/accel/tcg/internal.h b/accel/tcg/internal.h index 261924e7fa..17b52ecdb7 100644 --- a/accel/tcg/internal.h +++ b/accel/tcg/internal.h @@ -60,7 +60,7 @@ static inline target_ulong log_pc(CPUState *cpu, const Tr= anslationBlock *tb) if (tb_cflags(tb) & CF_PCREL) { return cpu->cc->get_pc(cpu); } else { - return tb_pc(tb); + return tb->pc; } } =20 diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index 2dbc2ce172..efefa08ee1 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -44,7 +44,7 @@ static bool tb_cmp(const void *ap, const void *bp) const TranslationBlock *a =3D ap; const TranslationBlock *b =3D bp; =20 - return ((tb_cflags(a) & CF_PCREL || tb_pc(a) =3D=3D tb_pc(b)) && + return ((tb_cflags(a) & CF_PCREL || a->pc =3D=3D b->pc) && a->cs_base =3D=3D b->cs_base && a->flags =3D=3D b->flags && (tb_cflags(a) & ~CF_INVALID) =3D=3D (tb_cflags(b) & ~CF_INVALI= D) && @@ -853,7 +853,7 @@ static void tb_jmp_cache_inval_tb(TranslationBlock *tb) tcg_flush_jmp_cache(cpu); } } else { - uint32_t h =3D tb_jmp_cache_hash_func(tb_pc(tb)); + uint32_t h =3D tb_jmp_cache_hash_func(tb->pc); =20 CPU_FOREACH(cpu) { CPUJumpCache *jc =3D cpu->tb_jmp_cache; @@ -885,7 +885,7 @@ static void do_tb_phys_invalidate(TranslationBlock *tb,= bool rm_from_page_list) =20 /* remove the TB from the hash list */ phys_pc =3D tb_page_addr0(tb); - h =3D tb_hash_func(phys_pc, (orig_cflags & CF_PCREL ? 0 : tb_pc(tb)), + h =3D tb_hash_func(phys_pc, (orig_cflags & CF_PCREL ? 0 : tb->pc), tb->flags, orig_cflags, tb->trace_vcpu_dstate); if (!qht_remove(&tb_ctx.htable, tb, h)) { return; @@ -966,7 +966,7 @@ TranslationBlock *tb_link_page(TranslationBlock *tb, tb= _page_addr_t phys_pc, tb_record(tb, p, p2); =20 /* add in the hash table */ - h =3D tb_hash_func(phys_pc, (tb->cflags & CF_PCREL ? 0 : tb_pc(tb)), + h =3D tb_hash_func(phys_pc, (tb->cflags & CF_PCREL ? 0 : tb->pc), tb->flags, tb->cflags, tb->trace_vcpu_dstate); qht_insert(&tb_ctx.htable, tb, h, &existing_tb); =20 diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 6ae3cc9d71..389d0a940b 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -135,7 +135,7 @@ static int encode_search(TranslationBlock *tb, uint8_t = *block) =20 for (j =3D 0; j < TARGET_INSN_START_WORDS; ++j) { if (i =3D=3D 0) { - prev =3D (!(tb_cflags(tb) & CF_PCREL) && j =3D=3D 0 ? tb_p= c(tb) : 0); + prev =3D (!(tb_cflags(tb) & CF_PCREL) && j =3D=3D 0 ? tb->= pc : 0); } else { prev =3D tcg_ctx->gen_insn_data[i - 1][j]; } @@ -171,7 +171,7 @@ static int cpu_unwind_data_from_tb(TranslationBlock *tb= , uintptr_t host_pc, =20 memset(data, 0, sizeof(uint64_t) * TARGET_INSN_START_WORDS); if (!(tb_cflags(tb) & CF_PCREL)) { - data[0] =3D tb_pc(tb); + data[0] =3D tb->pc; } =20 /* --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018312; cv=none; d=zohomail.com; s=zohoarc; b=Ilin7f+n6bJpFcOOxd/RfweldvUt/7EoSFkmQ+upxrbcRpWZ6BJqyu1GoCO+56Zw4mJ62ZFa1kHFLgApPM1gorTpZLxxsYxzLFOO6oA5FOFvugQ1224VAZ4BEq2Jzm+r+RL0Jr0U9q5K38iHpUFwsF52L0ELeyo9oxad4HG7Xdw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018312; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=EB81bmSOJmL90kWJyH3l431tqnm2AiiJrKlcgOcmXdE=; b=czpNl5Ssk1Prb70g09exwjYJDh9N7Nc9i4+Te/of6341HTdvk7ZNkAqOt5xFna4IW4ko1rLeK7VtdwEDADS+RBFsakNSotxJY4iZzv0FMoTTnEIyN9BP/ao5qAlmXRqWBmjJlEjnj6rPSPbjUprUGAuT/yS/1U/9Hw2GSWkttzc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 167701831278680.55068581784224; Tue, 21 Feb 2023 14:25:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayf-0006Sv-DZ; Tue, 21 Feb 2023 17:19:13 -0500 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 1pUayG-0005yR-1H for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:48 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUayE-0005n5-7z for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=EB81bmSOJmL90kWJyH3l431tqnm2AiiJrKlcgOcmXdE=; b=nWTxJ8c/bPRXL+H5yvb4j6U40+ gV++sAH77Rhej/E7TMV3BslvJyCujYxH1UjBzuHQcOkhzYdLfGmW4fU5kSv44sdSQvQtmeQyFvrht r07M2FSY9GJLfBUoUlcj0H6+A23dRLrw6iPjrjyLpp11JTFxY/Ef0xbLdUOJ06Ir+kiE=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 13/27] target/tricore: Replace `tb_pc()` with `tb->pc` Date: Tue, 21 Feb 2023 23:18:04 +0100 Message-Id: <20230221221818.9382-14-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> MIME-Version: 1.0 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018313252100005 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/tricore/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c index 594cd1efd5..d0a9272961 100644 --- a/target/tricore/cpu.c +++ b/target/tricore/cpu.c @@ -55,7 +55,8 @@ static void tricore_cpu_synchronize_from_tb(CPUState *cs, TriCoreCPU *cpu =3D TRICORE_CPU(cs); CPUTriCoreState *env =3D &cpu->env; =20 - env->PC =3D tb_pc(tb); + tcg_debug_assert(!(cs->tcg_cflags & CF_PCREL)); + env->PC =3D tb->pc; } =20 static void tricore_restore_state_to_opc(CPUState *cs, --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018260; cv=none; d=zohomail.com; s=zohoarc; b=ChhNtU1bJzuxuYsObB0war4glWTSNgZMZz4WwsVKWX77xntKqc8SXz9Cl8zyfvexf78xtYnWHa+HZ/oZSNx677eMB1y2Gz31KldWvKQtv4VAIjln6ikXLbpuqtD1100OHQe+wz/P1k4Rrz0Bhx1IjmUegIDED0TPD00O8skqQOQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018260; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=3nQfcbZggv250L4g3Tfg1kKXggh4/O/EBMKH0Jrx8Os=; b=Y2gK4GvUCtCjaPhITDQjF+cQcuXPCGFtMCoqQkD2F1Fmo+jSrqJ5BU+qyBlyw9pWVOQpuEm0T2SFHdIAKWPmjcuCA5uw7HUm3tAdodAazK6ltB679Gd+huVelmP1I0oJcieOO5rOWbhTLxjRhgHhIu13id223vlJKSbU/QsiK1o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018260266647.9029439163841; Tue, 21 Feb 2023 14:24:20 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayY-0006Hn-Ng; Tue, 21 Feb 2023 17:19:06 -0500 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 1pUayH-0005ya-6B for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:50 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUayF-0005nR-1e for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=3nQfcbZggv250L4g3Tfg1kKXggh4/O/EBMKH0Jrx8Os=; b=IfIaXMnFooP4/blUXdmNgAyYTu UrITSEBC/BMEHCtzgctQFhcFedEcx6BURE89J8ElPBKR2Ae+rnk0ZUvaE092ANnN74N6t+HuMuWy+ CFK18Wtsw7Jopy2s/k6m5hT7xwJYF6LS7jbFlxwuOmSNW1KzsbxvN1h316qtDM9oc5pc=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 14/27] target/sparc: Replace `tb_pc()` with `tb->pc` Date: Tue, 21 Feb 2023 23:18:05 +0100 Message-Id: <20230221221818.9382-15-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> MIME-Version: 1.0 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018261109100005 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/sparc/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index 1734ef8dc6..e329a7aece 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -25,6 +25,7 @@ #include "exec/exec-all.h" #include "hw/qdev-properties.h" #include "qapi/visitor.h" +#include "tcg/tcg.h" =20 //#define DEBUG_FEATURES =20 @@ -707,7 +708,8 @@ static void sparc_cpu_synchronize_from_tb(CPUState *cs, { SPARCCPU *cpu =3D SPARC_CPU(cs); =20 - cpu->env.pc =3D tb_pc(tb); + tcg_debug_assert(!(cs->tcg_cflags & CF_PCREL)); + cpu->env.pc =3D tb->pc; cpu->env.npc =3D tb->cs_base; } =20 --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018320; cv=none; d=zohomail.com; s=zohoarc; b=kqyJ1gTC6VE4podWiJc9lSI9qHQWoWVU5WDeF0501/eP22V71zXKjxIrFARG/g/YPIRqf97b7pLCbaHs6wuciIyMhTTXlpuJQFLO+EqJFwKqw71PjO0rUFcED9/4WwPnetaGni1wzTAEp8K4ki1EYVNvhYlQPDlg0eJIl+JWbfI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018320; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=+tnppTd0ieQ5tTrzXiinNQOOLGRYOQzmgd5/Nx9T5Eo=; b=C62P/kI7ukAibVbVCCpw8sELjLwUoq+5uXU9oOAd3ff9InbA9Ko2Znf4VAXm5WKnPLj5SF/GXAdFCvqj/1DDT6R5A8kOk8MsrlHNqETP4B/0sCpTDwCAC2kTHa3R383CmhefsfXt70VKnQXdzeqP0I0WlRXXNc0Hq4yQLd+FkgM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018320565223.37871499920595; Tue, 21 Feb 2023 14:25:20 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUaya-0006NM-UQ; Tue, 21 Feb 2023 17:19:09 -0500 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 1pUayH-0005yc-Ce for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:50 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUayG-0005no-1X for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=+tnppTd0ieQ5tTrzXiinNQOOLGRYOQzmgd5/Nx9T5Eo=; b=qcK/0FZB8yT38Hxp5tBRDPGcpt nIcqm7Gvl3mhv+2GngkSku9kcDySGJki7jzcu6JYzGcpW+aT9i9UtdBb8T9DTXKZrvv9K6fEUc2Vk XT+m0imn/L4ixP2TwPJQXluf7PWBLnikO1Zy1799cYe7NNnmVJ9VfGFZrdFPAg/lmi30=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 15/27] target/sh4: Replace `tb_pc()` with `tb->pc` Date: Tue, 21 Feb 2023 23:18:06 +0100 Message-Id: <20230221221818.9382-16-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> MIME-Version: 1.0 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018321515100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/sh4/cpu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index f0934b20fa..61769ffdfa 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -26,6 +26,7 @@ #include "migration/vmstate.h" #include "exec/exec-all.h" #include "fpu/softfloat-helpers.h" +#include "tcg/tcg.h" =20 static void superh_cpu_set_pc(CPUState *cs, vaddr value) { @@ -46,7 +47,8 @@ static void superh_cpu_synchronize_from_tb(CPUState *cs, { SuperHCPU *cpu =3D SUPERH_CPU(cs); =20 - cpu->env.pc =3D tb_pc(tb); + tcg_debug_assert(!(cs->tcg_cflags & CF_PCREL)); + cpu->env.pc =3D tb->pc; cpu->env.flags =3D tb->flags & TB_FLAG_ENVFLAGS_MASK; } =20 @@ -73,7 +75,7 @@ static bool superh_io_recompile_replay_branch(CPUState *c= s, CPUSH4State *env =3D &cpu->env; =20 if ((env->flags & (TB_FLAG_DELAY_SLOT | TB_FLAG_DELAY_SLOT_COND)) - && env->pc !=3D tb_pc(tb)) { + && !(cs->tcg_cflags & CF_PCREL) && env->pc !=3D tb->pc) { env->pc -=3D 2; env->flags &=3D ~(TB_FLAG_DELAY_SLOT | TB_FLAG_DELAY_SLOT_COND); return true; --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018284; cv=none; d=zohomail.com; s=zohoarc; b=Bn/uRpQly5fqoOsz0Pz2meqPTJhfbyq/1kEetwMFJKKPSGDrILw149Xumn9Re5qsLPoWoFMLnr15cAH6Y/hEi5nbLL2LRb5+LbTelf4jK7Yb4nvjLc0gKkafOqegFCTyreouRF/aF/sX4or2j9oBp37HOBJmWS1hm0Hr8S/xXLY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018284; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=sA90LNhqZWnyvLu/psPK28x9hPX3ETO9FqO4nqKD+/c=; b=ZuijxClmaOuuecLJg8keShMjWgcq6UK+Rq8ZWnGT9/ih+tq00l+7Hs7FhBE6omTHw1fCod+4ogveyamKAle8jL2N+RAaX2MyO5eaTURqdb1dYWtLmAUBPMLMU02D0F3UHi1XFbPMDQhs5ZXw/SXsVMsSS0ykZLtnquk84intsQc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018284457811.9516090733521; Tue, 21 Feb 2023 14:24:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUaya-0006Lw-Bu; Tue, 21 Feb 2023 17:19:08 -0500 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 1pUayJ-0005zG-Qq for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:54 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUayH-0005o7-AU for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=sA90LNhqZWnyvLu/psPK28x9hPX3ETO9FqO4nqKD+/c=; b=L5qBYJ1TJUYJ1I6Fv+Nnd/CzH/ PcBHMOalRZkyNjULbNbdirHy9x61Qh9t0TVs6mMW2WRMguqACtnmyXE/e3LnKAhhIV1ZGDJscCWs8 JHqvwz021NSRgOU1B9dzvES4IXI98sa36aIyE4O7Af0wNL7a44T4EgIWujmaJZvr4dPY=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 16/27] target/rx: Replace `tb_pc()` with `tb->pc` Date: Tue, 21 Feb 2023 23:18:07 +0100 Message-Id: <20230221221818.9382-17-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> MIME-Version: 1.0 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018285299100004 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/rx/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/rx/cpu.c b/target/rx/cpu.c index 219ef28e46..67452e310c 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -44,7 +44,8 @@ static void rx_cpu_synchronize_from_tb(CPUState *cs, { RXCPU *cpu =3D RX_CPU(cs); =20 - cpu->env.pc =3D tb_pc(tb); + tcg_debug_assert(!(cs->tcg_cflags & CF_PCREL)); + cpu->env.pc =3D tb->pc; } =20 static void rx_restore_state_to_opc(CPUState *cs, --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018260; cv=none; d=zohomail.com; s=zohoarc; b=P1SdjBUDJizic95lVrTVhYPzNEs68ZBBejzLM9T2VQZQbVr3RMPDOBEAzKWBLzlF/s+2A6CHE5NOXAksxRnkUuBAe4HnOhZHe6MyLKEgZeh3ZdUzTKKUg8C6baXOSXWGA3PKr0k9YMjrAKOqxJo7/kjUkDVsqBJk57u6CvDpdbc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018260; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=FDVBm9lSbEjUimL2HZZv8imYG5OyJlj+scxrd6CqICU=; b=Iddy032nmtGsBcjBFOHzJ3kC2qOEeY5FPllA7m1/Yxh3jc5Fei0YrKU683Wm+pdn+qylvAGRcGBLn8t3HbSYOzFB1I+NTGIhy1lzekmceOiKiXE33LTtiZ9klwfvFMGnp0R+XnM6isX5z+eTn5HvQY9W5m/n4qYDFZYl+7uisBE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018260847533.0059919089177; Tue, 21 Feb 2023 14:24:20 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayc-0006Pa-SK; Tue, 21 Feb 2023 17:19:10 -0500 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 1pUayK-0005zK-W5 for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:55 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUayI-0005oQ-2g for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=FDVBm9lSbEjUimL2HZZv8imYG5OyJlj+scxrd6CqICU=; b=wdSHz8dZqzsmTrQwUz6YdWDPi3 8MHwN/kkwOz+5y5WCsyEyNNBLdOG7Fu1YGCPUYE5Gd1m6D0/7/VxJHor8tjDxCnrR5nZ+xUn0HQgs PlgoM5qGmNpcXw1UwFATX5bfoKV/RZYS4QhTtjspm83zqE58T4W5dHc4kkdMtnenyjgw=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 17/27] target/riscv: Replace `tb_pc()` with `tb->pc` Date: Tue, 21 Feb 2023 23:18:08 +0100 Message-Id: <20230221221818.9382-18-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> MIME-Version: 1.0 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018261116100007 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/riscv/cpu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 0dd2f0c753..ee1d4fd823 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -34,6 +34,7 @@ #include "fpu/softfloat-helpers.h" #include "sysemu/kvm.h" #include "kvm_riscv.h" +#include "tcg/tcg.h" =20 /* RISC-V CPU definitions */ =20 @@ -533,10 +534,12 @@ static void riscv_cpu_synchronize_from_tb(CPUState *c= s, CPURISCVState *env =3D &cpu->env; RISCVMXL xl =3D FIELD_EX32(tb->flags, TB_FLAGS, XL); =20 + tcg_debug_assert(!(cs->tcg_cflags & CF_PCREL)); + if (xl =3D=3D MXL_RV32) { - env->pc =3D (int32_t)tb_pc(tb); + env->pc =3D (int32_t) tb->pc; } else { - env->pc =3D tb_pc(tb); + env->pc =3D tb->pc; } } =20 --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018284; cv=none; d=zohomail.com; s=zohoarc; b=cnXA+gc5g7WKSDP9R/fJLKwVt1dMdD3MmkyQYj02vVmOMUpmTROWKPm0VmGspl6VwR6UQNwDGp6ynFj28Fdoy8yYTWQ5Ml+89pdP2zwdQx676SKeHy+mCP8fjXUeqpM1je7UMFwWhHAfCsO232MmA9CxMlCFcQUKXytFQoOZ2ew= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018284; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=1WfrLwQehNYaX7vP7g9RSKuk31YrAXlYg0RziUZ6QGQ=; b=iF3UZrDfpid6523ARWlQwgFpUoP5NBItjRuKOS3cej6Lsq0aBmYOVM3+NRIJRMDGAGPMw8j78JDmf7OBKvpFOExfiOiHa21z/DZ50kaZA56sbsiN3lQZ1gUA16IgsTCBRdE+0lS/K56hoM6VX6EEhpyJ5d5my93LstOYsJo4FmQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018284632647.9591198806725; Tue, 21 Feb 2023 14:24:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUaye-0006RJ-F5; Tue, 21 Feb 2023 17:19:12 -0500 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 1pUayM-0005zd-6c for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:59 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUayJ-0005oy-OP for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=1WfrLwQehNYaX7vP7g9RSKuk31YrAXlYg0RziUZ6QGQ=; b=LCRDeZS1cLvjWEqgWK6ffIXNxF lnCgaHir9mTJ1cZL2wWvQSeANh2n9KRBJ1bIgkwcdtdra0Ryxjw41Z8awAOTDJbbz5vl9uxSXfmIm vYJM2qHRfiz/htvP7f7/XZWvQYGERIHKRKG8kFYo0N66o2wo6EFNtaT9Y8ZvokpuKytc=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 18/27] target/openrisc: Replace `tb_pc()` with `tb->pc` Date: Tue, 21 Feb 2023 23:18:09 +0100 Message-Id: <20230221221818.9382-19-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> MIME-Version: 1.0 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018285299100006 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/openrisc/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c index 4c11a1f7ad..0ce4f796fa 100644 --- a/target/openrisc/cpu.c +++ b/target/openrisc/cpu.c @@ -22,6 +22,7 @@ #include "qemu/qemu-print.h" #include "cpu.h" #include "exec/exec-all.h" +#include "tcg/tcg.h" =20 static void openrisc_cpu_set_pc(CPUState *cs, vaddr value) { @@ -43,7 +44,8 @@ static void openrisc_cpu_synchronize_from_tb(CPUState *cs, { OpenRISCCPU *cpu =3D OPENRISC_CPU(cs); =20 - cpu->env.pc =3D tb_pc(tb); + tcg_debug_assert(!(cs->tcg_cflags & CF_PCREL)); + cpu->env.pc =3D tb->pc; } =20 static void openrisc_restore_state_to_opc(CPUState *cs, --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018269; cv=none; d=zohomail.com; s=zohoarc; b=QPhXAaj9n09CwWZgxxkvrOhKjGIWdlw9aONe0vnuGWeG9aAc+WbMtqZHGbKH9hwkz+WtthLxJrTaj3x6KNt69YtMUCKE35MSFOzOrV4YpCNko7mBZC07mAUIFTovRkTz0Ej58X8S1zXdqF4riHiObA80+51nvGRboWBDbePJAK0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018269; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=akbasktphCKf/nJF3dxy/eBcZ7+zZ4h3Byd5jES6dlo=; b=F3W6dgF4gZau0en5Or1UnzW+W2b2CnNEHY3ppdAjOFpb0ZjilW06AwI+yMSPXh9tYVB/quQR1F98YXoFCRlyvcDoVVDjsVAE3GC92FzyRTXr7hy2Ss/Vg+nuc5qxIrfyHa+yoBM0Zwk+5WV3WMImElfU6kqSgAEGNvOOmCfSR+c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018269601433.0739027562587; Tue, 21 Feb 2023 14:24:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayd-0006QU-RS; Tue, 21 Feb 2023 17:19:11 -0500 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 1pUayL-0005zN-Ks for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:57 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUayJ-0005ow-K5 for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=akbasktphCKf/nJF3dxy/eBcZ7+zZ4h3Byd5jES6dlo=; b=plbM7qL37fPXOf/ywoWtmOq1rS 2ga3JUmCr7A0/IfbjsKMPxkJuQAgRhbg+UDqmI+6oytzJeEqeLIjKTgDZGFPnOvpVcjSczemv8E/C sG+fh9yfZyPwrKHhPv9IQDsn+AjnYpcLs+ojz+Fif0parUh94S2uJkHo/jtWGecPSxvg=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 19/27] target/mips: Replace `tb_pc()` with `tb->pc` Date: Tue, 21 Feb 2023 23:18:10 +0100 Message-Id: <20230221221818.9382-20-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> MIME-Version: 1.0 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018271142100005 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/tcg/exception.c | 3 ++- target/mips/tcg/sysemu/special_helper.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/target/mips/tcg/exception.c b/target/mips/tcg/exception.c index 96e61170e6..da49a93912 100644 --- a/target/mips/tcg/exception.c +++ b/target/mips/tcg/exception.c @@ -82,7 +82,8 @@ void mips_cpu_synchronize_from_tb(CPUState *cs, const Tra= nslationBlock *tb) MIPSCPU *cpu =3D MIPS_CPU(cs); CPUMIPSState *env =3D &cpu->env; =20 - env->active_tc.PC =3D tb_pc(tb); + tcg_debug_assert(!(cs->tcg_cflags & CF_PCREL)); + env->active_tc.PC =3D tb->pc; env->hflags &=3D ~MIPS_HFLAG_BMASK; env->hflags |=3D tb->flags & MIPS_HFLAG_BMASK; } diff --git a/target/mips/tcg/sysemu/special_helper.c b/target/mips/tcg/syse= mu/special_helper.c index 3c5f35c759..93276f789d 100644 --- a/target/mips/tcg/sysemu/special_helper.c +++ b/target/mips/tcg/sysemu/special_helper.c @@ -94,7 +94,7 @@ bool mips_io_recompile_replay_branch(CPUState *cs, const = TranslationBlock *tb) CPUMIPSState *env =3D &cpu->env; =20 if ((env->hflags & MIPS_HFLAG_BMASK) !=3D 0 - && env->active_tc.PC !=3D tb_pc(tb)) { + && !(cs->tcg_cflags & CF_PCREL) && env->active_tc.PC !=3D tb->pc) { env->active_tc.PC -=3D (env->hflags & MIPS_HFLAG_B16 ? 2 : 4); env->hflags &=3D ~MIPS_HFLAG_BMASK; return true; --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018291; cv=none; d=zohomail.com; s=zohoarc; b=myCxfwvHVKbjlsQMeUbrdoFyWtWOKUP0FIBMM+dNZwMoNQA9l+qI0pQREIy0Uc9wZkxnMy4OzdzB8eMLGN/OxNH3p0WiKtXfpSd/RtOXnjGzO3n7WdN6dNYGbc1qULAayPWNaPwx9oJiKyWQq3MR+2RMG9iTj0QByURUpOWec6E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018291; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=qUQ6D4VyVh6tIPK0YRWEGI3eVzxeGSt0Jfwz084s9jo=; b=TAi+K5MUw3PwTlp9xaLEde2FlbnXyoOtVdfJFQBQoKGjLKoPw15mPud3+j6SCahesw14JtU/ZQz2pYp/M3AC7wCddD2dXD/+qJLvpga05Lwxh26soMlD23GwwlEiRDU0nnpU5jTC9fnEV1Rb1U2RaYrcZHVZbeLzSRf+KaYPOwY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018291160619.1147837844863; Tue, 21 Feb 2023 14:24:51 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayc-0006Ox-Ga; Tue, 21 Feb 2023 17:19:10 -0500 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 1pUayM-0005ze-Bo for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:59 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUayK-0005p7-Hp for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=qUQ6D4VyVh6tIPK0YRWEGI3eVzxeGSt0Jfwz084s9jo=; b=Ww9oExzv0wuJhr6k2bdbSymmX7 oIoN3CRPUEUSG2cT1N/6godzZOP9L4VHgnQxE6LmhpRudleRZJp9V+88PvkYGpMQ5+/uQ1NVLRUDx PZ5VVHJEwqOlkehpA6rCa56TsbipEnQgVHdlwwxaL1nx4gVpgTjqRsYyJnLsyK7O+wQY=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 20/27] target/microblaze: Replace `tb_pc()` with `tb->pc` Date: Tue, 21 Feb 2023 23:18:11 +0100 Message-Id: <20230221221818.9382-21-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> MIME-Version: 1.0 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018293172100007 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/microblaze/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 817681f9b2..17879f9b2b 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -29,6 +29,7 @@ #include "hw/qdev-properties.h" #include "exec/exec-all.h" #include "fpu/softfloat-helpers.h" +#include "tcg/tcg.h" =20 static const struct { const char *name; @@ -96,7 +97,8 @@ static void mb_cpu_synchronize_from_tb(CPUState *cs, { MicroBlazeCPU *cpu =3D MICROBLAZE_CPU(cs); =20 - cpu->env.pc =3D tb_pc(tb); + tcg_debug_assert(!(cs->tcg_cflags & CF_PCREL)); + cpu->env.pc =3D tb->pc; cpu->env.iflags =3D tb->flags & IFLAGS_TB_MASK; } =20 --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018185; cv=none; d=zohomail.com; s=zohoarc; b=FgFB9qqAjvd6anADw4Hj1zlExs559fILGDp1tTYSbaG/Yhz/rLkYyolxr/+nzP48uCIRwYYGaSw4oHD/Ddi1cUUbwbXJuuZagKiFXm3lpfNy1GOBNzOPPPdiomFh2qFdcSxElJCt17SxhxXQTe2P4+47e+2wlcMvi0WSK8x2w/w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018185; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=HdS0SL+bU+Edm8Z8KfyCRtg1tv2+A9LUh8vT6oSvq6M=; b=gKH9SyV1h4GapuUK1eoq17njs/9ENLPKSWkCSfgnHPr09AsNloKwI6qT0QefrkxnlKz5Vkr+gc+dJKqKisP+BYkpWXiLHFulLv1ta8Q+ypgWbC/5fFVcxgXS82b011iYa5D99j/uurFAJ3qn/mByUotvYaLc7HrAyUgmexSCeMQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018185728302.93216930253925; Tue, 21 Feb 2023 14:23:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayd-0006Ps-1w; Tue, 21 Feb 2023 17:19:11 -0500 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 1pUayM-0005zg-TM for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:59 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUayL-0005pF-EZ for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=HdS0SL+bU+Edm8Z8KfyCRtg1tv2+A9LUh8vT6oSvq6M=; b=qRahxMQ2qAaxdBOkH3EEcfv1WH EaKvkqLYA4sQoVcj1gVFd+S17BamlSCBFUy0iKUaHsh/umWoiIaZTxbCYOLC9ezs1fDgb5IbavIjA JUOwpzRkWvo6wSR80UEbdV30vSLcSza6R6S983veUNVsnws4PyFUKWl9qB52y8x5O1yU=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 21/27] target/loongarch: Replace `tb_pc()` with `tb->pc` Date: Tue, 21 Feb 2023 23:18:12 +0100 Message-Id: <20230221221818.9382-22-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> MIME-Version: 1.0 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018186708100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/loongarch/cpu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index 290ab4d526..e5efe4ebd7 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -18,6 +18,7 @@ #include "fpu/softfloat-helpers.h" #include "cpu-csr.h" #include "sysemu/reset.h" +#include "tcg/tcg.h" =20 const char * const regnames[32] =3D { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", @@ -321,7 +322,8 @@ static void loongarch_cpu_synchronize_from_tb(CPUState = *cs, LoongArchCPU *cpu =3D LOONGARCH_CPU(cs); CPULoongArchState *env =3D &cpu->env; =20 - env->pc =3D tb_pc(tb); + tcg_debug_assert(!(cs->tcg_cflags & CF_PCREL)); + env->pc =3D tb->pc; } =20 static void loongarch_restore_state_to_opc(CPUState *cs, @@ -599,7 +601,7 @@ static ObjectClass *loongarch_cpu_class_by_name(const c= har *cpu_model) =20 oc =3D object_class_by_name(cpu_model); if (!oc) { - g_autofree char *typename=20 + g_autofree char *typename =3D g_strdup_printf(LOONGARCH_CPU_TYPE_NAME("%s"), cpu_model); oc =3D object_class_by_name(typename); if (!oc) { --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677017981; cv=none; d=zohomail.com; s=zohoarc; b=Pmo748Wu+pqx4ler8MFl3MJgdgpY8b/6HFvB1TropXuIWaByKXFIQ7U7Xl3N/V3E7co2acPNEX3rGtyLhv6hgz9R0i/5tyLyNGBj+oaXNYfNImqIv6Qv3xcOHr4UtA+wkQY4dtkLBq6KfhBZ8V6uFO8EP9sayQcDm4P5ra1ZUA8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677017981; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Bi70tVrgSnpkZVbYqfo0trxI6qdQs4nWA1QBvhMQq0E=; b=iBoZUeTwPK7oq2ZndkLN3VWohfQNFDzohw3WYFcXOD5aNhz2OSlaAqNC2toQsqjLxPk+H47SaQs3ETflLSnPORffVShbCnTh8MuLq4hXl6NEUXqWH8Fl0kTWRRzqwqRs+X4LA+SDZywc+SHQtMvFodNK8vzQGKda2kz95FclDSk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677017980950287.3217216867315; Tue, 21 Feb 2023 14:19:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayV-0006CH-Gy; Tue, 21 Feb 2023 17:19:03 -0500 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 1pUayN-0005zl-P7 for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:19:00 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUayM-0005pK-Ap for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Bi70tVrgSnpkZVbYqfo0trxI6qdQs4nWA1QBvhMQq0E=; b=sx8d6g8Hx8DJkMoe+7czI7VmLo R8TlBil4Ct+F4uX0fbkU2jgjmPeI34sbUyW9ydSDezys4u0ATCSWnWNaRcrrWrt+NbUsnpA4SBy6e zHMT1fqzLVZ3E8EJUHJpOE8OXIflpeomlG5UN3n4YG5dgCkT7gxHKRwTY21TBOX7prk4=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 22/27] target/i386: Replace `tb_pc()` with `tb->pc` Date: Tue, 21 Feb 2023 23:18:13 +0100 Message-Id: <20230221221818.9382-23-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> MIME-Version: 1.0 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677017981626100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/i386/tcg/tcg-cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index c090ce152b..b942c306d6 100644 --- a/target/i386/tcg/tcg-cpu.c +++ b/target/i386/tcg/tcg-cpu.c @@ -52,7 +52,7 @@ static void x86_cpu_synchronize_from_tb(CPUState *cs, /* The instruction pointer is always up to date with CF_PCREL. */ if (!(tb_cflags(tb) & CF_PCREL)) { CPUX86State *env =3D cs->env_ptr; - env->eip =3D tb_pc(tb) - tb->cs_base; + env->eip =3D tb->pc - tb->cs_base; } } =20 --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018321; cv=none; d=zohomail.com; s=zohoarc; b=KQLPuaxXSXK8hQ9gYrXqyzWnW+2U4mOgdvGPnnKSLYVmX9TaX0SxZ7JG2yUeq4sZFzN7p5lnDnAev51w4BzVU6ovTJ/USs9QNZsDkWCoai81vymZONSVQx7lVRpfaNSUENPuk47UE2vka4+a2g4n0Cu1lWjy+az9N27hipY147o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018321; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=nqc5BnFcrMz5tITv4O/UQF7xZqy+x/bPRwvVsDq7pLE=; b=cbZ6Iz5mqqZ4yh7NmnOi4WdliuOS7wapIQZM/3WqPtPsfrMp20Ex5VrYhRBQOd99M9bkgMPzByLlZ6kArAZn8Cc4mVKnMYV7DBdPnSWgpYlS9lye1waXCeqK1Vo4nOPssONIJcjZ8d/PLqc5hnttZyBD/Osr+V2s69ydJN7WpMc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018321191995.3636807877722; Tue, 21 Feb 2023 14:25:21 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayf-0006S7-0A; Tue, 21 Feb 2023 17:19:13 -0500 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 1pUayP-000604-CX for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:59 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUayN-0005pU-8X for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=nqc5BnFcrMz5tITv4O/UQF7xZqy+x/bPRwvVsDq7pLE=; b=hJ5IdJXYV0ksbobY1NOVnOWrWv F98MIshEIXxGmXjG1Fqfm5xc9DucDJcR4L3VhQ942ccDK7R5g/a5SgVDeWEjDtYYGjcas4ex9i0ce a69BqLWb+UxMJtVmpfdsVyJgREAUXI/pcCLxaDtZ+zSYFyZ8qfuNJhAC69XHnb9+6EFc=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 23/27] target/hppa: Replace `tb_pc()` with `tb->pc` Date: Tue, 21 Feb 2023 23:18:14 +0100 Message-Id: <20230221221818.9382-24-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> MIME-Version: 1.0 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018323333100010 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/hppa/cpu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 55c190280e..11022f9c99 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -26,7 +26,7 @@ #include "qemu/module.h" #include "exec/exec-all.h" #include "fpu/softfloat.h" - +#include "tcg/tcg.h" =20 static void hppa_cpu_set_pc(CPUState *cs, vaddr value) { @@ -48,8 +48,10 @@ static void hppa_cpu_synchronize_from_tb(CPUState *cs, { HPPACPU *cpu =3D HPPA_CPU(cs); =20 + tcg_debug_assert(!(cs->tcg_cflags & CF_PCREL)); + #ifdef CONFIG_USER_ONLY - cpu->env.iaoq_f =3D tb_pc(tb); + cpu->env.iaoq_f =3D tb->pc; cpu->env.iaoq_b =3D tb->cs_base; #else /* Recover the IAOQ values from the GVA + PRIV. */ @@ -59,7 +61,7 @@ static void hppa_cpu_synchronize_from_tb(CPUState *cs, int32_t diff =3D cs_base; =20 cpu->env.iasq_f =3D iasq_f; - cpu->env.iaoq_f =3D (tb_pc(tb) & ~iasq_f) + priv; + cpu->env.iaoq_f =3D (tb->pc & ~iasq_f) + priv; if (diff) { cpu->env.iaoq_b =3D cpu->env.iaoq_f + diff; } --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018302; cv=none; d=zohomail.com; s=zohoarc; b=H0kSiUMQlFXJxK/bXPsBfxlZgDl4rzhXT+7Nnn1TYMK6Miq4MH3KbIoFWBrOKxeTSeUbsYzUsUnX9aunp1aXY6OGkpXBn8HDCTyAMxWLWo+hLt77fhhzeTjeDOKLThtESZ6bHT1go15rGmQrEWx7xCxcFLgsin7yq7bM/EY+pHQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018302; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=ybI6a3Aw1gw25TKCjjASH774t8GAx6ct6cSsdlrsdCw=; b=jDKRZYexWXBQB8y4ZGYDtDL8E2ire5r5ppm1aUJmEceeTICAuFOygNUw2ofQUqI0Bxr2TQwMPob6viklBx02bB14F33UdNHc5CDYr+jv3yUcVy0q+LSNn5xtEEzbaUm8xN8m1MNgg18bIN6w/eNg1nr+jjvox8RF+VMQYGuR3OI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018302444489.77399386164177; Tue, 21 Feb 2023 14:25:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayb-0006Nd-4s; Tue, 21 Feb 2023 17:19:09 -0500 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 1pUayQ-000605-IB for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:19:00 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUayO-0005pe-7j for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ybI6a3Aw1gw25TKCjjASH774t8GAx6ct6cSsdlrsdCw=; b=ALCQe/cVP4tgmgN8yIXqYoXbsT pSfSqVIiUXRPTY0f/a6Rq2rQcvNlXB0mKAkJ/ikVe0VSMFGURYYbFvwEx5SCFLfz47fRmqKa7KjdG 4fRbh3PZTrXNSp0jYRVs3sHTXhnotxh6M3QIM8dDMtVPmBTDbaRLvQWHVEyeRYtLve5s=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 24/27] target/hexagon: Replace `tb_pc()` with `tb->pc` Date: Tue, 21 Feb 2023 23:18:15 +0100 Message-Id: <20230221221818.9382-25-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> MIME-Version: 1.0 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018303191100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/hexagon/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 807037c586..ab40cfc283 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -23,6 +23,7 @@ #include "qapi/error.h" #include "hw/qdev-properties.h" #include "fpu/softfloat-helpers.h" +#include "tcg/tcg.h" =20 static void hexagon_v67_cpu_init(Object *obj) { @@ -263,7 +264,8 @@ static void hexagon_cpu_synchronize_from_tb(CPUState *c= s, { HexagonCPU *cpu =3D HEXAGON_CPU(cs); CPUHexagonState *env =3D &cpu->env; - env->gpr[HEX_REG_PC] =3D tb_pc(tb); + tcg_debug_assert(!(cs->tcg_cflags & CF_PCREL)); + env->gpr[HEX_REG_PC] =3D tb->pc; } =20 static bool hexagon_cpu_has_work(CPUState *cs) --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018322; cv=none; d=zohomail.com; s=zohoarc; b=RP/YnUeL3EkPeWuvzrs6bvqr60rtA2gB7rit9KYlpIohTXtyK2b3oQxoB6jePIg6bgE65YmBViG4aFokBg8fL7sB+l3BzBuo+icf1FMWKlW5/ZvndxXXc8C2bE4Waomofepae5lhYddqaC9zrOOy+uftC7j4KAt6DpkQQkDK7Tc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018322; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=f9GqEQZk6knnDg0dhlzqQgUFcqRnrbKBBCEaa0LeH1k=; b=JoiaOjuBUk5QGV0VymVQs7evToomIDx7mJHKnvvnvykhsDobGL4HOdr0gZp6kC71bbTH4V1hPAibS4ob4hWb3fzZdohxNBJqE949xTKkbT2l/AxzfstVIKA17K82CHx60jmJ7+ZUNJddDanoE9F4gaxC8Ks0iXaXMEtM5FKYqrE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018322570174.46445284515073; Tue, 21 Feb 2023 14:25:22 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayf-0006TK-L1; Tue, 21 Feb 2023 17:19:13 -0500 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 1pUayS-00063A-0D for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:19:00 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUayP-0005pp-Ph for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=f9GqEQZk6knnDg0dhlzqQgUFcqRnrbKBBCEaa0LeH1k=; b=DDuVTjmCEyrymEaKx9hnypfuCP 6luKBLlTITt2sKaSvbuDCJ3rB1L/61b7zgrUFErb6CknUxK/jna4hl/NEIOaS1++KAE80hmecRQwg TBRzN7Nr1inlMszIMteO0hmD3pD6Cy2+gypBAtoplfiFiIdcigXTbfGiGOaaRVuwOAZQ=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 25/27] target/avr: Replace `tb_pc()` with `tb->pc` Date: Tue, 21 Feb 2023 23:18:16 +0100 Message-Id: <20230221221818.9382-26-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> MIME-Version: 1.0 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018323326100009 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/avr/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/avr/cpu.c b/target/avr/cpu.c index d0139804b9..a24c23c247 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -54,7 +54,8 @@ static void avr_cpu_synchronize_from_tb(CPUState *cs, AVRCPU *cpu =3D AVR_CPU(cs); CPUAVRState *env =3D &cpu->env; =20 - env->pc_w =3D tb_pc(tb) / 2; /* internally PC points to words */ + tcg_debug_assert(!(cs->tcg_cflags & CF_PCREL)); + env->pc_w =3D tb->pc / 2; /* internally PC points to words */ } =20 static void avr_restore_state_to_opc(CPUState *cs, --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018223; cv=none; d=zohomail.com; s=zohoarc; b=eDwmjTK7XPEjQySHaqSgRGrgB2lC3VO929hXBAEYP4RGy4kwmRpIIPd1dBUrV7mGAoWnvUBQoOGrCr6pyNuN6vwdg3BJ9ATI2af64zCqD5vo+TpXDmjMWtMv5ocNxV2jLXnM/R/tr9OW5UKd1AdWMhiCeHvK2r+k8eYBCE8TLMA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018223; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=1VJ2WqPUtRBgHWeIbAWNJBLBEbQidtjYEHWL/TcpsRc=; b=HhUeMvcNiKpuMXP7c3Jas9soopABA7IfXoLQACsS+BDXb26kb+WIcBCy/RSTVAcPrKmC7NwWkAx+NZ/wTRWTrTUJX77ffLJiVDy69NNn5ra5Qpa4YI/9hQH8g/ciPoIq3hn2I+2JfBmSt+8ke0b62HMeMCMyTWKsretEXcVdtOQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 16770182237684.303838988427174; Tue, 21 Feb 2023 14:23:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayg-0006Ua-9J; Tue, 21 Feb 2023 17:19:14 -0500 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 1pUayS-000639-0D for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:19:00 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUayQ-0005q4-0z for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:18:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=1VJ2WqPUtRBgHWeIbAWNJBLBEbQidtjYEHWL/TcpsRc=; b=iAd3A+70i/++9D0D6gAXijVtCO 4D9iBNL8Tv+BkpYfO/LS6KuzbBQUnh6KXqSJwj4H7v+YPNtRuPyNjYxaf8CwlnNKKnwm5ypsFE68T dM1k3Td/QJ8ZzV371YgNFHFfZKmcQXmgV+NduM9lmt1mP/y5szTtBWfYKph+2GtAftEk=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 26/27] target/arm: Replace `tb_pc()` with `tb->pc` Date: Tue, 21 Feb 2023 23:18:17 +0100 Message-Id: <20230221221818.9382-27-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> MIME-Version: 1.0 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018224857100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index c05cb86a47..db8f62beae 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -86,9 +86,9 @@ void arm_cpu_synchronize_from_tb(CPUState *cs, * never possible for an AArch64 TB to chain to an AArch32 TB. */ if (is_a64(env)) { - env->pc =3D tb_pc(tb); + env->pc =3D tb->pc; } else { - env->regs[15] =3D tb_pc(tb); + env->regs[15] =3D tb->pc; } } } --=20 2.39.1 From nobody Tue May 14 10:55:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677018259; cv=none; d=zohomail.com; s=zohoarc; b=WoabfUY64GXmuoR5+96N/anT9RAhJt4z0ptGeSnVHOWYfg/sggKNlw5oAZ1JPqJGPxP7pk/7irlztFtAaCgzkvBqVG+1H+RVcuGCqDQCa1kG3Q499cLCIpbz5+Ob+vfn2nJMPo9/r/Yxi3loRjjfZxXUG19dMxVojwm+rJlNtIA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677018259; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=XMZujC3tpkyK4hjn3yMzDxgmLNnvsN2qXyF8BjYaXR0=; b=JrfAOGN/cExkgwFoy2c6ISSiDYVqksPsDAzuOuEw5FPmF2PIMdY3X+tmkRiRncKVwkigc3Ow9G2HymaAirzaMbMQj75wPjDrd3yxouzx28lxcSXOgOn8r5eTLFwb9yEa26da/b4FznWunP7sBn6tFPcLPvCEAfWS706eysqfOSU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1677018258939192.79385337065844; Tue, 21 Feb 2023 14:24:18 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUayh-0006Wy-DC; Tue, 21 Feb 2023 17:19:16 -0500 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 1pUayS-000684-Is for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:19:01 -0500 Received: from rev.ng ([5.9.113.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUayQ-0005qH-VB for qemu-devel@nongnu.org; Tue, 21 Feb 2023 17:19:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rev.ng; s=dkim; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=XMZujC3tpkyK4hjn3yMzDxgmLNnvsN2qXyF8BjYaXR0=; b=dMlkAx+GP1xGf9U/neF5HfrXra RWy+IcRVRcrwNsuE50OlBpeZLJddEhj9it1sqJ5cDKA8bCySR08tAZQ9G5wSqKgUIUGHZq8ZNBQpq AnLjbBU9RLM5HkD65CzbFNXqENFW8/2NFoc1ViUEzSeMWEGIaH1+mtYcwJA7Zl6QsNQY=; To: qemu-devel@nongnu.org Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com, eduardo@habkost.net, peter.maydell@linaro.org, mrolnik@gmail.com, tsimpson@quicinc.com, gaosong@loongson.cn, yangxiaojuan@loongson.cn, edgar.iglesias@gmail.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, ysato@users.sourceforge.jp, mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, kbastian@mail.uni-paderborn.de Subject: [PATCH v2 27/27] include/exec: Remove `tb_pc()` Date: Tue, 21 Feb 2023 23:18:18 +0100 Message-Id: <20230221221818.9382-28-anjo@rev.ng> In-Reply-To: <20230221221818.9382-1-anjo@rev.ng> References: <20230221221818.9382-1-anjo@rev.ng> MIME-Version: 1.0 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=5.9.113.41; envelope-from=anjo@rev.ng; helo=rev.ng 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, SPF_HELO_PASS=-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: , Reply-to: Anton Johansson From: Anton Johansson via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1677018261114100006 Content-Type: text/plain; charset="utf-8" Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/exec/exec-all.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index f1615af7cb..c03c271995 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -618,13 +618,6 @@ static inline uint32_t tb_cflags(const TranslationBloc= k *tb) return qatomic_read(&tb->cflags); } =20 -/* Hide the read to avoid ifdefs for CF_PCREL. */ -static inline target_ulong tb_pc(const TranslationBlock *tb) -{ - assert(!(tb_cflags(tb) & CF_PCREL)); - return tb->pc; -} - static inline tb_page_addr_t tb_page_addr0(const TranslationBlock *tb) { #ifdef CONFIG_USER_ONLY --=20 2.39.1