From patchwork Wed Jan 20 18:43:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 43340 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8BAF5B7CB9 for ; Thu, 21 Jan 2010 06:17:50 +1100 (EST) Received: from localhost ([127.0.0.1]:56215 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXfw6-00058Z-Ec for incoming@patchwork.ozlabs.org; Wed, 20 Jan 2010 14:09:50 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXfWs-0005SI-8R for qemu-devel@nongnu.org; Wed, 20 Jan 2010 13:43:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXfWn-0005Kg-62 for qemu-devel@nongnu.org; Wed, 20 Jan 2010 13:43:45 -0500 Received: from [199.232.76.173] (port=44267 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXfWm-0005KM-Up for qemu-devel@nongnu.org; Wed, 20 Jan 2010 13:43:41 -0500 Received: from moutng.kundenserver.de ([212.227.17.9]:58057) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NXfWi-0001kc-LS for qemu-devel@nongnu.org; Wed, 20 Jan 2010 13:43:40 -0500 Received: from flocke.weilnetz.de (p54ADF4FC.dip.t-dialin.net [84.173.244.252]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MYcDK-1NJtsL1Iby-00UpoL; Wed, 20 Jan 2010 19:43:27 +0100 Received: from stefan by flocke.weilnetz.de with local (Exim 4.71) (envelope-from ) id 1NXfWY-0004SD-GF; Wed, 20 Jan 2010 19:43:26 +0100 From: Stefan Weil To: QEMU Developers Date: Wed, 20 Jan 2010 19:43:25 +0100 Message-Id: <1264013005-16965-1-git-send-email-weil@mail.berlios.de> X-Mailer: git-send-email 1.6.5 MIME-Version: 1.0 X-Provags-ID: V01U2FsdGVkX1/4zGdE36YpFHNsl5zMU1uENekBHVXCdD11z4g MYz82fW+8jOTGZeXVdkV4f+F9g9ayXjOhSi6Rjdsi0yTQhWPt1 LQB3rzmXofq5DjiE2Kg13AZmRPntbrP5qavUpGc0GWQwpkhY28 pug== X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH 01/14] arm host: Fix compiler warning X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Acked-by: Laurent Desnogues --- 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,