mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-02 06:51:53 -06:00
target-arm: A64: Handle blr lr
For linked branches, updates to the link register happen conceptually after the read of the branch target register. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Cc: qemu-stable@nongnu.org Message-id: 1398926097-28097-3-git-send-email-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
fed3ffb9f1
commit
1b505f93bc
1 changed files with 2 additions and 1 deletions
|
@ -1509,8 +1509,10 @@ static void disas_uncond_b_reg(DisasContext *s, uint32_t insn)
|
||||||
switch (opc) {
|
switch (opc) {
|
||||||
case 0: /* BR */
|
case 0: /* BR */
|
||||||
case 2: /* RET */
|
case 2: /* RET */
|
||||||
|
tcg_gen_mov_i64(cpu_pc, cpu_reg(s, rn));
|
||||||
break;
|
break;
|
||||||
case 1: /* BLR */
|
case 1: /* BLR */
|
||||||
|
tcg_gen_mov_i64(cpu_pc, cpu_reg(s, rn));
|
||||||
tcg_gen_movi_i64(cpu_reg(s, 30), s->pc);
|
tcg_gen_movi_i64(cpu_reg(s, 30), s->pc);
|
||||||
break;
|
break;
|
||||||
case 4: /* ERET */
|
case 4: /* ERET */
|
||||||
|
@ -1529,7 +1531,6 @@ static void disas_uncond_b_reg(DisasContext *s, uint32_t insn)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
tcg_gen_mov_i64(cpu_pc, cpu_reg(s, rn));
|
|
||||||
s->is_jmp = DISAS_JUMP;
|
s->is_jmp = DISAS_JUMP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue