diff mbox series

[v4,01/43] tcg: Do not flush icache for interpreter

Message ID 20201214140314.18544-2-richard.henderson@linaro.org
State Superseded
Headers show
Series Mirror map JIT memory for TCG | expand

Commit Message

Richard Henderson Dec. 14, 2020, 2:02 p.m. UTC
This is currently a no-op within tci/tcg-target.h, but
is about to be moved to a more generic location.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 tcg/tcg.c | 4 ++++
 1 file changed, 4 insertions(+)

-- 
2.25.1

Comments

Joelle van Dyne Dec. 14, 2020, 9:17 p.m. UTC | #1
On Mon, Dec 14, 2020 at 6:02 AM Richard Henderson
<richard.henderson@linaro.org> wrote:
>

> This is currently a no-op within tci/tcg-target.h, but

> is about to be moved to a more generic location.

>

> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Reviewed-by: Joelle van Dyne <j@getutm.app>
diff mbox series

Patch

diff --git a/tcg/tcg.c b/tcg/tcg.c
index 43c6cf8f52..3b3f366acd 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1077,7 +1077,9 @@  void tcg_prologue_init(TCGContext *s)
 #endif
 
     buf1 = s->code_ptr;
+#ifndef CONFIG_TCG_INTERPRETER
     flush_icache_range((uintptr_t)buf0, (uintptr_t)buf1);
+#endif
 
     /* Deduct the prologue from the buffer.  */
     prologue_size = tcg_current_code_size(s);
@@ -4319,8 +4321,10 @@  int tcg_gen_code(TCGContext *s, TranslationBlock *tb)
         return -2;
     }
 
+#ifndef CONFIG_TCG_INTERPRETER
     /* flush instruction cache */
     flush_icache_range((uintptr_t)s->code_buf, (uintptr_t)s->code_ptr);
+#endif
 
     return tcg_current_code_size(s);
 }