mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
target/arm: Enable TARGET_TB_PCREL
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20221020030641.2066807-10-richard.henderson@linaro.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
35dbeb8177
commit
abb80995d7
6 changed files with 178 additions and 71 deletions
|
@ -76,17 +76,18 @@ static vaddr arm_cpu_get_pc(CPUState *cs)
|
|||
void arm_cpu_synchronize_from_tb(CPUState *cs,
|
||||
const TranslationBlock *tb)
|
||||
{
|
||||
ARMCPU *cpu = ARM_CPU(cs);
|
||||
CPUARMState *env = &cpu->env;
|
||||
|
||||
/*
|
||||
* It's OK to look at env for the current mode here, because it's
|
||||
* never possible for an AArch64 TB to chain to an AArch32 TB.
|
||||
*/
|
||||
if (is_a64(env)) {
|
||||
env->pc = tb_pc(tb);
|
||||
} else {
|
||||
env->regs[15] = tb_pc(tb);
|
||||
/* The program counter is always up to date with TARGET_TB_PCREL. */
|
||||
if (!TARGET_TB_PCREL) {
|
||||
CPUARMState *env = cs->env_ptr;
|
||||
/*
|
||||
* It's OK to look at env for the current mode here, because it's
|
||||
* never possible for an AArch64 TB to chain to an AArch32 TB.
|
||||
*/
|
||||
if (is_a64(env)) {
|
||||
env->pc = tb_pc(tb);
|
||||
} else {
|
||||
env->regs[15] = tb_pc(tb);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_TCG */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue