[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [6025] Use float_relation_* constants
From: |
Aurelien Jarno |
Subject: |
[Qemu-devel] [6025] Use float_relation_* constants |
Date: |
Sun, 14 Dec 2008 11:12:02 +0000 |
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 <address@hidden>
Signed-off-by: Aurelien Jarno <address@hidden>
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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [6025] Use float_relation_* constants,
Aurelien Jarno <=