]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tcg: Remove argument to tcg_prologue_init
authorRichard Henderson <richard.henderson@linaro.org>
Sat, 30 Sep 2023 02:35:26 +0000 (19:35 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 4 Oct 2023 18:03:54 +0000 (11:03 -0700)
We can load tcg_ctx just as easily within the callee.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/tcg-all.c
bsd-user/main.c
include/tcg/tcg.h
linux-user/main.c
tcg/tcg.c

index 7ea7dead1640a41dd7a3797da44522e229869b0c..a81400d3ee71186080cf7e09048c26ff58866818 100644 (file)
@@ -121,7 +121,7 @@ static int tcg_init_machine(MachineState *ms)
      * There's no guest base to take into account, so go ahead and
      * initialize the prologue now.
      */
-    tcg_prologue_init(tcg_ctx);
+    tcg_prologue_init();
 #endif
 
     return 0;
index 6c9addb75aee0a1dcc889401296ac515f712f8f6..7ad406903a66294ebe9694e7bbde792385568c35 100644 (file)
@@ -586,7 +586,7 @@ int main(int argc, char **argv)
      * generating the prologue until now so that the prologue can take
      * the real value of GUEST_BASE into account.
      */
-    tcg_prologue_init(tcg_ctx);
+    tcg_prologue_init();
 
     target_cpu_init(env, regs);
 
index 7743868dc9f8d9ca9e0e2e1e311818a12c15d032..2e2d12d421de304b05eee22fe1f3c3628970213d 100644 (file)
@@ -784,7 +784,7 @@ static inline void *tcg_malloc(int size)
 
 void tcg_init(size_t tb_size, int splitwx, unsigned max_cpus);
 void tcg_register_thread(void);
-void tcg_prologue_init(TCGContext *s);
+void tcg_prologue_init(void);
 void tcg_func_start(TCGContext *s);
 
 int tcg_gen_code(TCGContext *s, TranslationBlock *tb, uint64_t pc_start);
index 0a62e2be4747106694ea0313b3e5cc51baf4530f..eb66ddec1160aacf25f66f2ef3d0969552db2e80 100644 (file)
@@ -994,7 +994,7 @@ int main(int argc, char **argv, char **envp)
     /* Now that we've loaded the binary, GUEST_BASE is fixed.  Delay
        generating the prologue until now so that the prologue can take
        the real value of GUEST_BASE into account.  */
-    tcg_prologue_init(tcg_ctx);
+    tcg_prologue_init();
 
     target_cpu_copy_regs(env, regs);
 
index 9256217b8feab848e9aa14aa0220dc827cac15e9..e37e5a3b5d06ee2d1b320548248aa6f4ff2272be 100644 (file)
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1395,8 +1395,9 @@ TranslationBlock *tcg_tb_alloc(TCGContext *s)
     return tb;
 }
 
-void tcg_prologue_init(TCGContext *s)
+void tcg_prologue_init(void)
 {
+    TCGContext *s = tcg_ctx;
     size_t prologue_size;
 
     s->code_ptr = s->code_gen_ptr;