From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: [Qemu-devel] [PATCH 13/13] target/arm: Remove assertions from resolve_id_regs
Date: Sat, 15 Sep 2018 09:17:38 -0700 [thread overview]
Message-ID: <20180915161738.25257-14-richard.henderson@linaro.org> (raw)
In-Reply-To: <20180915161738.25257-1-richard.henderson@linaro.org>
This is a prerequisite to removing the now-redundant
initializations from within the individual cpus.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/cpu.c | 41 +++++++----------------------------------
1 file changed, 7 insertions(+), 34 deletions(-)
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 2ec71104c9..79103926a4 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -1108,49 +1108,22 @@ static uint64_t resolve_id_aa64pfr0(CPUARMState *env)
static void resolve_id_regs(ARMCPU *cpu)
{
CPUARMState *env = &cpu->env;
- uint64_t orig;
- orig = cpu->id_isar0;
- cpu->id_isar0 = resolve_id_isar0(env, orig);
- g_assert_cmphex(cpu->id_isar0, ==, orig);
-
- orig = cpu->id_isar1;
+ cpu->id_isar0 = resolve_id_isar0(env, cpu->id_isar0);
cpu->id_isar1 = resolve_id_isar1(env);
- g_assert_cmphex(cpu->id_isar1, ==, orig);
-
- orig = cpu->id_isar2;
- cpu->id_isar2 = resolve_id_isar2(env, orig);
- g_assert_cmphex(cpu->id_isar2, ==, orig);
-
- orig = cpu->id_isar3;
+ cpu->id_isar2 = resolve_id_isar2(env, cpu->id_isar2);
cpu->id_isar3 = resolve_id_isar3(env);
- g_assert_cmphex(cpu->id_isar3, ==, orig);
-
- orig = cpu->id_isar4;
cpu->id_isar4 = resolve_id_isar4(env);
- /* Willfully ignore the SWP_frac field. */
- g_assert_cmphex(cpu->id_isar4 & 0x0fffffff, ==, orig & 0x0fffffff);
-
cpu->id_isar5 = resolve_id_isar5(env);
cpu->id_isar6 = resolve_id_isar6(env);
-
- orig = cpu->id_pfr0;
cpu->id_pfr0 = resolve_id_pfr0(env);
- g_assert_cmphex(cpu->id_pfr0, ==, orig);
-
- orig = cpu->id_pfr1;
cpu->id_pfr1 = resolve_id_pfr1(env);
- g_assert_cmphex(cpu->id_pfr1, ==, orig);
- orig = cpu->id_aa64isar0;
- cpu->id_aa64isar0 = resolve_id_aa64isar0(env);
- g_assert_cmphex(cpu->id_aa64isar0, ==, orig);
-
- cpu->id_aa64isar1 = resolve_id_aa64isar1(env);
-
- orig = cpu->id_aa64pfr0;
- cpu->id_aa64pfr0 = resolve_id_aa64pfr0(env);
- g_assert_cmphex(cpu->id_aa64pfr0, ==, orig);
+ if (arm_feature(env, ARM_FEATURE_AARCH64)) {
+ cpu->id_aa64isar0 = resolve_id_aa64isar0(env);
+ cpu->id_aa64isar1 = resolve_id_aa64isar1(env);
+ cpu->id_aa64pfr0 = resolve_id_aa64pfr0(env);
+ }
}
static void arm_cpu_realizefn(DeviceState *dev, Error **errp)
--
2.17.1
prev parent reply other threads:[~2018-09-15 16:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-15 16:17 [Qemu-devel] [RFC PATCH 00/13] target/arm: Derive cpu id regs from features Richard Henderson
2018-09-15 16:17 ` [Qemu-devel] [PATCH 01/13] target/arm: Add ARM_FEATURE_SWP Richard Henderson
2018-09-16 1:32 ` Peter Maydell
2018-09-16 15:53 ` Richard Henderson
2018-09-16 16:54 ` Peter Maydell
2018-09-15 16:17 ` [Qemu-devel] [PATCH 02/13] target/arm: Derive id_isar0 from features Richard Henderson
2018-09-15 16:17 ` [Qemu-devel] [PATCH 03/13] target/arm: Derive id_isar1 " Richard Henderson
2018-09-15 16:17 ` [Qemu-devel] [PATCH 04/13] target/arm: Derive id_isar2 " Richard Henderson
2018-09-15 16:17 ` [Qemu-devel] [PATCH 05/13] target/arm: Derive id_isar3 " Richard Henderson
2018-09-15 16:17 ` [Qemu-devel] [PATCH 06/13] target/arm: Derive id_isar4 " Richard Henderson
2018-09-15 16:17 ` [Qemu-devel] [PATCH 07/13] target/arm: Derive id_isar5 and id_isar6 " Richard Henderson
2018-09-15 16:17 ` [Qemu-devel] [PATCH 08/13] target/arm: Derive id_pfr0 " Richard Henderson
2018-09-15 16:17 ` [Qemu-devel] [PATCH 09/13] target/arm: Derive id_pfr1 " Richard Henderson
2018-09-15 16:17 ` [Qemu-devel] [PATCH 10/13] target/arm: Derive id_aa64isar0 " Richard Henderson
2018-09-15 16:17 ` [Qemu-devel] [PATCH 11/13] target/arm: Derive id_aa64isar1 " Richard Henderson
2018-09-15 16:17 ` [Qemu-devel] [PATCH 12/13] target/arm: Derive id_aa64pfr0 " Richard Henderson
2018-09-15 16:17 ` Richard Henderson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180915161738.25257-14-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).