Skip to contentSkip to conversation

target-arm: Missed gen_set_condexec() in AA32 translation

PATCH Applied Sergey Fedorov 2 participants 4 messages Nov 17, 2015 – Nov 19, 2015

lore
Share & tools
lore
#0 lore raw

v2 cover target-arm: Missed gen_set_condexec() in AA32 translation

Changes in v2:
* Typo fixed in the first patch

Sergey Fedorov (2):
target-arm: Update condexec before CP access check in AA32 translation
target-arm: Update condexec before arch BP check in AA32 translation

 target-arm/translate.c | 2 ++
 1 file changed, 2 insertions(+)
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/2 target-arm: Update condexec before CP access check in AA32 translation

Coprocessor access instructions are allowed inside IT block. gen_helper_access_check_cp_reg() can raise an exceptions thus condexec bits should be updated before.

---

Notes:
Changes in v2:
* Typo fixed

 target-arm/translate.c | 1 +
 1 file changed, 1 insertion(+)
target-arm/translate.c +1 -0
index 4351854..739f373 100644
@@ -7210,6 +7210,7 @@ static int disas_coproc_insn(DisasContext *s, uint32_t insn)
                 break;
             }
 
+            gen_set_condexec(s);
             gen_set_pc_im(s, s->pc - 4);
             tmpptr = tcg_const_ptr(ri);
             tcg_syn = tcg_const_i32(syndrome);
Signature · 1 line
1.9.1
#2 lore raw

PATCH v2 2/2 target-arm: Update condexec before arch BP check in AA32 translation

In reply to Sergey Fedorov

Architectural breakpoint check could raise an exceptions, thus condexec bits should be updated before calling gen_helper_check_breakpoints().

---
 target-arm/translate.c | 1 +
 1 file changed, 1 insertion(+)
target-arm/translate.c +1 -0
index 739f373..5d22879 100644
@@ -11374,6 +11374,7 @@ void gen_intermediate_code(CPUARMState *env, TranslationBlock *tb)
             QTAILQ_FOREACH(bp, &cs->breakpoints, entry) {
                 if (bp->pc == dc->pc) {
                     if (bp->flags & BP_CPU) {
+                        gen_set_condexec(dc);
                         gen_set_pc_im(dc, dc->pc);
                         gen_helper_check_breakpoints(cpu_env);
                         /* End the TB early; it's likely not going to be executed */
Signature · 1 line
1.9.1
#3 lore raw
In reply to Sergey Fedorov
Quoted 9 lines · Sergey Fedorov

Changes in v2:
* Typo fixed in the first patch

Sergey Fedorov (2):
target-arm: Update condexec before CP access check in AA32 translation
target-arm: Update condexec before arch BP check in AA32 translation

 target-arm/translate.c | 2 ++
 1 file changed, 2 insertions(+)

Applied to target-arm.next, thanks.

-- PMM