qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Desnogues <laurent.desnogues@gmail.com>
To: Stefan Weil <weil@mail.berlios.de>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 01/14] arm host: Fix compiler warning
Date: Fri, 22 Jan 2010 11:57:08 +0000	[thread overview]
Message-ID: <761ea48b1001220357l21563d22r899a7641096bb089@mail.gmail.com> (raw)
In-Reply-To: <1264013005-16965-1-git-send-email-weil@mail.berlios.de>

On Wed, Jan 20, 2010 at 6:43 PM, Stefan Weil <weil@mail.berlios.de> wrote:
> Compilation for arm (native or cross) results in this
> warning:
>
> fpu/softfloat-native.c: In function ‘float64_round_to_int’:
> fpu/softfloat-native.c:387: error: control reaches end of non-void function
>
> float64_round_to_int uses special assembler code for arm
> and has no explicit return value.
>
> As there is no obvious reason why arm should need special
> code, all fpu related conditionals were removed.
> The remaining code is standard (C99) and compiles for arm,
> too.
>
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Acked-by: Laurent Desnogues <laurent.desnogues@gmail.com>


Laurent

> ---
>  fpu/softfloat-native.c |   20 --------------------
>  fpu/softfloat-native.h |    7 -------
>  2 files changed, 0 insertions(+), 27 deletions(-)
>
> diff --git a/fpu/softfloat-native.c b/fpu/softfloat-native.c
> index 8d64f4e..049c830 100644
> --- a/fpu/softfloat-native.c
> +++ b/fpu/softfloat-native.c
> @@ -12,8 +12,6 @@ void set_float_rounding_mode(int val STATUS_PARAM)
>  #if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__)) || \
>     (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10)
>     fpsetround(val);
> -#elif defined(__arm__)
> -    /* nothing to do */
>  #else
>     fesetround(val);
>  #endif
> @@ -365,25 +363,7 @@ float64 float64_trunc_to_int( float64 a STATUS_PARAM )
>
>  float64 float64_round_to_int( float64 a STATUS_PARAM )
>  {
> -#if defined(__arm__)
> -    switch(STATUS(float_rounding_mode)) {
> -    default:
> -    case float_round_nearest_even:
> -        asm("rndd %0, %1" : "=f" (a) : "f"(a));
> -        break;
> -    case float_round_down:
> -        asm("rnddm %0, %1" : "=f" (a) : "f"(a));
> -        break;
> -    case float_round_up:
> -        asm("rnddp %0, %1" : "=f" (a) : "f"(a));
> -        break;
> -    case float_round_to_zero:
> -        asm("rnddz %0, %1" : "=f" (a) : "f"(a));
> -        break;
> -    }
> -#else
>     return rint(a);
> -#endif
>  }
>
>  float64 float64_rem( float64 a, float64 b STATUS_PARAM)
> diff --git a/fpu/softfloat-native.h b/fpu/softfloat-native.h
> index fe737b3..6da0bcb 100644
> --- a/fpu/softfloat-native.h
> +++ b/fpu/softfloat-native.h
> @@ -126,13 +126,6 @@ enum {
>     float_round_up           = FP_RP,
>     float_round_to_zero      = FP_RZ
>  };
> -#elif defined(__arm__)
> -enum {
> -    float_round_nearest_even = 0,
> -    float_round_down         = 1,
> -    float_round_up           = 2,
> -    float_round_to_zero      = 3
> -};
>  #else
>  enum {
>     float_round_nearest_even = FE_TONEAREST,
> --
> 1.6.5
>
>
>
>

  parent reply	other threads:[~2010-01-22 11:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-20 18:43 [Qemu-devel] [PATCH 01/14] arm host: Fix compiler warning Stefan Weil
2010-01-20 22:11 ` [Qemu-devel] " Stefan Weil
2010-01-22 11:57 ` Laurent Desnogues [this message]
2010-02-06 22:18 ` [Qemu-devel] " Aurelien Jarno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=761ea48b1001220357l21563d22r899a7641096bb089@mail.gmail.com \
    --to=laurent.desnogues@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=weil@mail.berlios.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).