From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjtfJ-0001X3-Cm for qemu-devel@nongnu.org; Mon, 12 May 2014 13:05:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjtfD-0007CM-EQ for qemu-devel@nongnu.org; Mon, 12 May 2014 13:05:25 -0400 Received: from mail-qa0-x22a.google.com ([2607:f8b0:400d:c00::22a]:57435) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjtfD-00079g-0n for qemu-devel@nongnu.org; Mon, 12 May 2014 13:05:19 -0400 Received: by mail-qa0-f42.google.com with SMTP id j5so7473763qaq.29 for ; Mon, 12 May 2014 10:05:18 -0700 (PDT) Sender: Richard Henderson Message-ID: <5370FF49.5030800@twiddle.net> Date: Mon, 12 May 2014 10:05:13 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1398713302-29657-1-git-send-email-rth@twiddle.net> <1398713302-29657-13-git-send-email-rth@twiddle.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 12/16] tcg-s390: Define TCG_TARGET_INSN_UNIT_SIZE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers On 05/09/2014 06:35 AM, Peter Maydell wrote: > On 28 April 2014 20:28, Richard Henderson wrote: >> And use tcg pointer differencing functions as appropriate. >> >> Signed-off-by: Richard Henderson >> --- >> 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~