From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NYI8Z-0005Ar-Jg for qemu-devel@nongnu.org; Fri, 22 Jan 2010 06:57:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NYI8V-0005AD-6z for qemu-devel@nongnu.org; Fri, 22 Jan 2010 06:57:15 -0500 Received: from [199.232.76.173] (port=41223 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NYI8V-0005AA-3S for qemu-devel@nongnu.org; Fri, 22 Jan 2010 06:57:11 -0500 Received: from mail-pz0-f190.google.com ([209.85.222.190]:41706) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NYI8U-0004XB-Gm for qemu-devel@nongnu.org; Fri, 22 Jan 2010 06:57:10 -0500 Received: by pzk28 with SMTP id 28so27347pzk.4 for ; Fri, 22 Jan 2010 03:57:08 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1264013005-16965-1-git-send-email-weil@mail.berlios.de> References: <1264013005-16965-1-git-send-email-weil@mail.berlios.de> Date: Fri, 22 Jan 2010 11:57:08 +0000 Message-ID: <761ea48b1001220357l21563d22r899a7641096bb089@mail.gmail.com> Subject: Re: [Qemu-devel] [PATCH 01/14] arm host: Fix compiler warning From: Laurent Desnogues Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: QEMU Developers On Wed, Jan 20, 2010 at 6:43 PM, Stefan Weil wrote: > Compilation for arm (native or cross) results in this > warning: > > fpu/softfloat-native.c: In function =91float64_round_to_int=92: > fpu/softfloat-native.c:387: error: control reaches end of non-void functi= on > > 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 Acked-by: Laurent Desnogues Laurent > --- > =A0fpu/softfloat-native.c | =A0 20 -------------------- > =A0fpu/softfloat-native.h | =A0 =A07 ------- > =A02 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) > =A0#if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__)= ) || \ > =A0 =A0 (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10) > =A0 =A0 fpsetround(val); > -#elif defined(__arm__) > - =A0 =A0/* nothing to do */ > =A0#else > =A0 =A0 fesetround(val); > =A0#endif > @@ -365,25 +363,7 @@ float64 float64_trunc_to_int( float64 a STATUS_PARAM= ) > > =A0float64 float64_round_to_int( float64 a STATUS_PARAM ) > =A0{ > -#if defined(__arm__) > - =A0 =A0switch(STATUS(float_rounding_mode)) { > - =A0 =A0default: > - =A0 =A0case float_round_nearest_even: > - =A0 =A0 =A0 =A0asm("rndd %0, %1" : "=3Df" (a) : "f"(a)); > - =A0 =A0 =A0 =A0break; > - =A0 =A0case float_round_down: > - =A0 =A0 =A0 =A0asm("rnddm %0, %1" : "=3Df" (a) : "f"(a)); > - =A0 =A0 =A0 =A0break; > - =A0 =A0case float_round_up: > - =A0 =A0 =A0 =A0asm("rnddp %0, %1" : "=3Df" (a) : "f"(a)); > - =A0 =A0 =A0 =A0break; > - =A0 =A0case float_round_to_zero: > - =A0 =A0 =A0 =A0asm("rnddz %0, %1" : "=3Df" (a) : "f"(a)); > - =A0 =A0 =A0 =A0break; > - =A0 =A0} > -#else > =A0 =A0 return rint(a); > -#endif > =A0} > > =A0float64 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 { > =A0 =A0 float_round_up =A0 =A0 =A0 =A0 =A0 =3D FP_RP, > =A0 =A0 float_round_to_zero =A0 =A0 =A0=3D FP_RZ > =A0}; > -#elif defined(__arm__) > -enum { > - =A0 =A0float_round_nearest_even =3D 0, > - =A0 =A0float_round_down =A0 =A0 =A0 =A0 =3D 1, > - =A0 =A0float_round_up =A0 =A0 =A0 =A0 =A0 =3D 2, > - =A0 =A0float_round_to_zero =A0 =A0 =A0=3D 3 > -}; > =A0#else > =A0enum { > =A0 =A0 float_round_nearest_even =3D FE_TONEAREST, > -- > 1.6.5 > > > >