Skip to content

Commit

Permalink
tcg: Do not flush icache for interpreter
Browse files Browse the repository at this point in the history
This is currently a no-op within tci/tcg-target.h, but
is about to be moved to a more generic location.

Reviewed-by: Joelle van Dyne <j@getutm.app>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Jan 7, 2021
1 parent ed6f53f commit df5d2b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tcg/tcg.c
Expand Up @@ -1078,7 +1078,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);
Expand Down Expand Up @@ -4324,8 +4326,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);
}
Expand Down

0 comments on commit df5d2b1

Please sign in to comment.