From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LBotT-0006tP-R7 for qemu-devel@nongnu.org; Sun, 14 Dec 2008 06:12:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBotT-0006sh-3A for qemu-devel@nongnu.org; Sun, 14 Dec 2008 06:12:15 -0500 Received: from [199.232.76.173] (port=49430 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBotS-0006sY-9t for qemu-devel@nongnu.org; Sun, 14 Dec 2008 06:12:14 -0500 Received: from hall.aurel32.net ([88.191.82.174]:45116) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LBotR-0003O4-PU for qemu-devel@nongnu.org; Sun, 14 Dec 2008 06:12:14 -0500 Received: from volta.aurel32.net ([2002:52e8:2fb:1:21e:8cff:feb0:693b]) by hall.aurel32.net with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1LBotQ-0002CA-Bl for qemu-devel@nongnu.org; Sun, 14 Dec 2008 12:12:12 +0100 Received: from aurel32 by volta.aurel32.net with local (Exim 4.69) (envelope-from ) id 1LBotP-0005IU-BR for qemu-devel@nongnu.org; Sun, 14 Dec 2008 12:12:11 +0100 Date: Sun, 14 Dec 2008 12:12:11 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] Use float_relation_* constants Message-ID: <20081214111211.GI17729@volta.aurel32.net> References: <20081214013126.GC23471@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20081214013126.GC23471@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Sat, Dec 13, 2008 at 05:31:26PM -0800, Nathan Froyd wrote: > (Apologies if this patch comes through multiple times; I've tried twice > already and haven't seen it come through on my end or in the list > archives.) > > Use float_relation_* constants rather than magic numbers in > softfloat-native comparison routines. > > Signed-off-by: Nathan Froyd Thanks, applied. > --- > fpu/softfloat-native.c | 48 ++++++++++++++++++++++++------------------------ > 1 files changed, 24 insertions(+), 24 deletions(-) > > diff --git a/fpu/softfloat-native.c b/fpu/softfloat-native.c > index 0b24bab..cd88113 100644 > --- a/fpu/softfloat-native.c > +++ b/fpu/softfloat-native.c > @@ -220,25 +220,25 @@ float32 float32_sqrt( float32 a STATUS_PARAM) > int float32_compare( float32 a, float32 b STATUS_PARAM ) > { > if (a < b) { > - return -1; > + return float_relation_less; > } else if (a == b) { > - return 0; > + return float_relation_equal; > } else if (a > b) { > - return 1; > + return float_relation_greater; > } else { > - return 2; > + return float_relation_unordered; > } > } > int float32_compare_quiet( float32 a, float32 b STATUS_PARAM ) > { > if (isless(a, b)) { > - return -1; > + return float_relation_less; > } else if (a == b) { > - return 0; > + return float_relation_equal; > } else if (isgreater(a, b)) { > - return 1; > + return float_relation_greater; > } else { > - return 2; > + return float_relation_unordered; > } > } > int float32_is_signaling_nan( float32 a1) > @@ -391,25 +391,25 @@ float64 float64_sqrt( float64 a STATUS_PARAM) > int float64_compare( float64 a, float64 b STATUS_PARAM ) > { > if (a < b) { > - return -1; > + return float_relation_less; > } else if (a == b) { > - return 0; > + return float_relation_equal; > } else if (a > b) { > - return 1; > + return float_relation_greater; > } else { > - return 2; > + return float_relation_unordered; > } > } > int float64_compare_quiet( float64 a, float64 b STATUS_PARAM ) > { > if (isless(a, b)) { > - return -1; > + return float_relation_less; > } else if (a == b) { > - return 0; > + return float_relation_equal; > } else if (isgreater(a, b)) { > - return 1; > + return float_relation_greater; > } else { > - return 2; > + return float_relation_unordered; > } > } > int float64_is_signaling_nan( float64 a1) > @@ -483,25 +483,25 @@ floatx80 floatx80_sqrt( floatx80 a STATUS_PARAM) > int floatx80_compare( floatx80 a, floatx80 b STATUS_PARAM ) > { > if (a < b) { > - return -1; > + return float_relation_less; > } else if (a == b) { > - return 0; > + return float_relation_equal; > } else if (a > b) { > - return 1; > + return float_relation_greater; > } else { > - return 2; > + return float_relation_unordered; > } > } > int floatx80_compare_quiet( floatx80 a, floatx80 b STATUS_PARAM ) > { > if (isless(a, b)) { > - return -1; > + return float_relation_less; > } else if (a == b) { > - return 0; > + return float_relation_equal; > } else if (isgreater(a, b)) { > - return 1; > + return float_relation_greater; > } else { > - return 2; > + return float_relation_unordered; > } > } > int floatx80_is_signaling_nan( floatx80 a1) > -- > 1.6.0.5 > > > > -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net