[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 09/15] target/cris: Fold unhandled X_FLAG changes into cpustat
From: |
Richard Henderson |
Subject: |
[PATCH v3 09/15] target/cris: Fold unhandled X_FLAG changes into cpustate_changed |
Date: |
Tue, 22 Jun 2021 08:48:14 -0700 |
We really do this already, by including them into the same test.
This just hoists the expression up a bit.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/cris/translate.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/target/cris/translate.c b/target/cris/translate.c
index e14b7acb10..80276ae84d 100644
--- a/target/cris/translate.c
+++ b/target/cris/translate.c
@@ -3217,6 +3217,10 @@ static void cris_tr_translate_insn(DisasContextBase
*dcbase, CPUState *cs)
cris_clear_x_flag(dc);
}
+ /* Fold unhandled changes to X_FLAG into cpustate_changed. */
+ dc->cpustate_changed |= !dc->flagx_known;
+ dc->cpustate_changed |= dc->flags_x != (dc->base.tb->flags & X_FLAG);
+
/*
* Check for delayed branches here. If we do it before
* actually generating any host code, the simulator will just
@@ -3227,9 +3231,7 @@ static void cris_tr_translate_insn(DisasContextBase
*dcbase, CPUState *cs)
t_gen_movi_env_TN(dslot, 0);
}
- if (dc->cpustate_changed
- || !dc->flagx_known
- || (dc->flags_x != (dc->base.tb->flags & X_FLAG))) {
+ if (dc->cpustate_changed) {
cris_store_direct_jmp(dc);
}
@@ -3263,10 +3265,7 @@ static void cris_tr_translate_insn(DisasContextBase
*dcbase, CPUState *cs)
}
/* Force an update if the per-tb cpu state has changed. */
- if (dc->base.is_jmp == DISAS_NEXT
- && (dc->cpustate_changed
- || !dc->flagx_known
- || (dc->flags_x != (dc->base.tb->flags & X_FLAG)))) {
+ if (dc->base.is_jmp == DISAS_NEXT && dc->cpustate_changed) {
dc->base.is_jmp = DISAS_UPDATE;
tcg_gen_movi_tl(env_pc, dc->pc);
}
--
2.25.1
- [PATCH v3 10/15] target/cris: Add DISAS_UPDATE_NEXT, (continued)
- [PATCH v3 14/15] target/cris: Remove dc->flagx_known, Richard Henderson, 2021/06/22
- [PATCH v3 13/15] target/cris: Improve JMP_INDIRECT, Richard Henderson, 2021/06/22
- [PATCH v3 02/15] target/cris: Remove DISAS_SWI, Richard Henderson, 2021/06/22
- [PATCH v3 03/15] target/cris: Replace DISAS_TB_JUMP with DISAS_NORETURN, Richard Henderson, 2021/06/22
- [PATCH v3 06/15] target/cris: Convert to TranslatorOps, Richard Henderson, 2021/06/22
- [PATCH v3 09/15] target/cris: Fold unhandled X_FLAG changes into cpustate_changed,
Richard Henderson <=
- [PATCH v3 08/15] target/cris: Mark static arrays const, Richard Henderson, 2021/06/22
- [PATCH v3 15/15] target/cris: Do not exit tb for X_FLAG changes, Richard Henderson, 2021/06/22
- [PATCH v3 12/15] target/cris: Use tcg_gen_lookup_and_goto_ptr, Richard Henderson, 2021/06/22