diff --git a/target-alpha/translate.c b/target-alpha/translate.c index 4a741573d7..9bf6163e6b 100644 --- a/target-alpha/translate.c +++ b/target-alpha/translate.c @@ -43,11 +43,11 @@ struct DisasContext { uint32_t amask; }; -TCGv cpu_env; +static TCGv cpu_env; #include "gen-icount.h" -void alpha_translate_init() +static void alpha_translate_init() { static int done_init = 0; if (done_init) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index b98ba35bd3..e0c318582c 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -49,7 +49,7 @@ static TCGv cpu_env; void ppc_translate_init(void) { - int done_init = 0; + static int done_init = 0; if (done_init) return; cpu_env = tcg_global_reg_new(TCG_TYPE_PTR, TCG_AREG0, "env"); diff --git a/target-sh4/translate.c b/target-sh4/translate.c index 8e3f324f3e..0a6f4171fd 100644 --- a/target-sh4/translate.c +++ b/target-sh4/translate.c @@ -60,7 +60,7 @@ static TCGv cpu_env; #include "gen-icount.h" -void sh4_translate_init() +static void sh4_translate_init() { static int done_init = 0; if (done_init)