From patchwork Wed Feb 24 16:58:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 386869 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp532951jap; Wed, 24 Feb 2021 09:03:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJyZDewhU5CPyq3ZBcdHhTFuaRQXdeni/VeRszIGT2cZPCZmfLeuXXRsx1yRwMVjaJmW1DJW X-Received: by 2002:a5d:93c2:: with SMTP id j2mr25292573ioo.166.1614186237260; Wed, 24 Feb 2021 09:03:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614186237; cv=none; d=google.com; s=arc-20160816; b=DaxOlyq/s89jF6qiZfaMvhAnHAB1T8z/fZVQj3yIHLKxvaZImSVRKQ1E5bi0FV4XHz FXm2Lkmx/9V8FBPHg/YxgtYLftO1lb014SdM+BIXpC9KlTQCNsJQDp0H/oQnO3Th2KbW TrB/Pf2c2UrFV4uAuBiyuI7p1676vc8CDD42k0NF95Pv/x5FmcXGq7/tX9kqKllkSv+K PrmhqF8mTN01+mI0ffooikidb2x/4D8sVWfgSFTW/kT9WwBQaWcl8j6998tTAKIdmP0A zlBE2blY8smDYgT7sQDXGvCdjr3H3IFiJRxjARaOx0K0ZkTHI2NaKFM+aouVs8H9Oifr dE1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=z5aRHBbMC4Mouk4nv3EKL6EACIbK+IoheJgxjehumZ4=; b=xEVHQy291HlTJdisufAztG5Ra1zOIvuXOzEJLBBO+RFCKXkWAzgpRaSb0D/SY6Zg8J dwbJHLIMTXH0Ko/bOqaO/pxqpxxWV465etDHbF+YZK5voXU7QZ0v2sH80KJKbijhKt39 ZiB7rFy6G21F6Hj+m0kTUVgHFS8hZRwzkvHU4wgCuiSQGs2eA1DQ8OTbMfJw5X4ZQ5F2 9ofnjyh+Uu24dK1jHhg5JAqJC2n+6IOS2b7ISgd8Ck6mLIepwXRMnbfV4tUmPfifhUz0 K52Sj8xnX1BXMYLxGE2JKZiYoMa5r4GILLtENDpShdnsOc2XtyGp7w/dhBCiduqTf7Xq qRfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JnfwqPtZ; 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=fail (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 x19si2328414jat.82.2021.02.24.09.03.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Feb 2021 09:03:57 -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=fail header.i=@linaro.org header.s=google header.b=JnfwqPtZ; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:33636 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lExZs-0005gL-LE for patch@linaro.org; Wed, 24 Feb 2021 12:03:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lExUT-0003GF-S6 for qemu-devel@nongnu.org; Wed, 24 Feb 2021 11:58:21 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:40041) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lExUR-00074j-CK for qemu-devel@nongnu.org; Wed, 24 Feb 2021 11:58:21 -0500 Received: by mail-wm1-x336.google.com with SMTP id l13so2454574wmg.5 for ; Wed, 24 Feb 2021 08:58:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z5aRHBbMC4Mouk4nv3EKL6EACIbK+IoheJgxjehumZ4=; b=JnfwqPtZLP8NBpJI1qfu8vTCF8uTHPoQmTSJPaCz0RtOH3N4PhxCVBJ4Uj5aWu2qly G7SaZSOZDIfYkNw2t6BG9n/3M9VEkEKCzla7fsQrJm2biRnFJYYzeS7a+rQ9wi2111Bb 4i2DTxPXBDvk/DhpD5f9uMT7gDNiKNYhg913fo3xZWzabuesz3HOxbt6LjLLlG4NZNo5 mb3SJnhy6vvcI/6iMD4z3m+Vp7XkfOKL4eUbv+5avoO92v9W1oKI0HSQULS3g8fAJ59A G2rPG8/foSZNbozq3scIO24jpt/j9f100Mkx3rPkKB6NJitg0VpmvP4Y6B5P9eEzjxJ/ 6lnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z5aRHBbMC4Mouk4nv3EKL6EACIbK+IoheJgxjehumZ4=; b=moXEHOr63Gf6QWI1xW1DeM9PaJ1j7EPBGuW9rBF5kqnoe1OyCtkmpFpW1ya/0e0Zoi rW6CE7sr48pHTL0OPWO3tKe4DTd2j1gXfgzHxOk8MI3MpQdnA4kH7GCrYfIqA90s07Gc rsExrbAKJmDMGaRk97CU3hdAaxF4e5Ch46m0QliyV97TGG9H+RMAVQAuHbO8L4GgprTR FFaroY66uZjmqU0gxHYkskJestZw/H2iTtTYO7XOu0esQCILSnqtMSjkkuMxO2yJEzsE QW2WB/SKatOplS4BOl6V/fFztl/vQIPouqPO+pJdErL97HXP2yOsQhjnrADE/8OXtKUh ZrEQ== X-Gm-Message-State: AOAM532Xi69GqBJsVzNxumzYGhhxConQAxAaMjTvigL0/A/iSiEJ8bQI lG5766QHCsv+3/mXcH+ObSWPfw== X-Received: by 2002:a1c:23c2:: with SMTP id j185mr4614005wmj.96.1614185897355; Wed, 24 Feb 2021 08:58:17 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id o10sm4246718wrx.5.2021.02.24.08.58.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 08:58:16 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D06111FF90; Wed, 24 Feb 2021 16:58:11 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: richard.henderson@linaro.org Subject: [RFC PATCH 4/5] include/exec: lightly re-arrange TranslationBlock Date: Wed, 24 Feb 2021 16:58:10 +0000 Message-Id: <20210224165811.11567-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210224165811.11567-1-alex.bennee@linaro.org> References: <20210224165811.11567-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , cota@braap.org, =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Lets make sure all the flags we compare when looking up blocks are together in the same place. Signed-off-by: Alex Bennée --- include/exec/exec-all.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index acf66ab692..75f8c3981a 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -448,9 +448,6 @@ struct TranslationBlock { target_ulong pc; /* simulated PC corresponding to this block (EIP + CS base) */ target_ulong cs_base; /* CS base for this block */ uint32_t flags; /* flags defining in which context the code was generated */ - uint16_t size; /* size of target code for this block (1 <= - size <= TARGET_PAGE_SIZE) */ - uint16_t icount; uint32_t cflags; /* compile flags */ #define CF_COUNT_MASK 0x00007fff #define CF_LAST_IO 0x00008000 /* Last insn may be an IO access. */ @@ -464,6 +461,11 @@ struct TranslationBlock { /* Per-vCPU dynamic tracing state used to generate this TB */ uint32_t trace_vcpu_dstate; + /* Above fields used for comparing */ + uint16_t size; /* size of target code for this block (1 <= + size <= TARGET_PAGE_SIZE) */ + uint16_t icount; + struct tb_tc tc; /* first and second physical page containing code. The lower bit