PatchSet 7742 
Date: 2008/02/11 23:44:09
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
slimmed down floating point compare functions

2008-02-12  Dalibor Topic  <[EMAIL PROTECTED]>

* kaffe/kaffevm/soft.c (soft_fcmpg): Delegate to soft_dcmpg.
(soft_fcmpl): Delegate to soft_dcmpl.

Members: 
        ChangeLog:1.5242->1.5243 
        kaffe/kaffevm/soft.c:1.85->1.86 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.5242 kaffe/ChangeLog:1.5243
--- kaffe/ChangeLog:1.5242      Mon Feb 11 23:26:08 2008
+++ kaffe/ChangeLog     Mon Feb 11 23:44:09 2008
@@ -1,5 +1,10 @@
 2008-02-12  Dalibor Topic  <[EMAIL PROTECTED]>
 
+       * kaffe/kaffevm/soft.c (soft_fcmpg): Delegate to soft_dcmpg.
+       (soft_fcmpl): Delegate to soft_dcmpl.
+
+2008-02-12  Dalibor Topic  <[EMAIL PROTECTED]>
+
        * kaffe/kaffevm/intrp/icode.h (cmpg_float, cmpl_float): 
        Use soft_dcmpg and soft_dcmpl internally, as they 
        produce the same results, since the float parameters 
Index: kaffe/kaffe/kaffevm/soft.c
diff -u kaffe/kaffe/kaffevm/soft.c:1.85 kaffe/kaffe/kaffevm/soft.c:1.86
--- kaffe/kaffe/kaffevm/soft.c:1.85     Mon Feb 11 21:49:59 2008
+++ kaffe/kaffe/kaffevm/soft.c  Mon Feb 11 23:44:12 2008
@@ -674,26 +674,7 @@
 jint
 soft_fcmpg(jfloat v1, jfloat v2)
 {
-        jint ret;
-       jint v1bits;
-       jint v2bits;
-
-       v1bits = floatToInt(v1);
-       v2bits = floatToInt(v2);
-
-        if (FISNAN(v1bits) || FISNAN(v2bits)) {
-               ret = 1;
-       }
-        else if (v1 > v2) {
-                ret = 1;
-        }
-        else if (v1 == v2) {
-                ret = 0;
-        }
-        else {
-                ret = -1;
-        }
-       return (ret);
+  return soft_dcmpg(v1, v2);
 }
 
 /*
@@ -702,26 +683,7 @@
 jint
 soft_fcmpl(jfloat v1, jfloat v2)
 {
-        jint ret;
-       jint v1bits;
-       jint v2bits;
-
-       v1bits = floatToInt(v1);
-       v2bits = floatToInt(v2);
-
-        if (FISNAN(v1bits) || FISNAN(v2bits)) {
-               ret = -1;
-       }
-        else if (v1 > v2) {
-                ret = 1;
-        }
-        else if (v1 == v2) {
-                ret = 0;
-        }
-        else {
-                ret = -1;
-        }
-       return (ret);
+  return soft_dcmpl(v1, v2);
 }
 
 #if defined(TRANSLATOR)

_______________________________________________
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to