From patchwork Mon Jan 11 19:00:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 360528 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp3132988jai; Mon, 11 Jan 2021 11:10:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIrHF3EO+WPgN9jb3JShqow+o6DFhEl78URE/Luhb4lRlF+5GK9Xldp7hbGN6nFNLhwA4F X-Received: by 2002:a25:e907:: with SMTP id n7mr1716068ybd.288.1610392202257; Mon, 11 Jan 2021 11:10:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610392202; cv=none; d=google.com; s=arc-20160816; b=FLJD13FMLoP03Moq9tBJCvlNbn+V2d6Y4tCtAbrQDv4pq4ZceclvJ3rby4YpXZYT+0 EM7Y6T1PaN322VvtcGEdwStcb7bi1hkY69dRx5yg7zCgAX7b0B6lTkGHVxhWLn6a2rxq WlGvqM/OSVV8s70d6/RO935Q/JzR5dmNVscTnTg+P1MPte10IrxMGvm5nZ+0IK321YoA 7DRh6/qSX5DUtmVHa9PnoW+P3EfUwrBW+XOwGBK7tldN8ocl/9TCFgW00mD5XMxKkaOe naWG3zzm9b/q1FGGmWepiLOwd6tTR6R6RnYN9KKxUfSqPwK6X17usKMuNVW8QdPs7YT5 lb/g== 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=Eqku9olTG9KcFAe0Bboq71aa8Qg5GclGuwOXsQ8VxnQ=; b=zmdZfSF9TfoVP8+Ll8AHsL7BhuVqF0GtF0A8hlVNi8EstxtnifFQbEtYExEgznG1nm +73QOLQulBBAxOBacT/1RRweTmVGA0jDhD1hz+69aWAyWElbqMhEXIxxevwIfwqqXP/n DgPdiaNm0BbuTSkk9LESI9EmQGnpq603LOXGZ9o/PNWQeqs01g1EO/qjbnqKb3lshfFn YgXQFXGRUrvKfnw8vWWRerj7r5bZRx/7tPwIupx09PSVDimadDNjDZ8L3ZDpRJKoe8h0 fiPbYpFObYCuI/3Qdus1Hnw8uOcarABBpQgmqkt+y6UfpCB+Ui4s+fkQVBAQkYqJcO0g 8tBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=HUpgZHTq; 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 d130si912534ybc.102.2021.01.11.11.10.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Jan 2021 11:10:02 -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=HUpgZHTq; 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]:38396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kz2Zl-0005jU-Kl for patch@linaro.org; Mon, 11 Jan 2021 14:10:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kz2RY-0005vN-34 for qemu-devel@nongnu.org; Mon, 11 Jan 2021 14:01:32 -0500 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:35378) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kz2RW-0006PW-DJ for qemu-devel@nongnu.org; Mon, 11 Jan 2021 14:01:31 -0500 Received: by mail-pg1-x52d.google.com with SMTP id n7so281392pgg.2 for ; Mon, 11 Jan 2021 11:01:29 -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=Eqku9olTG9KcFAe0Bboq71aa8Qg5GclGuwOXsQ8VxnQ=; b=HUpgZHTqPegkXvHDjb+0RAGfu6JGta9zzUU+7Yf7+/LRQcdHUIOvEXqPN3h4xdbge7 gpmaCSOL+k3npdkFcE3cSzOP+qXwZdeslyYq7RPZYzGCnVMRgbrUr8FSpaC6FTn50z29 Dx2BHCM78hxky0jzHbmnwD6PkMOJBBDuquVyZcVA9UVUN8yPU5MMF05EiIK8vj5+CQsV yM9Z9IPTj8YxYFratsg0tarEkYq+PrdsL+vgGnYgxFaCNvnIRdASSXrpLF3E8Ao+bX+z JJ/qqdnLE0jcPme6nsSbwK7qcbRcLtejZWDyYi6SWEqHc8HUSEGTqVCx/2Us7FiDOIvf qxYw== 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=Eqku9olTG9KcFAe0Bboq71aa8Qg5GclGuwOXsQ8VxnQ=; b=edEuYZCzOdJkhzm28NaKKOjsUzrbh+FVmUAPrxd8zsXmCTBjT5zpxRKG0M8m/g59Xn kJS30RH8s4U8ci92rwJQZsr5CyUUfdD8pzpiH8duYzUN6fYJNhocfrxBGZmFHGVE2ZGD ouTRjst0LI69VJjttXzh88Zzu6j5zRz/HZfy45CUPaJVx1Axj81b38CpiuUcY95FwSlw J/axxdiV4GSscdhkHAYKVJgXKOC9KYxmZ5K7owaAZ0lPG94YRvCwocgNlLXfGOt7LYSW ir5N30c59EXqX3BYOviZWONKwqzWGpecPPWuswhS/eYBHztbdA8o4V6YXM3I43IurjTQ tmhg== X-Gm-Message-State: AOAM530zfM0i+hii3we8DS+26+KwwQqCByvf+sXmsSw+bETP2IJGitAU 1zG7BCD6z8HAM9vSU3vlpOQHbdCLK1Z/4w== X-Received: by 2002:a62:8f0e:0:b029:1aa:1268:fa4e with SMTP id n14-20020a628f0e0000b02901aa1268fa4emr823755pfd.18.1610391688695; Mon, 11 Jan 2021 11:01:28 -0800 (PST) Received: from localhost.localdomain (rrcs-173-197-107-21.west.biz.rr.com. [173.197.107.21]) by smtp.gmail.com with ESMTPSA id n195sm350395pfd.169.2021.01.11.11.01.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 11:01:28 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 07/30] target/arm: Move TBFLAG_AM32 bits to the top Date: Mon, 11 Jan 2021 09:00:50 -1000 Message-Id: <20210111190113.303726-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210111190113.303726-1-richard.henderson@linaro.org> References: <20210111190113.303726-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52d; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52d.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=unavailable 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, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Now that these bits have been moved out of tb->flags, where TBFLAG_ANY was filling from the top, move AM32 to fill from the top, and A32 and M32 to fill from the bottom. This means fewer changes when adding new bits. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) -- 2.25.1 diff --git a/target/arm/cpu.h b/target/arm/cpu.h index af70462cfa..43bcd21959 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -3265,13 +3265,13 @@ typedef ARMCPU ArchCPU; * * The bits for 32-bit A-profile and M-profile partially overlap: * - * 18 9 0 - * +----------------+--------------+ - * | TBFLAG_A32 | | - * +-----+----------+ TBFLAG_AM32 | - * | |TBFLAG_M32| | - * +-----+----------+--------------+ - * 14 9 0 + * 31 23 11 10 0 + * +-------------+----------+----------------+ + * | | | TBFLAG_A32 | + * | TBFLAG_AM32 | +-----+----------+ + * | | |TBFLAG_M32| + * +-------------+----------------+----------+ + * 31 23 5 4 0 * * Unless otherwise noted, these bits are cached in env->hflags. */ @@ -3288,44 +3288,44 @@ FIELD(TBFLAG_ANY, DEBUG_TARGET_EL, 20, 2) /* * Bit usage when in AArch32 state, both A- and M-profile. */ -FIELD(TBFLAG_AM32, CONDEXEC, 0, 8) /* Not cached. */ -FIELD(TBFLAG_AM32, THUMB, 8, 1) /* Not cached. */ +FIELD(TBFLAG_AM32, CONDEXEC, 24, 8) /* Not cached. */ +FIELD(TBFLAG_AM32, THUMB, 23, 1) /* Not cached. */ /* * Bit usage when in AArch32 state, for A-profile only. */ -FIELD(TBFLAG_A32, VECLEN, 9, 3) /* Not cached. */ -FIELD(TBFLAG_A32, VECSTRIDE, 12, 2) /* Not cached. */ +FIELD(TBFLAG_A32, VECLEN, 0, 3) /* Not cached. */ +FIELD(TBFLAG_A32, VECSTRIDE, 3, 2) /* Not cached. */ /* * We store the bottom two bits of the CPAR as TB flags and handle * checks on the other bits at runtime. This shares the same bits as * VECSTRIDE, which is OK as no XScale CPU has VFP. * Not cached, because VECLEN+VECSTRIDE are not cached. */ -FIELD(TBFLAG_A32, XSCALE_CPAR, 12, 2) -FIELD(TBFLAG_A32, VFPEN, 14, 1) /* Partially cached, minus FPEXC. */ -FIELD(TBFLAG_A32, SCTLR__B, 15, 1) /* Cannot overlap with SCTLR_B */ -FIELD(TBFLAG_A32, HSTR_ACTIVE, 16, 1) +FIELD(TBFLAG_A32, XSCALE_CPAR, 5, 2) +FIELD(TBFLAG_A32, VFPEN, 7, 1) /* Partially cached, minus FPEXC. */ +FIELD(TBFLAG_A32, SCTLR__B, 8, 1) /* Cannot overlap with SCTLR_B */ +FIELD(TBFLAG_A32, HSTR_ACTIVE, 9, 1) /* * Indicates whether cp register reads and writes by guest code should access * the secure or nonsecure bank of banked registers; note that this is not * the same thing as the current security state of the processor! */ -FIELD(TBFLAG_A32, NS, 17, 1) +FIELD(TBFLAG_A32, NS, 10, 1) /* * Bit usage when in AArch32 state, for M-profile only. */ /* Handler (ie not Thread) mode */ -FIELD(TBFLAG_M32, HANDLER, 9, 1) +FIELD(TBFLAG_M32, HANDLER, 0, 1) /* Whether we should generate stack-limit checks */ -FIELD(TBFLAG_M32, STACKCHECK, 10, 1) +FIELD(TBFLAG_M32, STACKCHECK, 1, 1) /* Set if FPCCR.LSPACT is set */ -FIELD(TBFLAG_M32, LSPACT, 11, 1) /* Not cached. */ +FIELD(TBFLAG_M32, LSPACT, 2, 1) /* Not cached. */ /* Set if we must create a new FP context */ -FIELD(TBFLAG_M32, NEW_FP_CTXT_NEEDED, 12, 1) /* Not cached. */ +FIELD(TBFLAG_M32, NEW_FP_CTXT_NEEDED, 3, 1) /* Not cached. */ /* Set if FPCCR.S does not match current security state */ -FIELD(TBFLAG_M32, FPCCR_S_WRONG, 13, 1) /* Not cached. */ +FIELD(TBFLAG_M32, FPCCR_S_WRONG, 4, 1) /* Not cached. */ /* * Bit usage when in AArch64 state