aboutsummaryrefslogtreecommitdiff
path: root/fpu
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-14 11:12:02 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-14 11:12:02 +0000
commit30e7a22eba59bcf92c761400c93d35b902878b46 (patch)
tree32c3c375ada0b5c1afce4aee8b00bd499557bdec /fpu
parentIgnore .pc and patches used by quilt (diff)
downloadqemu-kvm-30e7a22eba59bcf92c761400c93d35b902878b46.tar.gz
qemu-kvm-30e7a22eba59bcf92c761400c93d35b902878b46.tar.bz2
qemu-kvm-30e7a22eba59bcf92c761400c93d35b902878b46.zip
Use float_relation_* constants
Use float_relation_* constants rather than magic numbers in softfloat-native comparison routines. Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6025 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'fpu')
-rw-r--r--fpu/softfloat-native.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/fpu/softfloat-native.c b/fpu/softfloat-native.c
index 0b24bab32..cd88113f9 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)