[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 42/47] tcg: Remove argument to tcg_prologue_init
|
From: |
Richard Henderson |
|
Subject: |
[PULL 42/47] tcg: Remove argument to tcg_prologue_init |
|
Date: |
Tue, 3 Oct 2023 10:30:47 -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>
---
include/tcg/tcg.h | 2 +-
accel/tcg/tcg-all.c | 2 +-
bsd-user/main.c | 2 +-
linux-user/main.c | 2 +-
tcg/tcg.c | 3 ++-
5 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h
index 7743868dc9..2e2d12d421 100644
--- a/include/tcg/tcg.h
+++ b/include/tcg/tcg.h
@@ -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);
diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c
index 7ea7dead16..a81400d3ee 100644
--- a/accel/tcg/tcg-all.c
+++ b/accel/tcg/tcg-all.c
@@ -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;
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 6c9addb75a..7ad406903a 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -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);
diff --git a/linux-user/main.c b/linux-user/main.c
index 0a62e2be47..eb66ddec11 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -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);
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 9256217b8f..e37e5a3b5d 100644
--- 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;
--
2.34.1
- [PULL 28/47] accel/tcg: Remove env_tlb(), (continued)
- [PULL 28/47] accel/tcg: Remove env_tlb(), Richard Henderson, 2023/10/03
- [PULL 35/47] accel: Rename accel-common.c -> accel-target.c, Richard Henderson, 2023/10/03
- [PULL 36/47] exec: Rename cpu.c -> cpu-target.c, Richard Henderson, 2023/10/03
- [PULL 37/47] exec: Rename target specific page-vary.c -> page-vary-target.c, Richard Henderson, 2023/10/03
- [PULL 34/47] accel: Make accel-blocker.o target agnostic, Richard Henderson, 2023/10/03
- [PULL 39/47] accel/tcg: Make monitor.c a target-agnostic unit, Richard Henderson, 2023/10/03
- [PULL 30/47] accel/tcg: move ld/st helpers to ldst_common.c.inc, Richard Henderson, 2023/10/03
- [PULL 38/47] accel/tcg: Rename target-specific 'internal.h' -> 'internal-target.h', Richard Henderson, 2023/10/03
- [PULL 41/47] accel/tcg: Make cpu-exec-common.c a target agnostic unit, Richard Henderson, 2023/10/03
- [PULL 40/47] accel/tcg: Make icount.o a target agnostic unit, Richard Henderson, 2023/10/03
- [PULL 42/47] tcg: Remove argument to tcg_prologue_init,
Richard Henderson <=
- [PULL 43/47] tcg: Split out tcg init functions to tcg/startup.h, Richard Henderson, 2023/10/03
- [PULL 45/47] build: Remove --enable-gprof, Richard Henderson, 2023/10/03
- [PULL 47/47] tcg/loongarch64: Fix buid error, Richard Henderson, 2023/10/03
- [PULL 44/47] linux-user/hppa: Fix struct target_sigcontext layout, Richard Henderson, 2023/10/03
- [PULL 46/47] tests/avocado: Re-enable MIPS Malta tests (GitLab issue #1884 fixed), Richard Henderson, 2023/10/03
- Re: [PULL 00/47] tcg patch queue, Stefan Hajnoczi, 2023/10/04