Index: softfloat/arch/ia32/include/functions.h
===================================================================
--- softfloat/arch/ia32/include/functions.h	(revision 2cb202e9762a4374a22027a279236d2c5ed8dd2b)
+++ softfloat/arch/ia32/include/functions.h	(revision a82695c70c257f11a27db6b14c69085dbbd9f7fe)
@@ -42,3 +42,7 @@
 #define float32_to_ulonglong(X) float32_to_uint64(X);
 
+#define float64_to_uint(X) float64_to_uint32(X);
+#define float64_to_ulong(X) float64_to_uint32(X);
+#define float64_to_ulonglong(X) float64_to_uint64(X);
+
 #endif
Index: softfloat/arch/ia32/include/types.h
===================================================================
--- softfloat/arch/ia32/include/types.h	(revision 2cb202e9762a4374a22027a279236d2c5ed8dd2b)
+++ softfloat/arch/ia32/include/types.h	(revision a82695c70c257f11a27db6b14c69085dbbd9f7fe)
@@ -49,5 +49,5 @@
 #define MIN_INT64 (0x8000000000000000ll)
 
-#define MAX_UINT64 (0xFFFFFFFFFFFFFFFll)
+#define MAX_UINT64 (0xFFFFFFFFFFFFFFFFll)
 #define MIN_UINT64 (0ll)
 
Index: softfloat/generic/conversion.c
===================================================================
--- softfloat/generic/conversion.c	(revision 2cb202e9762a4374a22027a279236d2c5ed8dd2b)
+++ softfloat/generic/conversion.c	(revision a82695c70c257f11a27db6b14c69085dbbd9f7fe)
@@ -208,3 +208,181 @@
 
 
-
+/** Helping procedure for converting float64 to uint64
+ * @param a floating point number in normalized form (no NaNs or Inf are checked )
+ * @return unsigned integer
+ */
+static __u64 _float64_to_uint64_helper(float64 a)
+{
+	__u64 frac;
+	
+	if (a.parts.exp < FLOAT64_BIAS) {
+		/*TODO: rounding*/
+		return 0;
+	}
+	
+	frac = a.parts.fraction;
+	
+	frac |= FLOAT64_HIDDEN_BIT_MASK;
+	/* shift fraction to left so hidden bit will be the most significant bit */
+	frac <<= 64 - FLOAT64_FRACTION_SIZE - 1; 
+
+	frac >>= 64 - (a.parts.exp - FLOAT64_BIAS) - 1;
+	if ((a.parts.sign == 1) && (frac != 0)) {
+		frac = ~frac;
+		++frac;
+	}
+	
+	return frac;
+}
+
+/* Convert float to unsigned int64
+ * FIXME: Im not sure what to return if overflow/underflow happens 
+ * 	- now its the biggest or the smallest int
+ */ 
+__u64 float64_to_uint64(float64 a)
+{
+	if (isFloat64NaN(a)) {
+		return MAX_UINT64;
+	}
+	
+	if (isFloat64Infinity(a) || (a.parts.exp >= (64 + FLOAT64_BIAS)))  {
+		if (a.parts.sign) {
+			return MIN_UINT64;
+		}
+		return MAX_UINT64;
+	}
+	
+	return _float64_to_uint64_helper(a);	
+}
+
+/* Convert float to signed int64
+ * FIXME: Im not sure what to return if overflow/underflow happens 
+ * 	- now its the biggest or the smallest int
+ */ 
+__s64 float64_to_int64(float64 a)
+{
+	if (isFloat64NaN(a)) {
+		return MAX_INT64;
+	}
+	
+	if (isFloat64Infinity(a) || (a.parts.exp >= (64 + FLOAT64_BIAS)))  {
+		if (a.parts.sign) {
+			return MIN_INT64;
+		}
+		return MAX_INT64;
+	}
+	return _float64_to_uint64_helper(a);
+}	
+
+
+
+
+
+/** Helping procedure for converting float32 to uint64
+ * @param a floating point number in normalized form (no NaNs or Inf are checked )
+ * @return unsigned integer
+ */
+static __u64 _float32_to_uint64_helper(float32 a)
+{
+	__u64 frac;
+	
+	if (a.parts.exp < FLOAT32_BIAS) {
+		/*TODO: rounding*/
+		return 0;
+	}
+	
+	frac = a.parts.fraction;
+	
+	frac |= FLOAT32_HIDDEN_BIT_MASK;
+	/* shift fraction to left so hidden bit will be the most significant bit */
+	frac <<= 64 - FLOAT32_FRACTION_SIZE - 1; 
+
+	frac >>= 64 - (a.parts.exp - FLOAT32_BIAS) - 1;
+	if ((a.parts.sign == 1) && (frac != 0)) {
+		frac = ~frac;
+		++frac;
+	}
+	
+	return frac;
+}
+
+/* Convert float to unsigned int64
+ * FIXME: Im not sure what to return if overflow/underflow happens 
+ * 	- now its the biggest or the smallest int
+ */ 
+__u64 float32_to_uint64(float32 a)
+{
+	if (isFloat32NaN(a)) {
+		return MAX_UINT64;
+	}
+	
+	if (isFloat32Infinity(a) || (a.parts.exp >= (64 + FLOAT32_BIAS)))  {
+		if (a.parts.sign) {
+			return MIN_UINT64;
+		}
+		return MAX_UINT64;
+	}
+	
+	return _float32_to_uint64_helper(a);	
+}
+
+/* Convert float to signed int64
+ * FIXME: Im not sure what to return if overflow/underflow happens 
+ * 	- now its the biggest or the smallest int
+ */ 
+__s64 float32_to_int64(float32 a)
+{
+	if (isFloat32NaN(a)) {
+		return MAX_INT64;
+	}
+	
+	if (isFloat32Infinity(a) || (a.parts.exp >= (64 + FLOAT32_BIAS)))  {
+		if (a.parts.sign) {
+			return (MIN_INT64);
+		}
+		return MAX_INT64;
+	}
+	return _float32_to_uint64_helper(a);
+}	
+
+
+/* Convert float64 to unsigned int32
+ * FIXME: Im not sure what to return if overflow/underflow happens 
+ * 	- now its the biggest or the smallest int
+ */ 
+__u32 float64_to_uint32(float64 a)
+{
+	if (isFloat64NaN(a)) {
+		return MAX_UINT32;
+	}
+	
+	if (isFloat64Infinity(a) || (a.parts.exp >= (32 + FLOAT64_BIAS)))  {
+		if (a.parts.sign) {
+			return MIN_UINT32;
+		}
+		return MAX_UINT32;
+	}
+	
+	return (__u32)_float64_to_uint64_helper(a);	
+}
+
+/* Convert float64 to signed int32
+ * FIXME: Im not sure what to return if overflow/underflow happens 
+ * 	- now its the biggest or the smallest int
+ */ 
+__s32 float64_to_int32(float64 a)
+{
+	if (isFloat64NaN(a)) {
+		return MAX_INT32;
+	}
+	
+	if (isFloat64Infinity(a) || (a.parts.exp >= (32 + FLOAT64_BIAS)))  {
+		if (a.parts.sign) {
+			return MIN_INT32;
+		}
+		return MAX_INT32;
+	}
+	return (__s32)_float64_to_uint64_helper(a);
+}	
+
+
Index: softfloat/generic/softfloat.c
===================================================================
--- softfloat/generic/softfloat.c	(revision 2cb202e9762a4374a22027a279236d2c5ed8dd2b)
+++ softfloat/generic/softfloat.c	(revision a82695c70c257f11a27db6b14c69085dbbd9f7fe)
@@ -174,4 +174,8 @@
 int __fixdfsi(double a)
 {
+	float64 da;
+	da.d = a;
+	
+	return float64_to_int(da);
 }
  
