From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LBotJ-0006ok-FP for qemu-devel@nongnu.org; Sun, 14 Dec 2008 06:12:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBotI-0006oF-79 for qemu-devel@nongnu.org; Sun, 14 Dec 2008 06:12:04 -0500 Received: from [199.232.76.173] (port=49416 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBotH-0006nx-O4 for qemu-devel@nongnu.org; Sun, 14 Dec 2008 06:12:03 -0500 Received: from savannah.gnu.org ([199.232.41.3]:60028 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LBotH-0003MD-J0 for qemu-devel@nongnu.org; Sun, 14 Dec 2008 06:12:03 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LBotH-0002nh-0O for qemu-devel@nongnu.org; Sun, 14 Dec 2008 11:12:03 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LBotG-0002nZ-NK for qemu-devel@nongnu.org; Sun, 14 Dec 2008 11:12:02 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Sun, 14 Dec 2008 11:12:02 +0000 Subject: [Qemu-devel] [6025] Use float_relation_* constants 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 Revision: 6025 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6025 Author: aurel32 Date: 2008-12-14 11:12:02 +0000 (Sun, 14 Dec 2008) Log Message: ----------- Use float_relation_* constants Use float_relation_* constants rather than magic numbers in softfloat-native comparison routines. Signed-off-by: Nathan Froyd Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/fpu/softfloat-native.c Modified: trunk/fpu/softfloat-native.c =================================================================== --- trunk/fpu/softfloat-native.c 2008-12-14 10:32:11 UTC (rev 6024) +++ trunk/fpu/softfloat-native.c 2008-12-14 11:12:02 UTC (rev 6025) @@ -220,25 +220,25 @@ 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 @@ 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 @@ 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)