From patchwork Fri Apr 5 10:24:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 786220 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:1101:b0:343:f27d:c44e with SMTP id z1csp92999wrw; Fri, 5 Apr 2024 03:27:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWLTJ9Z/lrkAWor1bLYDubXgHuwwN+uEZcTf1CKRcW6J9nj6iB/YlRt9Zo7OnVF4d1OZWKqH49TIZcZ8h4L/fFH X-Google-Smtp-Source: AGHT+IF2aYzdX4pzZ+X8Vzc9Sbd6X2KIxcAihO/EErHsrhx+Vy7OVVjvHT+6TAzqOir2KC+nbnRG X-Received: by 2002:a05:620a:10ba:b0:78d:3649:7053 with SMTP id h26-20020a05620a10ba00b0078d36497053mr920275qkk.69.1712312822664; Fri, 05 Apr 2024 03:27:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712312822; cv=none; d=google.com; s=arc-20160816; b=Pq/UzzqBsrOAgq061YVDvBrSfpiAsJlrDo8sZXfhaVTTyz2Cb/ZLze0OrK1pJNUBTk guGTgTt9ZeAg7rtwmPq85kI6UpE4Ptl+HDkdlRHuFCIvOfZ70+LA6YtcU0F48DQ7cI7Y CRMMLKzgwvMg1bjlqnzcvGmk+X9DhdQQDbjCuHVNOYYZ8payQ3ymTw4rHiWXsmgGMDSN oaQf0XGPw/eIkdGfLT8kQzvLSpDWc6np4uy2X6xWOXDpoEH5cwI6rEHW+TuFowPnOmh4 IwPW8DMx8GtoNBTV8i8wgLZjrxeXjcO1zIBMvz/h6GHn9TaJZH3jvoicJ09Rg63J450b 4rUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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:to:from :dkim-signature; bh=NdQqZjJgz9uVc1nB4iFIKIUfcykhgew+A5q2j0I98dY=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=U/DW84wHpVeD+tyDTK694F4lIwii+WqY5END5yfhJ32A/dNp31cgd4SzirhA1xVAmE Ik9oGuTOitiNQ8aAWh0oOtMkb2jfIXsGSQ/ImcgBM8sWSmbrpfQTtmMZZsJdQXsVxM3b D/fJ0qsJ4UXS1gm9j9d32U6QICVPlKTO+KvKLqXIq9jSSng4L77oeUdnYPjYUPHenvCA 8Zmj//U5z9lydlu19de749/CfWc1fSL7gFrCNNME0lCnHKwYCR3q68vdd7B83+iZlDpD PUanmyymiVdSzR6KfXylIHcDEPLMoQ+T0LuJFnB3UU4ohP9WwCi1hJwTnPNUV9y4zvJY kZGQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bAoeXL4g; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v2-20020a05620a0f0200b0078d496c674asi1371535qkl.331.2024.04.05.03.27.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Apr 2024 03:27:02 -0700 (PDT) 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=bAoeXL4g; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsgl1-0005xA-KP; Fri, 05 Apr 2024 06:25:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rsgkz-0005wS-Rs for qemu-devel@nongnu.org; Fri, 05 Apr 2024 06:25:13 -0400 Received: from mail-il1-x135.google.com ([2607:f8b0:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rsgku-0004VM-M3 for qemu-devel@nongnu.org; Fri, 05 Apr 2024 06:25:13 -0400 Received: by mail-il1-x135.google.com with SMTP id e9e14a558f8ab-369eafe262fso10131785ab.1 for ; Fri, 05 Apr 2024 03:25:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712312704; x=1712917504; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=NdQqZjJgz9uVc1nB4iFIKIUfcykhgew+A5q2j0I98dY=; b=bAoeXL4g6rWRI5sEnmBfmxYg2XalXWL6KxA3ZpCkvatuNKJy4xZZsQ6aDD+AWdd8QB EuF9BYMeTi7TJgRINvX73PyXmfIx8yjsjL0527ZHCqyHigsBd4F1I5yzBjmkNXFChBNe IUkZQude4BsUZ/DN8tFBtTHbXFFXNXrrC/onWecrReee+g3uCgUd7kAf7qiDp4iEZvVY uvaSCUITXGWPvDrQkZ0nc/DD+dF0IVesKACMlmrGRStUvXDf8N2r7VmqN09nPiLKFKyF q7XgBKOoNJNuqFQAw1K/9/FI//nlWYwx9p/yYOTR3Vj4JfJsfr26Rj5Fj5jZP8dt4a0E BfCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712312704; x=1712917504; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NdQqZjJgz9uVc1nB4iFIKIUfcykhgew+A5q2j0I98dY=; b=Y53FaqYwdABmAKVnabssI5PEADs71KrTHDy4IEuhby9PLH+Q1bIgXFTYT5dtexd/L5 04OPr2uvFoz1DFwkzXSXCnVRu1rbV8B6tUAN5KRdvgAuieB6sWSQ9+cwQ1tHdVrtSGY/ akyeaz2FvQAGGYFa6IKlGEs4PMWl9jP07n/zvgA6/RSXEApUCGY8Bqx3Sd2RXLJ8NsjU 2r6B/wWfBULyXHTP4Bi3vw8zvNneO86CujPACS4KjJRK9a7eCcaWUWVznQQNLVplHoax DJaOZg2PZFuMEbCXuHBG2M2iHozaUm1HSKRHUse9yPj234BF4UoQd52S0PT63KZsgYjo AJJw== X-Gm-Message-State: AOJu0Yz9t/NZZCwDVKLrWcMPGyKYms0FSauZ00COV7ATGuZcQus9ryGJ 9BuCYRdze1r3nqAGw3YYSFGWp5R+ntlzQorohLJAtqAIxbrfx5q2bjlBRMbsCYxS65RxptPwmNa S X-Received: by 2002:a05:6e02:1a66:b0:366:9674:7084 with SMTP id w6-20020a056e021a6600b0036696747084mr1053057ilv.12.1712312704361; Fri, 05 Apr 2024 03:25:04 -0700 (PDT) Received: from stoup.. (098-147-007-212.res.spectrum.com. [98.147.7.212]) by smtp.gmail.com with ESMTPSA id h10-20020a63f90a000000b005e438fe702dsm1104304pgi.65.2024.04.05.03.25.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 03:25:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 02/32] accel/tcg: Hide in_same_page outside of a target-specific context Date: Fri, 5 Apr 2024 00:24:29 -1000 Message-Id: <20240405102459.462551-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240405102459.462551-1-richard.henderson@linaro.org> References: <20240405102459.462551-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::135; envelope-from=richard.henderson@linaro.org; helo=mail-il1-x135.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 While there are other methods that could be used to replace TARGET_PAGE_MASK, the function is not really required outside the context of target-specific translation. This makes the header usable by target independent code. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- include/exec/translator.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/exec/translator.h b/include/exec/translator.h index 29804de92e..185ab5c374 100644 --- a/include/exec/translator.h +++ b/include/exec/translator.h @@ -230,6 +230,7 @@ translator_ldq_swap(CPUArchState *env, DisasContextBase *db, */ void translator_fake_ldb(uint8_t insn8, vaddr pc); +#ifdef NEED_CPU_H /* * Return whether addr is on the same page as where disassembly started. * Translators can use this to enforce the rule that only single-insn @@ -239,5 +240,6 @@ static inline bool is_same_page(const DisasContextBase *db, vaddr addr) { return ((addr ^ db->pc_first) & TARGET_PAGE_MASK) == 0; } +#endif #endif /* EXEC__TRANSLATOR_H */