qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] [S390] Remove warning in tcg stub (tcg_out_relo


From: Aurelien Jarno
Subject: Re: [Qemu-devel] [PATCH] [S390] Remove warning in tcg stub (tcg_out_reloc)
Date: Fri, 21 May 2010 18:46:41 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Tue, May 11, 2010 at 06:23:32PM +0200, Alexander Graf wrote:
> On S390 we don't have a real TCG implementation but use a stub instead. This
> stub obviously doesn't call any of the TCG helper functions that are usually
> used by the other TCG targets.
> 
> If such a helper function is static though, we end up getting a warning that
> turns into an error thanks to Werror. So to successfully compile qemu, we need
> to get rid of it. In this case it's tcg_out_reloc.
> 
> To do that, I figured the easiest way is to call tcg_out_reloc with dumb
> parameters after an abort call. That way the code in question never gets
> executed, but we got rid of the warning.
> 
> Signed-off-by: Alexander Graf <address@hidden>
> ---
>  tcg/s390/tcg-target.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/tcg/s390/tcg-target.c b/tcg/s390/tcg-target.c
> index 265194a..f1a336d 100644
> --- a/tcg/s390/tcg-target.c
> +++ b/tcg/s390/tcg-target.c
> @@ -35,6 +35,12 @@ static void patch_reloc(uint8_t *code_ptr, int type,
>                  tcg_target_long value, tcg_target_long addend)
>  {
>      tcg_abort();
> +
> +    /*
> +     * XXX We need to call this function at least once, since it's static.
> +     *     Please remove that code when implementing real s390x tcg support.
> +     */
> +    tcg_out_reloc(NULL, NULL, 0, 0, 0);
>  }
>  

What about declaring tcg_out_reloc static inline?

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
address@hidden                 http://www.aurel32.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]