From patchwork Sat Mar 6 21:36:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 394575 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp554444jai; Sat, 6 Mar 2021 13:50:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLDPw6dPxOUnEI8uHYsIa3a+K3j/utOpsUZT1lCfIzbr12dZORWcHWiHZmoGGNL0sKZuSQ X-Received: by 2002:a5d:9ec7:: with SMTP id a7mr12609900ioe.126.1615067451873; Sat, 06 Mar 2021 13:50:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615067451; cv=none; d=google.com; s=arc-20160816; b=xt6ryNrojk4oGxwkVjDT+RbErmmBUiCN3EvYtOCLXYwVhpM6/rB7GyxyIc8WY8Txjw AfjdczNzvLiAtxK8rhfHzlXrSzvK0ZbV2q9IYmA/SYTguHyNukZ4zSoVHMec9D01aYu1 yuLPOXRW9LP2z5yFnB4QUNjn3EeNiI10LeQk8Id5kiQfYMvSJ3FL2eF45IXkAR4a6XrJ a5OL5ZkXP+Tl/RsW+0YEIbCTcJ+IwVCUzzbDH4ye+ermLNwEdjkbyvuTU7ZirWIQlzS7 m5ylOq/+YwbzFm1SlRNNfMqyBV3qKxZybUevUTBU3rWllFnz2QtAaPOUhv5Jt7V0RNuE q8kA== 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=F8oLm+b5MpB59nkWYQpAlXOnlN0WpiVVfnOPsmvYmdk=; b=BEAv6HPh8tX8Jub4SHc4JmXRkSD55NnFmvPR6sqRUO4kuRmLSytCuHpw95kBmWnVPF coFJqyJfEFvHV/WS830LmLPqp5RZByVrxPNwRICLPhdF+m8fm8QLVjNkBIrtmmYPF4lA jyS2NaPr2Ao8sg80+HuneO0UGnOxSvKFzAaenv39BAlGTc4z2yYut05656x+4MAipY64 EIDZsloGCzAas/MbAfmZSEZbtkqv/krq0bS0BGkYuWI4Zh0u1I16Uy3BvMyyT7SQtBr6 qUdMSCN8SYRLShHMfZIQhO6M42yXMoRj2HvJVSysFAHJU7ISAQnNqMol09ettxgNBf8K VBgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ndos8ema; 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 a24si6626108iok.37.2021.03.06.13.50.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 06 Mar 2021 13:50:51 -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=Ndos8ema; 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]:41516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lIep1-0002VX-8K for patch@linaro.org; Sat, 06 Mar 2021 16:50:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIebM-0007Os-TU for qemu-devel@nongnu.org; Sat, 06 Mar 2021 16:36:44 -0500 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]:37542) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lIebL-000310-2o for qemu-devel@nongnu.org; Sat, 06 Mar 2021 16:36:44 -0500 Received: by mail-pj1-x1030.google.com with SMTP id x7-20020a17090a2b07b02900c0ea793940so995238pjc.2 for ; Sat, 06 Mar 2021 13:36:42 -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=F8oLm+b5MpB59nkWYQpAlXOnlN0WpiVVfnOPsmvYmdk=; b=Ndos8emaMlLeaoogiRUa+YsIPwrZhJseoGnQL6HO8OKslWjGk0JePnohKxzAnb/NUk U0MQKw4gf7mbFj/TfDilaaWsutm+6cvj9qoal7irkWLuNPhVQKLsoJu2EPgodUk8vXtr 1eltfjhn6y96vGvzKSygiuPfX0mIGn45XKYUMb6rx/Fvo3iQPAy1dlsJNEAAJsnKQMVL u03SwA6EhqicMtCCNID26C1Co5o2/lj4VdNMZlTxBsBF/q8SVPTkcfQQJkJhyTrLyfMQ Y9KtT6jKpROKffWmBupNqNZ8Qdol1JxfUMnKdJ/8JDkw1sDj7Kt81ywJQkeT7hyIbKNQ 7UPA== 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=F8oLm+b5MpB59nkWYQpAlXOnlN0WpiVVfnOPsmvYmdk=; b=uRr8W7I+utKq/wYrjyTAW9IVyzdWIb8zv6TGNXf9a+ZQk5oxc0S3u0zaieA7Rhlct6 KKxwcBJf9PGwPjU7h0Q0F1Ahz48oUil77JuYMeI5fw6OdFzFiWJ2ZQrsm/ldRMV3vM3u yAObpjBByWCQIEIAujTI1/6TIHoJzf0VtJtriXTC92MJ3cUsvOOViMPEo2UeSZnN1PW6 yHK5ojIfPHFHtlkqasCukBtusc+ZDM4U6j9tLngkxhUHWdzeRFrVRTu4ZJwZTje6Mc+l RfP6Et+xk7OxfQqAlLEzgeicN4ubmxLLx3U0KLY6u+PvDL/1LtDYXZYw5uRc2Vq5015o x24A== X-Gm-Message-State: AOAM532jmoM4bHby/4ORha51RKgiwFsBfs73Hg/Hq3ZJdAWSRP8bMSph WHs5fFk2liMZ/423j3vJbPQOaKi2F9MxXg== X-Received: by 2002:a17:90b:fd2:: with SMTP id gd18mr17221543pjb.115.1615066601707; Sat, 06 Mar 2021 13:36:41 -0800 (PST) Received: from localhost.localdomain ([71.212.131.83]) by smtp.gmail.com with ESMTPSA id r30sm6365616pgu.86.2021.03.06.13.36.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Mar 2021 13:36:41 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 26/27] include/exec: lightly re-arrange TranslationBlock Date: Sat, 6 Mar 2021 13:36:12 -0800 Message-Id: <20210306213613.85168-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210306213613.85168-1-richard.henderson@linaro.org> References: <20210306213613.85168-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1030.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: peter.maydell@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Alex Bennée Lets make sure all the flags we compare when looking up blocks are together in the same place. Signed-off-by: Alex Bennée Message-Id: <20210224165811.11567-5-alex.bennee@linaro.org> Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) -- 2.25.1 diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index acf66ab692..a262dd5804 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,14 @@ struct TranslationBlock { /* Per-vCPU dynamic tracing state used to generate this TB */ uint32_t trace_vcpu_dstate; + /* + * Above fields used for comparing + */ + + /* size of target code for this block (1 <= size <= TARGET_PAGE_SIZE) */ + uint16_t size; + uint16_t icount; + struct tb_tc tc; /* first and second physical page containing code. The lower bit