Index: softfloat/arch/ia32/include/functions.h
===================================================================
--- softfloat/arch/ia32/include/functions.h	(revision a82695c70c257f11a27db6b14c69085dbbd9f7fe)
+++ softfloat/arch/ia32/include/functions.h	(revision 1d83419dca15af9cfdd467f64ae4e74ee9516b13)
@@ -46,3 +46,21 @@
 #define float64_to_ulonglong(X) float64_to_uint64(X);
 
+#define int_to_float32(X) int32_to_float32(X);
+#define long_to_float32(X) int32_to_float32(X);
+#define longlong_to_float32(X) int64_to_float32(X);
+
+#define int_to_float64(X) int32_to_float64(X);
+#define long_to_float64(X) int32_to_float64(X);
+#define longlong_to_float64(X) int64_to_float64(X);
+
+#define uint_to_float32(X) uint32_to_float32(X);
+#define ulong_to_float32(X) uint32_to_float32(X);
+#define ulonglong_to_float32(X) uint64_to_float32(X);
+
+#define uint_to_float64(X) uint32_to_float64(X);
+#define ulong_to_float64(X) uint32_to_float64(X);
+#define ulonglong_to_float64(X) uint64_to_float64(X);
+
+
+
 #endif
Index: softfloat/generic/common.c
===================================================================
--- softfloat/generic/common.c	(revision a82695c70c257f11a27db6b14c69085dbbd9f7fe)
+++ softfloat/generic/common.c	(revision 1d83419dca15af9cfdd467f64ae4e74ee9516b13)
@@ -30,4 +30,26 @@
 #include<common.h>
 
+/* Table for fast leading zeroes counting */
+char zeroTable[256] = {
+	8, 7, 7, 6, 6, 6, 6, 4, 4, 4, 4, 4, 4, 4, 4, \
+	3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, \
+	2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \
+	2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, \
+	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
+	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
+	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
+	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+
+
 /** Take fraction shifted by 10 bits to left, round it, normalize it and detect exceptions
  * @param exp exponent with bias
@@ -63,5 +85,5 @@
 		cfrac += (0x1 << (64 - FLOAT64_FRACTION_SIZE - 3)); 
 		
-		if (!(cfrac & (FLOAT64_HIDDEN_BIT_MASK << (64 - FLOAT64_HIDDEN_BIT_MASK - 1)))) {
+		if (!(cfrac & (FLOAT64_HIDDEN_BIT_MASK << (64 - FLOAT64_FRACTION_SIZE - 1)))) {
 			
 			result.parts.fraction = ((cfrac >>(64 - FLOAT64_FRACTION_SIZE - 2) ) & (~FLOAT64_HIDDEN_BIT_MASK)); 
@@ -94,2 +116,90 @@
 }
 
+/** Counts leading zeroes in 64bit unsigned integer
+ * @param i 
+ */
+int countZeroes64(__u64 i)
+{
+	int j;
+	for (j =0; j < 64; j += 8) {
+		if ( i & (0xFFll << (56 - j))) {
+			return (j + countZeroes8(i >> (56 - j)));
+		}
+	}
+
+	return 64;
+}
+
+/** Counts leading zeroes in 32bit unsigned integer
+ * @param i 
+ */
+int countZeroes32(__u32 i)
+{
+	int j;
+	for (j =0; j < 32; j += 8) {
+		if ( i & (0xFF << (24 - j))) {
+			return (j + countZeroes8(i >> (24 - j)));
+		}
+	}
+
+	return 32;
+}
+
+/** Counts leading zeroes in byte
+ * @param i 
+ */
+int countZeroes8(__u8 i)
+{
+	return zeroTable[i];
+}
+
+/** Round and normalize number expressed by exponent and fraction with first bit (equal to hidden bit) at 30. bit
+ * @param exp exponent 
+ * @param fraction part with hidden bit shifted to 30. bit
+ */
+void roundFloat32(__s32 *exp, __u32 *fraction)
+{
+	/* rounding - if first bit after fraction is set then round up */
+	(*fraction) += (0x1 << 6);
+	
+	if ((*fraction) & (FLOAT32_HIDDEN_BIT_MASK << 8)) { 
+		/* rounding overflow */
+		++(*exp);
+		(*fraction) >>= 1;
+	};
+	
+	if (((*exp) >= FLOAT32_MAX_EXPONENT ) || ((*exp) < 0)) {
+		/* overflow - set infinity as result */
+		(*exp) = FLOAT32_MAX_EXPONENT;
+		(*fraction) = 0;
+		return;
+	}
+
+	return;
+}
+
+/** Round and normalize number expressed by exponent and fraction with first bit (equal to hidden bit) at 62. bit
+ * @param exp exponent 
+ * @param fraction part with hidden bit shifted to 62. bit
+ */
+void roundFloat64(__s32 *exp, __u64 *fraction)
+{
+	/* rounding - if first bit after fraction is set then round up */
+	(*fraction) += (0x1 << 9);
+	
+	if ((*fraction) & (FLOAT64_HIDDEN_BIT_MASK << 11)) { 
+		/* rounding overflow */
+		++(*exp);
+		(*fraction) >>= 1;
+	};
+	
+	if (((*exp) >= FLOAT64_MAX_EXPONENT ) || ((*exp) < 0)) {
+		/* overflow - set infinity as result */
+		(*exp) = FLOAT64_MAX_EXPONENT;
+		(*fraction) = 0;
+		return;
+	}
+
+	return;
+}
+
Index: softfloat/generic/conversion.c
===================================================================
--- softfloat/generic/conversion.c	(revision a82695c70c257f11a27db6b14c69085dbbd9f7fe)
+++ softfloat/generic/conversion.c	(revision 1d83419dca15af9cfdd467f64ae4e74ee9516b13)
@@ -30,4 +30,5 @@
 #include "conversion.h"
 #include "comparison.h"
+#include "common.h"
 
 float64 convertFloat32ToFloat64(float32 a) 
@@ -386,3 +387,73 @@
 }	
 
