[kaffe] CVS kaffe (robilad): removed FISNAN

Kaffe CVS cvs-commits at kaffe.org
Thu Feb 14 12:45:47 PST 2008


PatchSet 7743 
Date: 2008/02/14 20:43:20
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
removed FISNAN

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),
        kaffe/kaffevm/fp.c (floatDivide, floatMultiply, floatSubtract)
        (floatAdd): Use isnan instead of FISNAN.

Members: 
	ChangeLog:1.5243->1.5244 
	kaffe/kaffevm/fp.c:1.6->1.7 
	kaffe/kaffevm/fp.h:1.4->1.5 
	kaffe/kaffevm/soft.c:1.86->1.87 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.5243 kaffe/ChangeLog:1.5244
--- kaffe/ChangeLog:1.5243	Mon Feb 11 23:44:09 2008
+++ kaffe/ChangeLog	Thu Feb 14 20:43:20 2008
@@ -1,3 +1,11 @@
+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), 
+	kaffe/kaffevm/fp.c (floatDivide, floatMultiply, floatSubtract)
+	(floatAdd): Use isnan instead of FISNAN.
+	
 2008-02-12  Dalibor Topic  <robilad at kaffe.org>
 
 	* kaffe/kaffevm/soft.c (soft_fcmpg): Delegate to soft_dcmpg.
Index: kaffe/kaffe/kaffevm/fp.c
diff -u kaffe/kaffe/kaffevm/fp.c:1.6 kaffe/kaffe/kaffevm/fp.c:1.7
--- kaffe/kaffe/kaffevm/fp.c:1.6	Sun Apr 18 13:57:26 2004
+++ kaffe/kaffe/kaffevm/fp.c	Thu Feb 14 20:43:24 2008
@@ -122,12 +122,7 @@
 jfloat
 floatAdd(jfloat v1, jfloat v2)
 {
-	jint v1bits, v2bits;
-
-	v1bits = floatToInt(v1);
-	v2bits = floatToInt(v2);
-
-	if (FISNAN(v1bits) || FISNAN(v2bits)) {
+	if (isnan(v1) || isnan(v2)) {
 		return intToFloat(FNANBITS);
 	}
 	return (v1 + v2);
@@ -156,12 +151,7 @@
 jfloat
 floatSubtract(jfloat v1, jfloat v2)
 {
-	jint v1bits, v2bits;
-
-	v1bits = floatToInt(v1);
-	v2bits = floatToInt(v2);
-
-	if (FISNAN(v1bits) || FISNAN(v2bits)) {
+	if (isnan(v1) || isnan(v2)) {
 		return intToFloat(FNANBITS);
 	}
 	return (v1 - v2);
@@ -190,12 +180,7 @@
 jfloat
 floatMultiply(jfloat v1, jfloat v2)
 {
-	jint v1bits, v2bits;
-
-	v1bits = floatToInt(v1);
-	v2bits = floatToInt(v2);
-
-	if (FISNAN(v1bits) || FISNAN(v2bits)) {
+	if (isnan(v1) || isnan(v2)) {
 		return intToFloat(FNANBITS);
 	}
 	return (v1 * v2);
@@ -235,7 +220,7 @@
 	v1bits = floatToInt(v1);
 	v2bits = floatToInt(v2);
 
-	if (FISNAN(v1bits) || FISNAN(v2bits)) {
+	if (isnan(v1) || isnan(v2)) {
 		return intToFloat(FNANBITS);
 	}
 	if (v2 != 0.0) {
Index: kaffe/kaffe/kaffevm/fp.h
diff -u kaffe/kaffe/kaffevm/fp.h:1.4 kaffe/kaffe/kaffevm/fp.h:1.5
--- kaffe/kaffe/kaffevm/fp.h:1.4	Sat Oct  9 22:56:21 1999
+++ kaffe/kaffe/kaffevm/fp.h	Thu Feb 14 20:43:24 2008
@@ -31,7 +31,6 @@
 #define FNANBITS	0x7fc00000
 
 #define DISNAN(b)	(((b) & DEXPMASK) == DEXPMASK && ((b) & DMANMASK) != 0)
-#define FISNAN(b)	(((b) & FEXPMASK) == FEXPMASK && ((b) & FMANMASK) != 0)
 
 extern jfloat	floatAdd(jfloat v1, jfloat v2);
 extern jdouble	doubleAdd(jdouble v1, jdouble v2);
Index: kaffe/kaffe/kaffevm/soft.c
diff -u kaffe/kaffe/kaffevm/soft.c:1.86 kaffe/kaffe/kaffevm/soft.c:1.87
--- kaffe/kaffe/kaffevm/soft.c:1.86	Mon Feb 11 23:44:12 2008
+++ kaffe/kaffe/kaffevm/soft.c	Thu Feb 14 20:43:24 2008
@@ -848,10 +848,7 @@
 jdouble
 soft_cvtfd(jfloat v)
 {
-	jint vbits;
-
-	vbits = floatToInt(v);
-        if (FISNAN(vbits)) {
+        if (isnan(v)) {
 		return (longToDouble(DNANBITS));
 	}
 	else {
@@ -881,10 +878,7 @@
 jlong
 soft_cvtfl(jfloat v)
 {
-	jint vbits;
-
-	vbits = floatToInt(v);
-        if (FISNAN(vbits)) {
+	if(isnan(v)) {
 		return ((jlong)0);
 	}
 
@@ -939,10 +933,7 @@
 jint
 soft_cvtfi(jfloat v)
 {
-    jint vbits;
-
-	vbits = floatToInt(v);
-        if (FISNAN(vbits)) {
+        if (isnan(v)) {
 		return (0);
 	}
 




More information about the kaffe mailing list