diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2017-10-21 22:53:35 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2018-01-30 10:08:18 -0800 |
commit | c301f34e798e2921cc4c4d1983512f1499e80996 (patch) | |
tree | a51b1ab447993f8157cd42761c7edf83c66dbf67 /target/hppa/cpu.c | |
parent | 660eefe1ca20ac118191bffcd23e721afec94142 (diff) |
target/hppa: Implement IASQ
Any one TB will have only one space value. If we change spaces,
we change TBs. Thus BE and BEV must exit the TB immediately.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/hppa/cpu.c')
-rw-r--r-- | target/hppa/cpu.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 4d0b760baa..2970afd58d 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -37,8 +37,23 @@ static void hppa_cpu_synchronize_from_tb(CPUState *cs, TranslationBlock *tb) { HPPACPU *cpu = HPPA_CPU(cs); +#ifdef CONFIG_USER_ONLY cpu->env.iaoq_f = tb->pc; cpu->env.iaoq_b = tb->cs_base; +#else + /* Recover the IAOQ values from the GVA + PRIV. */ + uint32_t priv = (tb->flags >> TB_FLAG_PRIV_SHIFT) & 3; + target_ulong cs_base = tb->cs_base; + target_ulong iasq_f = cs_base & ~0xffffffffull; + int32_t diff = cs_base; + + cpu->env.iasq_f = iasq_f; + cpu->env.iaoq_f = (tb->pc & ~iasq_f) + priv; + if (diff) { + cpu->env.iaoq_b = cpu->env.iaoq_f + diff; + } +#endif + cpu->env.psw_n = (tb->flags & PSW_N) != 0; } |