[kaffe] CVS kaffe (robilad): removed DISNAN

Kaffe CVS cvs-commits at kaffe.org
Thu Feb 14 14:26:24 PST 2008


PatchSet 7744 
Date: 2008/02/14 22:24:40
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
removed DISNAN

2008-02-14  Dalibor Topic  <robilad at kaffe.org>

        * kaffe/kaffevm/fp.h (DISNAN): Removed.

        * kaffe/kaffevm/soft.c (soft_cvtdf, soft_cvtdl, soft_cvtdi),
        kaffe/kaffevm/fp.c (doubleAdd, doubleSubtract, doubleMultiply)
        (doubleDivide):

Members: 
	ChangeLog:1.5244->1.5245 
	kaffe/kaffevm/fp.c:1.7->1.8 
	kaffe/kaffevm/fp.h:1.5->1.6 
	kaffe/kaffevm/soft.c:1.87->1.88 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.5244 kaffe/ChangeLog:1.5245
--- kaffe/ChangeLog:1.5244	Thu Feb 14 20:43:20 2008
+++ kaffe/ChangeLog	Thu Feb 14 22:24:40 2008
@@ -1,5 +1,13 @@
 2008-02-14  Dalibor Topic  <robilad at kaffe.org>
 
+	* kaffe/kaffevm/fp.h (DISNAN): Removed.
+
+	* kaffe/kaffevm/soft.c (soft_cvtdf, soft_cvtdl, soft_cvtdi),
+	kaffe/kaffevm/fp.c (doubleAdd, doubleSubtract, doubleMultiply)
+	(doubleDivide): 
+
+2008-02-14  Dalibor Topic  <robilad at kaffe.org>
+
 	* kaffe/kaffevm/fp.h (FISNAN): Removed.
 
 	* kaffe/kaffevm/soft.c (soft_cvtfl, soft_cvtfd, soft_cvtfi), 
Index: kaffe/kaffe/kaffevm/fp.c
diff -u kaffe/kaffe/kaffevm/fp.c:1.7 kaffe/kaffe/kaffevm/fp.c:1.8
--- kaffe/kaffe/kaffevm/fp.c:1.7	Thu Feb 14 20:43:24 2008
+++ kaffe/kaffe/kaffevm/fp.c	Thu Feb 14 22:24:41 2008
@@ -105,12 +105,7 @@
 jdouble
 doubleAdd(jdouble v1, jdouble v2)
 {
-	jlong v1bits, v2bits;
-
-	v1bits = doubleToLong(v1);
-	v2bits = doubleToLong(v2);
-
-	if (DISNAN(v1bits) || DISNAN(v2bits)) {
+	if (isnan(v1) || isnan(v2)) {
 		return longToDouble(DNANBITS);
 	}
 	return (v1 + v2);
@@ -134,12 +129,7 @@
 jdouble
 doubleSubtract(jdouble v1, jdouble v2)
 {
-	jlong v1bits, v2bits;
-
-	v1bits = doubleToLong(v1);
-	v2bits = doubleToLong(v2);
-
-	if (DISNAN(v1bits) || DISNAN(v2bits)) {
+	if (isnan(v1) || isnan(v2)) {
 		return longToDouble(DNANBITS);
 	}
 	return (v1 - v2);
@@ -163,12 +153,7 @@
 jdouble
 doubleMultiply(jdouble v1, jdouble v2)
 {
-	jlong v1bits, v2bits;
-
-	v1bits = doubleToLong(v1);
-	v2bits = doubleToLong(v2);
-
-	if (DISNAN(v1bits) || DISNAN(v2bits)) {
+	if (isnan(v1) || isnan(v2)) {
 		return longToDouble(DNANBITS);
 	}
 	return (v1 * v2);
@@ -197,7 +182,7 @@
 	v1bits = doubleToLong(v1);
 	v2bits = doubleToLong(v2);
 
-	if (DISNAN(v1bits) || DISNAN(v2bits)) {
+	if (isnan(v1) || isnan(v2)) {
 		return longToDouble(DNANBITS);
 	}
 	if (v2 != 0.0) {
Index: kaffe/kaffe/kaffevm/fp.h
diff -u kaffe/kaffe/kaffevm/fp.h:1.5 kaffe/kaffe/kaffevm/fp.h:1.6
--- kaffe/kaffe/kaffevm/fp.h:1.5	Thu Feb 14 20:43:24 2008
+++ kaffe/kaffe/kaffevm/fp.h	Thu Feb 14 22:24:41 2008
@@ -30,8 +30,6 @@
 #define FINFBITS	0x7f800000
 #define FNANBITS	0x7fc00000
 
-#define DISNAN(b)	(((b) & DEXPMASK) == DEXPMASK && ((b) & DMANMASK) != 0)
-
 extern jfloat	floatAdd(jfloat v1, jfloat v2);
 extern jdouble	doubleAdd(jdouble v1, jdouble v2);
 extern jfloat	floatSubtract(jfloat v1, jfloat v2);
Index: kaffe/kaffe/kaffevm/soft.c
diff -u kaffe/kaffe/kaffevm/soft.c:1.87 kaffe/kaffe/kaffevm/soft.c:1.88
--- kaffe/kaffe/kaffevm/soft.c:1.87	Thu Feb 14 20:43:24 2008
+++ kaffe/kaffe/kaffevm/soft.c	Thu Feb 14 22:24:41 2008
@@ -859,10 +859,7 @@
 jfloat
 soft_cvtdf(jdouble v)
 {
-	jlong vbits;
-
-	vbits = doubleToLong(v);
-        if (DISNAN(vbits)) {
+        if (isnan(v)) {
 		return (intToFloat(FNANBITS));
 	}
 	else {
@@ -904,10 +901,7 @@
 jlong
 soft_cvtdl(jdouble v)
 {
-	jlong vbits;
-
-	vbits = doubleToLong(v);
-        if (DISNAN(vbits)) {
+        if (isnan(v)) {
 		return ((jlong)0);
 	}
 
@@ -960,10 +954,7 @@
 jint
 soft_cvtdi(jdouble v)
 {
-        jlong vbits;
-
-	vbits = doubleToLong(v);
-        if (DISNAN(vbits)) {
+        if (isnan(v)) {
 		return (0);
 	}
 




More information about the kaffe mailing list