@@ -185,11 +189,23 @@
 long __fixdfdi(double a)
 {
+	float64 da;
+	da.d = a;
+	
+	return float64_to_long(da);
 }
  
 long long __fixsfti(float a)
 {
+	float32 fa;
+	fa.f = a;
+	
+	return float32_to_longlong(fa);
 }
 long long __fixdfti(double a)
 {
+	float64 da;
+	da.d = a;
+	
+	return float64_to_longlong(da);
 }
 
@@ -203,4 +219,8 @@
 unsigned int __fixunsdfsi(double a)
 {
+	float64 da;
+	da.d = a;
+	
+	return float64_to_uint(da);
 }
  
@@ -214,11 +234,23 @@
 unsigned long __fixunsdfdi(double a)
 {
+	float64 da;
+	da.d = a;
+	
+	return float64_to_ulong(da);
 }
  
 unsigned long long __fixunssfti(float a)
 {
+	float32 fa;
+	fa.f = a;
+	
+	return float32_to_ulonglong(fa);
 }
 unsigned long long __fixunsdfti(double a)
 {
+	float64 da;
+	da.d = a;
+	
+	return float64_to_ulonglong(da);
 }
  
Index: softfloat/include/conversion.h
===================================================================
--- softfloat/include/conversion.h	(revision 2cb202e9762a4374a22027a279236d2c5ed8dd2b)
+++ softfloat/include/conversion.h	(revision a82695c70c257f11a27db6b14c69085dbbd9f7fe)
@@ -34,4 +34,14 @@
 float32 convertFloat64ToFloat32(float64 a);
 
+__u32 float32_to_uint32(float32 a);
+__s32 float32_to_int32(float32 a);
+__u64 float64_to_uint64(float64 a);
+__s64 float64_to_int64(float64 a);
+__u64 float32_to_uint64(float32 a);
+__s64 float32_to_int64(float32 a);
+__u32 float64_to_uint32(float64 a);
+__s32 float64_to_int32(float64 a);
+
+
 #endif
 
