On 05/09/2014 06:35 AM, Peter Maydell wrote: > On 28 April 2014 20:28, Richard Henderson <[email protected]> wrote: >> And use tcg pointer differencing functions as appropriate. >> >> Signed-off-by: Richard Henderson <[email protected]> >> --- >> tcg/s390/tcg-target.c | 91 >> ++++++++++++++++++++++++--------------------------- >> tcg/s390/tcg-target.h | 2 ++ >> 2 files changed, 45 insertions(+), 48 deletions(-) >> >> diff --git a/tcg/s390/tcg-target.c b/tcg/s390/tcg-target.c >> index 1d912a7..ae1be1c 100644 >> --- a/tcg/s390/tcg-target.c >> +++ b/tcg/s390/tcg-target.c >> @@ -320,7 +320,7 @@ static const uint8_t tcg_cond_to_ltr_cond[] = { >> #ifdef CONFIG_SOFTMMU >> /* helper signature: helper_ld_mmu(CPUState *env, target_ulong addr, >> int mmu_idx) */ >> -static const void * const qemu_ld_helpers[4] = { >> +static void * const qemu_ld_helpers[4] = { >> helper_ldb_mmu, >> helper_ldw_mmu, >> helper_ldl_mmu, >> @@ -329,7 +329,7 @@ static const void * const qemu_ld_helpers[4] = { >> >> /* helper signature: helper_st_mmu(CPUState *env, target_ulong addr, >> uintxx_t val, int mmu_idx) */ >> -static const void * const qemu_st_helpers[4] = { >> +static void * const qemu_st_helpers[4] = { >> helper_stb_mmu, >> helper_stw_mmu, >> helper_stl_mmu, > > Why do these lose the 'const' ?
Because "const void *" has a conversion warning to non-const "tcg_type_unit *". One would have to carry the const all the way through all of the relocation routines to solve it. You had the exact same question about the ppc patch. r~
