From db0c51a380394b21b33a6294367aff03ab06b286 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 28 Oct 2020 12:05:44 -0700 Subject: tcg: Introduce tcg_splitwx_to_{rx,rw} Add two helper functions, using a global variable to hold the displacement. The displacement is currently always 0, so no change in behaviour. Begin using the functions in tcg common code only. Reviewed-by: Joelle van Dyne Signed-off-by: Richard Henderson --- disas.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'disas.c') diff --git a/disas.c b/disas.c index 7c18d7d2a7..de1de7be94 100644 --- a/disas.c +++ b/disas.c @@ -299,8 +299,10 @@ char *plugin_disas(CPUState *cpu, uint64_t addr, size_t size) } /* Disassemble this for me please... (debugging). */ -void disas(FILE *out, void *code, unsigned long size) +void disas(FILE *out, const void *ccode, unsigned long size) { + /* TODO: Push constness through the disas backends. */ + void *code = (void *)ccode; uintptr_t pc; int count; CPUDebug s; -- cgit v1.2.3