aboutsummaryrefslogtreecommitdiff
path: root/fpu/softfloat-native.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-03-20 10:33:58 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-03-20 10:33:58 +0000
commitb109f9f867a793b66217d43ede10c7a47242e270 (patch)
tree2be86c98b5a024f47cb3963e7951feda4be1e161 /fpu/softfloat-native.c
parent1d6bda356153c82e100680d9f2165e32c8fb1330 (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.c')
-rw-r--r--fpu/softfloat-native.c86
1 files changed, 86 insertions, 0 deletions
diff --git a/fpu/softfloat-native.c b/fpu/softfloat-native.c
index 8259a7c27c..89c0842af5 100644
--- a/fpu/softfloat-native.c
+++ b/fpu/softfloat-native.c
@@ -120,10 +120,39 @@ float32 float32_round_to_int( float32 a STATUS_PARAM)
return rintf(a);
}
+float32 float32_rem( float32 a, float32 b STATUS_PARAM)
+{
+ return remainderf(a, b);
+}
+
float32 float32_sqrt( float32 a STATUS_PARAM)
{
return sqrtf(a);
}
+char float32_compare( float32 a, float32 b STATUS_PARAM )
+{
+ if (a < b) {
+ return -1;
+ } else if (a == b) {
+ return 0;
+ } else if (a > b) {
+ return 1;
+ } else {
+ return 2;
+ }
+}
+char float32_compare_quiet( float32 a, float32 b STATUS_PARAM )
+{
+ if (isless(a, b)) {
+ return -1;
+ } else if (a == b) {
+ return 0;
+ } else if (isgreater(a, b)) {
+ return 1;
+ } else {
+ return 2;
+ }
+}
char float32_is_signaling_nan( float32 a1)
{
float32u u;
@@ -195,10 +224,39 @@ float64 float64_round_to_int( float64 a STATUS_PARAM )
#endif
}
+float64 float64_rem( float64 a, float64 b STATUS_PARAM)
+{
+ return remainder(a, b);
+}
+
float64 float64_sqrt( float64 a STATUS_PARAM)
{
return sqrt(a);
}
+char float64_compare( float64 a, float64 b STATUS_PARAM )
+{
+ if (a < b) {
+ return -1;
+ } else if (a == b) {
+ return 0;
+ } else if (a > b) {
+ return 1;
+ } else {
+ return 2;
+ }
+}
+char float64_compare_quiet( float64 a, float64 b STATUS_PARAM )
+{
+ if (isless(a, b)) {
+ return -1;
+ } else if (a == b) {
+ return 0;
+ } else if (isgreater(a, b)) {
+ return 1;
+ } else {
+ return 2;
+ }
+}
char float64_is_signaling_nan( float64 a1)
{
float64u u;
@@ -248,10 +306,38 @@ floatx80 floatx80_round_to_int( floatx80 a STATUS_PARAM)
{
return rintl(a);
}
+floatx80 floatx80_rem( floatx80 a, floatx80 b STATUS_PARAM)
+{
+ return remainderl(a, b);
+}
floatx80 floatx80_sqrt( floatx80 a STATUS_PARAM)
{
return sqrtl(a);
}
+char floatx80_compare( floatx80 a, floatx80 b STATUS_PARAM )
+{
+ if (a < b) {
+ return -1;
+ } else if (a == b) {
+ return 0;
+ } else if (a > b) {
+ return 1;
+ } else {
+ return 2;
+ }
+}
+char floatx80_compare_quiet( floatx80 a, floatx80 b STATUS_PARAM )
+{
+ if (isless(a, b)) {
+ return -1;
+ } else if (a == b) {
+ return 0;
+ } else if (isgreater(a, b)) {
+ return 1;
+ } else {
+ return 2;
+ }
+}
char floatx80_is_signaling_nan( floatx80 a1)
{
floatx80u u;