diff mbox series

[v1,4/6] target/arm/translate-a64: get rid of DISAS_EXIT

Message ID 20170710154749.13624-5-alex.bennee@linaro.org
State New
Headers show
Series DISAS_UPDATE fixes for eret | expand

Commit Message

Alex Bennée July 10, 2017, 3:47 p.m. UTC
We already have an exit condition that declares we should exit to the
run-loop because wider CPU state changes have been made. Use
DISAS_UPDATE and kill the architecture specific DISAS_EXIT.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 target/arm/translate-a64.c | 3 +--
 target/arm/translate.c     | 6 ++++--
 target/arm/translate.h     | 4 ----
 3 files changed, 5 insertions(+), 8 deletions(-)

-- 
2.13.0

Comments

Richard Henderson July 10, 2017, 4:37 p.m. UTC | #1
On 07/10/2017 05:47 AM, Alex Bennée wrote:
> We already have an exit condition that declares we should exit to the

> run-loop because wider CPU state changes have been made. Use

> DISAS_UPDATE and kill the architecture specific DISAS_EXIT.

> 

> Signed-off-by: Alex Bennée<alex.bennee@linaro.org>

> ---

>   target/arm/translate-a64.c | 3 +--

>   target/arm/translate.c     | 6 ++++--

>   target/arm/translate.h     | 4 ----

>   3 files changed, 5 insertions(+), 8 deletions(-)


I really thought it was clearer the other way around.


r~
diff mbox series

Patch

diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
index fe1c49b565..bde6ca934e 100644
--- a/target/arm/translate-a64.c
+++ b/target/arm/translate-a64.c
@@ -1425,7 +1425,7 @@  static void handle_msr_i(DisasContext *s, uint32_t insn,
         tcg_temp_free_i32(tcg_op);
         /* For DAIFClear, exit the cpu loop to re-evaluate pending IRQs.  */
         gen_a64_set_pc_im(s->pc);
-        s->is_jmp = (op == 0x1f ? DISAS_EXIT : DISAS_JUMP);
+        s->is_jmp = (op == 0x1f ? DISAS_UPDATE : DISAS_JUMP);
         break;
     }
     default:
@@ -11394,7 +11394,6 @@  void gen_intermediate_code_a64(ARMCPU *cpu, TranslationBlock *tb)
             tcg_gen_exit_tb(0);
             break;
         case DISAS_UPDATE:
-        case DISAS_EXIT:
         default:
             tcg_gen_exit_tb(0);
             break;
diff --git a/target/arm/translate.c b/target/arm/translate.c
index f9c4aee1b6..e840499c6f 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -1194,11 +1194,13 @@  static void gen_exception_insn(DisasContext *s, int offset, int excp,
     s->is_jmp = DISAS_EXC;
 }
 
-/* Force a TB lookup after an instruction that changes the CPU state.  */
+/* Force a TB lookup after an instruction that changes the CPU state.
+ * (other than just the PC)
+ */
 static inline void gen_lookup_tb(DisasContext *s)
 {
     tcg_gen_movi_i32(cpu_R[15], s->pc & ~1);
-    s->is_jmp = DISAS_EXIT;
+    s->is_jmp = DISAS_UPDATE;
 }
 
 static inline void gen_hlt(DisasContext *s, int imm)
diff --git a/target/arm/translate.h b/target/arm/translate.h
index 15d383d9af..6b2cc34c33 100644
--- a/target/arm/translate.h
+++ b/target/arm/translate.h
@@ -139,10 +139,6 @@  static void disas_set_insn_syndrome(DisasContext *s, uint32_t syn)
  * custom end-of-TB code)
  */
 #define DISAS_BX_EXCRET 11
-/* For instructions which want an immediate exit to the main loop,
- * as opposed to attempting to use lookup_and_goto_ptr.
- */
-#define DISAS_EXIT 12
 
 #ifdef TARGET_AARCH64
 void a64_translate_init(void);