From patchwork Sat Mar 8 22:58:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 871618 Delivered-To: patch@linaro.org Received: by 2002:a5d:64ce:0:b0:38f:210b:807b with SMTP id f14csp347491wri; Sat, 8 Mar 2025 15:05:55 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWOtBOjaRQmxf0rMAnx6rP8aV05a2CHNXZjXMA+6WThClhPPs+Q7XlkyTFxAuVNNepw9nG2qw==@linaro.org X-Google-Smtp-Source: AGHT+IHtXuZebMpapN2Rj9D/H5rok/3OWada3e+4VvPRQahJcmP/B3IaZhA/eDcP5kkaXjPl3vrE X-Received: by 2002:a05:6214:268b:b0:6e8:9526:5788 with SMTP id 6a1803df08f44-6e9004ea001mr141159976d6.0.1741475154819; Sat, 08 Mar 2025 15:05:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1741475154; cv=none; d=google.com; s=arc-20240605; b=ZMlzYhAJve5TGMtt8uiWwYGzk9KOKiVOoSj8dIdg2r/J/W4QBjalJ0dKC1w1JeKB2F D09UYleUTN6QBNut0MesOy2zDeH325rg4xkhKNNMnckGMG7ixmAmelsmW5Tj1xmBRbS9 tBOup+08LxFdvhKNz7Ag6DX8US7EaElG8HgSQkWgZdfBFkMrOCUDuWqI4J7GmSAiKK1+ hcWH7uca2PNHKDMPk3uPfaBpz9nJQVyKzUUcqdWs+tI6ZZvJ9ZKOuUJh2kdgl8vohM6S ffCPirvZt/hkfajLwujkwo2hw85lchgD+FGcVlQAf4LML9JXlfen17MIAL1+sWvUifh6 dRyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pLDUWdvnnBB356eedHeiVggZlsL+ljood1zAHBJkFew=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=hzy1p7YiRKOws/ZwK+BDv3GB4EOl3igB9kgTcjJZ+xKi2tPcTT9hSKVbKuL2e2BsAT 9NN4AwKXdZHYikVbObDq9t5bTwSlHeRhehdhuqgD70B+7/6B7BPZAxo+IzB4lzLJTl44 xgmdF357dGy/s9mzlh5RsSXv9RnffEczOtnwwuuN1oc8SZqwZiHZVRJ8j2kPxuBFPKeg IKOz/+l7eSjMab7BahR8IfGCOyMeIo0jbNBeU5DwLxnVEg+t/OF7Y/N/H+Q2IAy5WM7O Mto6fLdAdX74pH6o6hHTgo/hJ2LDMYZpIpafRmev8EK/SSMHPK/hCrM08nlOaZSTFu9T +WCg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Rm3+vDtt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e90a8f471dsi20048726d6.141.2025.03.08.15.05.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 08 Mar 2025 15:05:54 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Rm3+vDtt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tr39e-0005oC-25; Sat, 08 Mar 2025 18:00:26 -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 1tr38Z-0004cj-At for qemu-devel@nongnu.org; Sat, 08 Mar 2025 17:59:19 -0500 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tr38X-0005NP-27 for qemu-devel@nongnu.org; Sat, 08 Mar 2025 17:59:19 -0500 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-22401f4d35aso55290645ad.2 for ; Sat, 08 Mar 2025 14:59:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741474755; x=1742079555; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pLDUWdvnnBB356eedHeiVggZlsL+ljood1zAHBJkFew=; b=Rm3+vDtt63gVMmcgLcp6g1ngRsh2cyRRnHulV8Y0JmlD9prC8hYyELdDCtASrmvdxK 2XSHG3DFRbTWVmgHEz727aaSdVpa9lYPLtkIkz1ByQR/it/xUfjuO2j6jOaflVD9yHyv eA3wPk99o6hrtfzrz0MB40B9c7jfstgO7Sb3wiOE83ba3nLqr78A/dUi7K+a/wAiu0mB AFKvRhQXdhRJfWN0MnoivWCvVv7VSQ61+730UIV/JOtM8l/iq05a1RkcNAjW0DxdVLiN 9adH5Wp/rzcEBAuCTufqB575KQxr1sjghZz1Dm6y3UO+gnvUI2tfFmN5UdXB3Y+M3H0b f7uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741474755; x=1742079555; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pLDUWdvnnBB356eedHeiVggZlsL+ljood1zAHBJkFew=; b=Sx9aOt4YmiWxmyD1mhfsLdnkHqZtxw9a/tS3UFRuKyuAGlJjZb2UeGjoXdhCik/RgF PZjv7BedGn6WWL9UIERdGbzfLHJkH4uUATFTlcgLApTlPC4jWVxjuN1aOmqPGcTRVQoU 9UHh0rzMnDLlsTb8AlMh/IMIPXN2untDIC93LXzHmvTsSY0IOyPgdm10TEpQXTrwUyW7 Wn3Y6NYqRKpifqe5BTMzXvrgEPQlA0nJfUJMSt7hr3GBjZbtHz5IlYBBUsNDXKTkQ4g7 M/xHxxtBEC4LxIj80EGOphBeXuvgKpJKF3YFxAjkdv6DYgTUPtmJrnRDza1JvkI5wQ0c C/JA== X-Gm-Message-State: AOJu0Yy03mifMBc3cEMbduMp7MiURWAGs/Ouhjq6YftusmplMSIRGo4h jN0Y3kPqOiIVogjvKmsV6Vtzph8u1RmuWZbyUGEmlfiDDT5rcVbk1vYw4nv01fKXqEs8mCTJxUD Q X-Gm-Gg: ASbGnctffzElIjVPDq143b8NLxtUQU0tmaS+2ZpOiSHu2argmdw7e41aWz66ufYnkPM EWDQhpkCKJ/GpBg7svQKLcUd+S19EvUow9etaoydgg38qvOTzYSOGglC+Un9STrrc3igrVGjjRG K1+/rI60amXNV2eHc9otw6aubzTndp6qlh3F4KfMkgnOo0lTS+ZYopbhv/vY36NER4xMocLSn4F eD8DBsqYztEKVTDtS3o1MngomC8BXWSOj1ubE0t6nZXsOzHL0370uL6na3xKjLHeGeZhkKk0GG1 zhnEUo5c2zFcdt0ndCFPbT0jn8y/DWMPoXk0nJCHCW4SMlM/qtusxah5NybnePcDuM2drmmFtTV 9 X-Received: by 2002:a17:902:ccc5:b0:223:f408:c3cf with SMTP id d9443c01a7336-224288971fcmr144299935ad.21.1741474755261; Sat, 08 Mar 2025 14:59:15 -0800 (PST) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22410a908a0sm51831175ad.162.2025.03.08.14.59.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Mar 2025 14:59:14 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 17/23] accel/tcg: Restrict GETPC_ADJ to 'tb-internal.h' Date: Sat, 8 Mar 2025 14:58:56 -0800 Message-ID: <20250308225902.1208237-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250308225902.1208237-1-richard.henderson@linaro.org> References: <20250308225902.1208237-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé GETPC_ADJ is only used within accel/tcg/, no need to expose it to all the code base. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20250308072348.65723-2-philmd@linaro.org> Signed-off-by: Richard Henderson --- accel/tcg/tb-internal.h | 11 +++++++++++ include/exec/exec-all.h | 9 --------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/accel/tcg/tb-internal.h b/accel/tcg/tb-internal.h index 62a59a5307..68aa8d17f4 100644 --- a/accel/tcg/tb-internal.h +++ b/accel/tcg/tb-internal.h @@ -13,6 +13,17 @@ #include "exec/exec-all.h" #include "exec/translation-block.h" +/* + * The true return address will often point to a host insn that is part of + * the next translated guest insn. Adjust the address backward to point to + * the middle of the call insn. Subtracting one would do the job except for + * several compressed mode architectures (arm, mips) which set the low bit + * to indicate the compressed mode; subtracting two works around that. It + * is also the case that there are no host isas that contain a call insn + * smaller than 4 bytes, so we don't worry about special-casing this. + */ +#define GETPC_ADJ 2 + #ifdef CONFIG_SOFTMMU #define CPU_TLB_DYN_MIN_BITS 6 diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index a758b7a843..2ac98e56c4 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -186,15 +186,6 @@ extern __thread uintptr_t tci_tb_ptr; ((uintptr_t)__builtin_extract_return_addr(__builtin_return_address(0))) #endif -/* The true return address will often point to a host insn that is part of - the next translated guest insn. Adjust the address backward to point to - the middle of the call insn. Subtracting one would do the job except for - several compressed mode architectures (arm, mips) which set the low bit - to indicate the compressed mode; subtracting two works around that. It - is also the case that there are no host isas that contain a call insn - smaller than 4 bytes, so we don't worry about special-casing this. */ -#define GETPC_ADJ 2 - #if !defined(CONFIG_USER_ONLY) /**