diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-03-20 10:33:58 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-03-20 10:33:58 +0000 |
commit | b109f9f867a793b66217d43ede10c7a47242e270 (patch) | |
tree | 2be86c98b5a024f47cb3963e7951feda4be1e161 /fpu/softfloat-native.h | |
parent | 1d6bda356153c82e100680d9f2165e32c8fb1330 (diff) |
more native FPU comparison functions - native FPU remainder
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1339 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'fpu/softfloat-native.h')
-rw-r--r-- | fpu/softfloat-native.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/fpu/softfloat-native.h b/fpu/softfloat-native.h index 709df51bcf..9017ea582f 100644 --- a/fpu/softfloat-native.h +++ b/fpu/softfloat-native.h @@ -127,7 +127,6 @@ float32 float32_rem( float32, float32 STATUS_PARAM); float32 float32_sqrt( float32 STATUS_PARAM); INLINE char float32_eq( float32 a, float32 b STATUS_PARAM) { - /* XXX: incorrect because it can raise an exception */ return a == b; } INLINE char float32_le( float32 a, float32 b STATUS_PARAM) @@ -140,7 +139,7 @@ INLINE char float32_lt( float32 a, float32 b STATUS_PARAM) } INLINE char float32_eq_signaling( float32 a, float32 b STATUS_PARAM) { - return a == b; + return a <= b && a >= b; } INLINE char float32_le_quiet( float32 a, float32 b STATUS_PARAM) { @@ -150,6 +149,13 @@ INLINE char float32_lt_quiet( float32 a, float32 b STATUS_PARAM) { return isless(a, b); } +INLINE char float32_unordered( float32 a, float32 b STATUS_PARAM) +{ + return isunordered(a, b); + +} +char float32_compare( float32, float32 STATUS_PARAM ); +char float32_compare_quiet( float32, float32 STATUS_PARAM ); char float32_is_signaling_nan( float32 ); INLINE float32 float32_abs(float32 a) @@ -213,7 +219,7 @@ INLINE char float64_lt( float64 a, float64 b STATUS_PARAM) } INLINE char float64_eq_signaling( float64 a, float64 b STATUS_PARAM) { - return a == b; + return a <= b && a >= b; } INLINE char float64_le_quiet( float64 a, float64 b STATUS_PARAM) { @@ -224,6 +230,13 @@ INLINE char float64_lt_quiet( float64 a, float64 b STATUS_PARAM) return isless(a, b); } +INLINE char float64_unordered( float64 a, float64 b STATUS_PARAM) +{ + return isunordered(a, b); + +} +char float64_compare( float64, float64 STATUS_PARAM ); +char float64_compare_quiet( float64, float64 STATUS_PARAM ); char float64_is_signaling_nan( float64 ); INLINE float64 float64_abs(float64 a) @@ -287,7 +300,7 @@ INLINE char floatx80_lt( floatx80 a, floatx80 b STATUS_PARAM) } INLINE char floatx80_eq_signaling( floatx80 a, floatx80 b STATUS_PARAM) { - return a == b; + return a <= b && a >= b; } INLINE char floatx80_le_quiet( floatx80 a, floatx80 b STATUS_PARAM) { @@ -298,6 +311,13 @@ INLINE char floatx80_lt_quiet( floatx80 a, floatx80 b STATUS_PARAM) return isless(a, b); } +INLINE char floatx80_unordered( floatx80 a, floatx80 b STATUS_PARAM) +{ + return isunordered(a, b); + +} +char floatx80_compare( floatx80, floatx80 STATUS_PARAM ); +char floatx80_compare_quiet( floatx80, floatx80 STATUS_PARAM ); char floatx80_is_signaling_nan( floatx80 ); INLINE floatx80 floatx80_abs(floatx80 a) |