-
+	
+/** Convert unsigned integer to float32
+ *
+ *
+ */
+float32 uint32_to_float32(__u32 i)
+{
+	int counter;
+	__s32 exp;
+	float32 result;
+	
+	result.parts.sign = 0;
+	result.parts.fraction = 0;
+
+	counter = countZeroes32(i);
+
+	exp = FLOAT32_BIAS + 32 - counter - 1;
+	
+	if (counter == 32) {
+		result.binary = 0;
+		return result;
+	}
+	
+	if (counter > 0) {
+		i <<= counter - 1;
+	} else {
+		i >>= 1;
+	}
+
+	roundFloat32(&exp, &i);
+
+	result.parts.fraction = i >> 7;
+	result.parts.exp = exp;
+
+	return result;
+}
+
+float32 int32_to_float32(__s32 i) 
+{
+	float32 result;
+
+	if (i < 0) {
+		result = uint32_to_float32((__u32)(-i));
+	} else {
+		result = uint32_to_float32((__u32)i);
+	}
+	
+	result.parts.sign = i < 0;
+
+ 	return result;
+}
+
+
+float32 uint64_to_float32(__u64 i) 
+{
+}
+
+float32 int64_to_float32(__s64 i) 
+{
+	float32 result;
+
+	if (i < 0) {
+		result = uint64_to_float32((__u64)(-i));
+	} else {
+		result = uint64_to_float32((__u64)i);
+	}
+	
+	result.parts.sign = i < 0;
+
+ 	return result;
+}
Index: softfloat/generic/softfloat.c
===================================================================
--- softfloat/generic/softfloat.c	(revision a82695c70c257f11a27db6b14c69085dbbd9f7fe)
+++ softfloat/generic/softfloat.c	(revision 1d83419dca15af9cfdd467f64ae4e74ee9516b13)
@@ -257,4 +257,8 @@
 float __floatsisf(int i)
 {
+	float32 fa;
+	
+	fa = int_to_float32(i);
+	return fa.f;
 }
 double __floatsidf(int i)
@@ -264,4 +268,8 @@
 float __floatdisf(long i)
 {
+	float32 fa;
+	
+	fa = long_to_float32(i);
+	return fa.f;
 }
 double __floatdidf(long i)
@@ -271,4 +279,8 @@
 float __floattisf(long long i)
 {
+	float32 fa;
+	
+	fa = longlong_to_float32(i);
+	return fa.f;
 }
 double __floattidf(long long i)
@@ -278,4 +290,8 @@
 float __floatunsisf(unsigned int i)
 {
+	float32 fa;
+	
+	fa = uint_to_float32(i);
+	return fa.f;
 }
 double __floatunsidf(unsigned int i)
@@ -285,4 +301,8 @@
 float __floatundisf(unsigned long i)
 {
+	float32 fa;
+	
+	fa = ulong_to_float32(i);
+	return fa.f;
 }
 double __floatundidf(unsigned long i)
@@ -292,4 +312,8 @@
 float __floatuntisf(unsigned long long i)
 {
+	float32 fa;
+	
+	fa = ulonglong_to_float32(i);
+	return fa.f;
 }
 double __floatuntidf(unsigned long long i)
Index: softfloat/include/common.h
===================================================================
--- softfloat/include/common.h	(revision a82695c70c257f11a27db6b14c69085dbbd9f7fe)
+++ softfloat/include/common.h	(revision 1d83419dca15af9cfdd467f64ae4e74ee9516b13)
@@ -34,3 +34,9 @@
 float64 finishFloat64(__s32 cexp, __u64 cfrac, char sign);
 
+int countZeroes32(__u32 i);
+int countZeroes8(__u8 i);
+
+void roundFloat32(__s32 *exp, __u32 *fraction);
+void roundFloat64(__s32 *exp, __u64 *fraction);
+
 #endif
Index: softfloat/include/conversion.h
===================================================================
--- softfloat/include/conversion.h	(revision a82695c70c257f11a27db6b14c69085dbbd9f7fe)
+++ softfloat/include/conversion.h	(revision 1d83419dca15af9cfdd467f64ae4e74ee9516b13)
@@ -36,12 +36,19 @@
 __u32 float32_to_uint32(float32 a);
 __s32 float32_to_int32(float32 a);
+
+__u64 float32_to_uint64(float32 a);
+__s64 float32_to_int64(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);
 
+float32 uint32_to_float32(__u32 i);
+float32 int32_to_float32(__s32 i);
 
+float32 uint64_to_float32(__u64 i);
+float32 int64_to_float32(__s64 i);
 #endif
 
