Index: softfloat/Makefile
===================================================================
--- softfloat/Makefile	(revision f37d76960a21f813d1cf24c92836f45c8dfc151a)
+++ softfloat/Makefile	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -1,3 +1,81 @@
-all:
+#
+# Copyright (C) 2005 Martin Decky
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# - Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in the
+#   documentation and/or other materials provided with the distribution.
+# - The name of the author may not be used to endorse or promote products
+#   derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+## Common compiler flags
+#
+
+LIBC_PREFIX = ../libc
+## Setup toolchain
+#
+
+include $(LIBC_PREFIX)/Makefile.toolchain
+
+CFLAGS +=-Iinclude -Iarch/$(ARCH)/include/
+
+## Sources
+#
+
+GENERIC_SOURCES =		\
+	generic/add.c		\
+	generic/common.c	\
+	generic/comparison.c	\
+	generic/conversion.c	\
+	generic/div.c		\
+	generic/mul.c		\
+	generic/other.c		\
+	generic/softfloat.c	\
+	generic/sub.c
+
+ARCH_SOURCES =
+
+GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES)))
+
+.PHONY: all clean depend
+
+all: libsoftfloat.a
+
+-include Makefile.depend
 
 clean:
+	-rm -f libsoftfloat.a Makefile.depend
+	find generic/ -name '*.o' -follow -exec rm \{\} \;
+
+depend:
+	$(CC) $(DEFS) $(CFLAGS) -M $(GENERIC_SOURCES) > Makefile.depend
+
+libsoftfloat.a: depend $(ARCH_OBJECTS) $(GENERIC_OBJECTS)
+	$(AR) rc libsoftfloat.a $(ARCH_OBJECTS) $(GENERIC_OBJECTS)
+
+%.o: %.S
+	$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@
+
+%.o: %.s
+	$(AS) $(AFLAGS) $< -o $@
+
+%.o: %.c
+	$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
Index: softfloat/arch/amd64/include/functions.h
===================================================================
--- softfloat/arch/amd64/include/functions.h	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
+++ softfloat/arch/amd64/include/functions.h	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2006 Josef Cejka
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __SOFTFLOAT_FUNCTIONS_H__
+#define __SOFTFLOAT_FUNCTIONS_H__
+
+#define float32_to_int(X) float32_to_int32(X);
+#define float32_to_long(X) float32_to_int64(X);
+#define float32_to_longlong(X) float32_to_int64(X);
+
+#define float64_to_int(X) float64_to_int32(X);
+#define float64_to_long(X) float64_to_int64(X);
+#define float64_to_longlong(X) float64_to_int64(X);
+
+#define float32_to_uint(X) float32_to_uint32(X);
+#define float32_to_ulong(X) float32_to_uint64(X);
+#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_uint64(X);
+#define float64_to_ulonglong(X) float64_to_uint64(X);
+
+#define int_to_float32(X) int32_to_float32(X);
+#define long_to_float32(X) int64_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) int64_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) uint64_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) uint64_to_float64(X);
+#define ulonglong_to_float64(X) uint64_to_float64(X);
+
+#endif
+
Index: softfloat/arch/ia32/include/arch.h
===================================================================
--- softfloat/arch/ia32/include/arch.h	(revision f37d76960a21f813d1cf24c92836f45c8dfc151a)
+++ 	(revision )
@@ -1,34 +1,0 @@
-/*
- * Copyright (C) 2006 Josef Cejka
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __ia32_ARCH_H__
-#define __ia32_ARCH_H__
-
-#define __LITTLE_ENDIAN__ 
-
-#endif
Index: softfloat/arch/ia32/include/functions.h
===================================================================
--- softfloat/arch/ia32/include/functions.h	(revision f37d76960a21f813d1cf24c92836f45c8dfc151a)
+++ softfloat/arch/ia32/include/functions.h	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -27,6 +27,6 @@
  */
 
-#ifndef __ia32_FUNCTIONS_H__
-#define __ia32_FUNCTIONS_H__
+#ifndef __SOFTFLOAT_FUNCTIONS_H__
+#define __SOFTFLOAT_FUNCTIONS_H__
 
 #define float32_to_int(X) float32_to_int32(X);
@@ -62,5 +62,4 @@
 #define ulonglong_to_float64(X) uint64_to_float64(X);
 
+#endif
 
-
-#endif
Index: softfloat/arch/ia32/include/types.h
===================================================================
--- softfloat/arch/ia32/include/types.h	(revision f37d76960a21f813d1cf24c92836f45c8dfc151a)
+++ 	(revision )
@@ -1,57 +1,0 @@
-/*
- * Copyright (C) 2006 Josef Cejka
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __ia32_TYPES_H__
-#define __ia32_TYPES_H__
-
-typedef char __s8;
-typedef short __s16;
-typedef long __s32;
-typedef long long __s64;
-
-typedef unsigned char __u8;
-typedef unsigned short __u16;
-typedef unsigned long __u32;
-typedef unsigned long long __u64;
-
-#define MAX_INT32 (0x7FFFFFFF)
-#define MIN_INT32 (0x80000000)
-
-#define MAX_UINT32 (0xFFFFFFFF)
-#define MIN_UINT32 (0)
-
-#define MAX_INT64 (0x7FFFFFFFFFFFFFFFll)
-#define MIN_INT64 (0x8000000000000000ll)
-
-#define MAX_UINT64 (0xFFFFFFFFFFFFFFFFll)
-#define MIN_UINT64 (0ll)
-
-
-
-#endif
-
Index: softfloat/arch/ia64/include/functions.h
===================================================================
--- softfloat/arch/ia64/include/functions.h	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
+++ softfloat/arch/ia64/include/functions.h	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2006 Josef Cejka
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __SOFTFLOAT_FUNCTIONS_H__
+#define __SOFTFLOAT_FUNCTIONS_H__
+
+#define float32_to_int(X) float32_to_int32(X);
+#define float32_to_long(X) float32_to_int64(X);
+#define float32_to_longlong(X) float32_to_int64(X);
+
+#define float64_to_int(X) float64_to_int32(X);
+#define float64_to_long(X) float64_to_int64(X);
+#define float64_to_longlong(X) float64_to_int64(X);
+
+#define float32_to_uint(X) float32_to_uint32(X);
+#define float32_to_ulong(X) float32_to_uint64(X);
+#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_uint64(X);
+#define float64_to_ulonglong(X) float64_to_uint64(X);
+
+#define int_to_float32(X) int32_to_float32(X);
+#define long_to_float32(X) int64_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) int64_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) uint64_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) uint64_to_float64(X);
+#define ulonglong_to_float64(X) uint64_to_float64(X);
+
+#endif
+
Index: softfloat/arch/mips32/include/functions.h
===================================================================
--- softfloat/arch/mips32/include/functions.h	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
+++ softfloat/arch/mips32/include/functions.h	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2006 Josef Cejka
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __SOFTFLOAT_FUNCTIONS_H__
+#define __SOFTFLOAT_FUNCTIONS_H__
+
+#define float32_to_int(X) float32_to_int32(X);
+#define float32_to_long(X) float32_to_int32(X);
+#define float32_to_longlong(X) float32_to_int64(X);
+
+#define float64_to_int(X) float64_to_int32(X);
+#define float64_to_long(X) float64_to_int32(X);
+#define float64_to_longlong(X) float64_to_int64(X);
+
+#define float32_to_uint(X) float32_to_uint32(X);
+#define float32_to_ulong(X) float32_to_uint32(X);
+#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);
+
+#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/arch/mips32eb/include/functions.h
===================================================================
--- softfloat/arch/mips32eb/include/functions.h	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
+++ softfloat/arch/mips32eb/include/functions.h	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2006 Josef Cejka
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __SOFTFLOAT_FUNCTIONS_H__
+#define __SOFTFLOAT_FUNCTIONS_H__
+
+#define float32_to_int(X) float32_to_int32(X);
+#define float32_to_long(X) float32_to_int32(X);
+#define float32_to_longlong(X) float32_to_int64(X);
+
+#define float64_to_int(X) float64_to_int32(X);
+#define float64_to_long(X) float64_to_int32(X);
+#define float64_to_longlong(X) float64_to_int64(X);
+
+#define float32_to_uint(X) float32_to_uint32(X);
+#define float32_to_ulong(X) float32_to_uint32(X);
+#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);
+
+#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/arch/ppc32/include/functions.h
===================================================================
--- softfloat/arch/ppc32/include/functions.h	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
+++ softfloat/arch/ppc32/include/functions.h	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2006 Josef Cejka
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __SOFTFLOAT_FUNCTIONS_H__
+#define __SOFTFLOAT_FUNCTIONS_H__
+
+#define float32_to_int(X) float32_to_int32(X);
+#define float32_to_long(X) float32_to_int32(X);
+#define float32_to_longlong(X) float32_to_int64(X);
+
+#define float64_to_int(X) float64_to_int32(X);
+#define float64_to_long(X) float64_to_int32(X);
+#define float64_to_longlong(X) float64_to_int64(X);
+
+#define float32_to_uint(X) float32_to_uint32(X);
+#define float32_to_ulong(X) float32_to_uint32(X);
+#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);
+
+#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/arch/sparc64/include/functions.h
===================================================================
--- softfloat/arch/sparc64/include/functions.h	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
+++ softfloat/arch/sparc64/include/functions.h	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2006 Josef Cejka
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __SOFTFLOAT_FUNCTIONS_H__
+#define __SOFTFLOAT_FUNCTIONS_H__
+
+#define float32_to_int(X) float32_to_int32(X);
+#define float32_to_long(X) float32_to_int64(X);
+#define float32_to_longlong(X) float32_to_int64(X);
+
+#define float64_to_int(X) float64_to_int32(X);
+#define float64_to_long(X) float64_to_int64(X);
+#define float64_to_longlong(X) float64_to_int64(X);
+
+#define float32_to_uint(X) float32_to_uint32(X);
+#define float32_to_ulong(X) float32_to_uint64(X);
+#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_uint64(X);
+#define float64_to_ulonglong(X) float64_to_uint64(X);
+
+#define int_to_float32(X) int32_to_float32(X);
+#define long_to_float32(X) int64_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) int64_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) uint64_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) uint64_to_float64(X);
+#define ulonglong_to_float64(X) uint64_to_float64(X);
+
+#endif
+
Index: softfloat/generic/add.c
===================================================================
--- softfloat/generic/add.c	(revision f37d76960a21f813d1cf24c92836f45c8dfc151a)
+++ softfloat/generic/add.c	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -36,5 +36,5 @@
 {
 	int expdiff;
-	__u32 exp1, exp2,frac1, frac2;
+	uint32_t exp1, exp2,frac1, frac2;
 	
 	expdiff = a.parts.exp - b.parts.exp;
@@ -144,6 +144,6 @@
 {
 	int expdiff;
-	__u32 exp1, exp2;
-	__u64 frac1, frac2;
+	uint32_t exp1, exp2;
+	uint64_t frac1, frac2;
 	
 	expdiff = ((int )a.parts.exp) - b.parts.exp;
Index: softfloat/generic/common.c
===================================================================
--- softfloat/generic/common.c	(revision f37d76960a21f813d1cf24c92836f45c8dfc151a)
+++ softfloat/generic/common.c	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -57,5 +57,5 @@
  * @return valied float64
  */
-float64 finishFloat64(__s32 cexp, __u64 cfrac, char sign)
+float64 finishFloat64(int32_t cexp, uint64_t cfrac, char sign)
 {
 	float64 result;
@@ -109,5 +109,5 @@
 	}
 
-	result.parts.exp = (__u32)cexp;
+	result.parts.exp = (uint32_t)cexp;
 	
 	result.parts.fraction = ((cfrac >>(64 - FLOAT64_FRACTION_SIZE - 2 ) ) & (~FLOAT64_HIDDEN_BIT_MASK)); 
@@ -119,5 +119,5 @@
  * @param i 
  */
-int countZeroes64(__u64 i)
+int countZeroes64(uint64_t i)
 {
 	int j;
@@ -134,5 +134,5 @@
  * @param i 
  */
-int countZeroes32(__u32 i)
+int countZeroes32(uint32_t i)
 {
 	int j;
@@ -149,5 +149,5 @@
  * @param i 
  */
-int countZeroes8(__u8 i)
+int countZeroes8(uint8_t i)
 {
 	return zeroTable[i];
@@ -158,5 +158,5 @@
  * @param fraction part with hidden bit shifted to 30. bit
  */
-void roundFloat32(__s32 *exp, __u32 *fraction)
+void roundFloat32(int32_t *exp, uint32_t *fraction)
 {
 	/* rounding - if first bit after fraction is set then round up */
@@ -183,5 +183,5 @@
  * @param fraction part with hidden bit shifted to 62. bit
  */
-void roundFloat64(__s32 *exp, __u64 *fraction)
+void roundFloat64(int32_t *exp, uint64_t *fraction)
 {
 	/* rounding - if first bit after fraction is set then round up */
Index: softfloat/generic/conversion.c
===================================================================
--- softfloat/generic/conversion.c	(revision f37d76960a21f813d1cf24c92836f45c8dfc151a)
+++ softfloat/generic/conversion.c	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -35,5 +35,5 @@
 {
 	float64 result;
-	__u64 frac;
+	uint64_t frac;
 	
 	result.parts.sign = a.parts.sign;
@@ -74,6 +74,6 @@
 {
 	float32 result;
-	__s32 exp;
-	__u64 frac;
+	int32_t exp;
+	uint64_t frac;
 	
 	result.parts.sign = a.parts.sign;
@@ -84,5 +84,5 @@
 		
 		if (isFloat64SigNaN(a)) {
-			result.parts.fraction = 0x800000; /* set first bit of fraction nonzero */
+			result.parts.fraction = 0x400000; /* set first bit of fraction nonzero */
 			return result;
 		}
@@ -145,7 +145,7 @@
  * @return unsigned integer
  */
-static __u32 _float32_to_uint32_helper(float32 a)
-{
-	__u32 frac;
+static uint32_t _float32_to_uint32_helper(float32 a)
+{
+	uint32_t frac;
 	
 	if (a.parts.exp < FLOAT32_BIAS) {
@@ -173,5 +173,5 @@
  * 	- now its the biggest or the smallest int
  */ 
-__u32 float32_to_uint32(float32 a)
+uint32_t float32_to_uint32(float32 a)
 {
 	if (isFloat32NaN(a)) {
@@ -193,5 +193,5 @@
  * 	- now its the biggest or the smallest int
  */ 
-__s32 float32_to_int32(float32 a)
+int32_t float32_to_int32(float32 a)
 {
 	if (isFloat32NaN(a)) {
@@ -213,7 +213,7 @@
  * @return unsigned integer
  */
-static __u64 _float64_to_uint64_helper(float64 a)
-{
-	__u64 frac;
+static uint64_t _float64_to_uint64_helper(float64 a)
+{
+	uint64_t frac;
 	
 	if (a.parts.exp < FLOAT64_BIAS) {
@@ -241,5 +241,5 @@
  * 	- now its the biggest or the smallest int
  */ 
-__u64 float64_to_uint64(float64 a)
+uint64_t float64_to_uint64(float64 a)
 {
 	if (isFloat64NaN(a)) {
@@ -261,5 +261,5 @@
  * 	- now its the biggest or the smallest int
  */ 
-__s64 float64_to_int64(float64 a)
+int64_t float64_to_int64(float64 a)
 {
 	if (isFloat64NaN(a)) {
@@ -284,7 +284,7 @@
  * @return unsigned integer
  */
-static __u64 _float32_to_uint64_helper(float32 a)
-{
-	__u64 frac;
+static uint64_t _float32_to_uint64_helper(float32 a)
+{
+	uint64_t frac;
 	
 	if (a.parts.exp < FLOAT32_BIAS) {
@@ -312,5 +312,5 @@
  * 	- now its the biggest or the smallest int
  */ 
-__u64 float32_to_uint64(float32 a)
+uint64_t float32_to_uint64(float32 a)
 {
 	if (isFloat32NaN(a)) {
@@ -332,5 +332,5 @@
  * 	- now its the biggest or the smallest int
  */ 
-__s64 float32_to_int64(float32 a)
+int64_t float32_to_int64(float32 a)
 {
 	if (isFloat32NaN(a)) {
@@ -352,5 +352,5 @@
  * 	- now its the biggest or the smallest int
  */ 
-__u32 float64_to_uint32(float64 a)
+uint32_t float64_to_uint32(float64 a)
 {
 	if (isFloat64NaN(a)) {
@@ -365,5 +365,5 @@
 	}
 	
-	return (__u32)_float64_to_uint64_helper(a);	
+	return (uint32_t)_float64_to_uint64_helper(a);	
 }
 
@@ -372,5 +372,5 @@
  * 	- now its the biggest or the smallest int
  */ 
-__s32 float64_to_int32(float64 a)
+int32_t float64_to_int32(float64 a)
 {
 	if (isFloat64NaN(a)) {
@@ -384,5 +384,5 @@
 		return MAX_INT32;
 	}
-	return (__s32)_float64_to_uint64_helper(a);
+	return (int32_t)_float64_to_uint64_helper(a);
 }	
 
@@ -391,8 +391,8 @@
  *
  */
-float32 uint32_to_float32(__u32 i)
+float32 uint32_to_float32(uint32_t i)
 {
 	int counter;
-	__s32 exp;
+	int32_t exp;
 	float32 result;
 	
@@ -423,12 +423,12 @@
 }
 
-float32 int32_to_float32(__s32 i) 
+float32 int32_to_float32(int32_t i) 
 {
 	float32 result;
 
 	if (i < 0) {
-		result = uint32_to_float32((__u32)(-i));
-	} else {
-		result = uint32_to_float32((__u32)i);
+		result = uint32_to_float32((uint32_t)(-i));
+	} else {
+		result = uint32_to_float32((uint32_t)i);
 	}
 	
@@ -439,8 +439,9 @@
 
 
-float32 uint64_to_float32(__u64 i) 
+float32 uint64_to_float32(uint64_t i) 
 {
 	int counter;
-	__s32 exp;
+	int32_t exp;
+	int32_t j;
 	float32 result;
 	
@@ -463,20 +464,21 @@
 		i >>= 1 + 32 - counter;
 	}
-
-	roundFloat32(&exp, &i);
-
-	result.parts.fraction = i >> 7;
+	
+	j = (uint32_t)i;
+	roundFloat32(&exp, &j);
+
+	result.parts.fraction = j >> 7;
 	result.parts.exp = exp;
 	return result;
 }
 
-float32 int64_to_float32(__s64 i) 
+float32 int64_to_float32(int64_t i) 
 {
 	float32 result;
 
 	if (i < 0) {
-		result = uint64_to_float32((__u64)(-i));
-	} else {
-		result = uint64_to_float32((__u64)i);
+		result = uint64_to_float32((uint64_t)(-i));
+	} else {
+		result = uint64_to_float32((uint64_t)i);
 	}
 	
@@ -490,10 +492,10 @@
  *
  */
-float64 uint32_to_float64(__u32 i)
+float64 uint32_to_float64(uint32_t i)
 {
 	int counter;
-	__s32 exp;
+	int32_t exp;
 	float64 result;
-	__u64 frac;
+	uint64_t frac;
 	
 	result.parts.sign = 0;
@@ -520,12 +522,12 @@
 }
 
-float64 int32_to_float64(__s32 i) 
+float64 int32_to_float64(int32_t i) 
 {
 	float64 result;
 
 	if (i < 0) {
-		result = uint32_to_float64((__u32)(-i));
-	} else {
-		result = uint32_to_float64((__u32)i);
+		result = uint32_to_float64((uint32_t)(-i));
+	} else {
+		result = uint32_to_float64((uint32_t)i);
 	}
 	
@@ -536,8 +538,8 @@
 
 
-float64 uint64_to_float64(__u64 i) 
+float64 uint64_to_float64(uint64_t i) 
 {
 	int counter;
-	__s32 exp;
+	int32_t exp;
 	float64 result;
 	
@@ -567,12 +569,12 @@
 }
 
-float64 int64_to_float64(__s64 i) 
+float64 int64_to_float64(int64_t i) 
 {
 	float64 result;
 
 	if (i < 0) {
-		result = uint64_to_float64((__u64)(-i));
-	} else {
-		result = uint64_to_float64((__u64)i);
+		result = uint64_to_float64((uint64_t)(-i));
+	} else {
+		result = uint64_to_float64((uint64_t)i);
 	}
 	
Index: softfloat/generic/div.c
===================================================================
--- softfloat/generic/div.c	(revision f37d76960a21f813d1cf24c92836f45c8dfc151a)
+++ softfloat/generic/div.c	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -38,6 +38,6 @@
 {
 	float32 result;
-	__s32 aexp, bexp, cexp;
-	__u64 afrac, bfrac, cfrac;
+	int32_t aexp, bexp, cexp;
+	uint64_t afrac, bfrac, cfrac;
 	
 	result.parts.sign = a.parts.sign ^ b.parts.sign;
@@ -181,5 +181,5 @@
 		
 	} else {
-		result.parts.exp = (__u32)cexp;
+		result.parts.exp = (uint32_t)cexp;
 	}
 	
@@ -192,7 +192,7 @@
 {
 	float64 result;
-	__s64 aexp, bexp, cexp;
-	__u64 afrac, bfrac, cfrac; 
-	__u64 remlo, remhi;
+	int64_t aexp, bexp, cexp;
+	uint64_t afrac, bfrac, cfrac; 
+	uint64_t remlo, remhi;
 	
 	result.parts.sign = a.parts.sign ^ b.parts.sign;
@@ -307,5 +307,5 @@
 		remlo = - remlo;
 		
-		while ((__s64) remhi < 0) {
+		while ((int64_t) remhi < 0) {
 			cfrac--;
 			remlo += bfrac;
@@ -321,9 +321,9 @@
 }
 
-__u64 divFloat64estim(__u64 a, __u64 b)
+uint64_t divFloat64estim(uint64_t a, uint64_t b)
 {
-	__u64 bhi;
-	__u64 remhi, remlo;
-	__u64 result;
+	uint64_t bhi;
+	uint64_t remhi, remlo;
+	uint64_t result;
 	
 	if ( b <= a ) {
@@ -339,5 +339,5 @@
 
 	b <<= 32;
-	while ( (__s64) remhi < 0 ) {
+	while ( (int64_t) remhi < 0 ) {
 			result -= 0x1ll << 32;	
 			remlo += b;
Index: softfloat/generic/mul.c
===================================================================
--- softfloat/generic/mul.c	(revision f37d76960a21f813d1cf24c92836f45c8dfc151a)
+++ softfloat/generic/mul.c	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -38,6 +38,6 @@
 {
 	float32 result;
-	__u64 frac1, frac2;
-	__s32 exp;
+	uint64_t frac1, frac2;
+	int32_t exp;
 
 	result.parts.sign = a.parts.sign ^ b.parts.sign;
@@ -174,6 +174,6 @@
 {
 	float64 result;
-	__u64 frac1, frac2;
-	__s32 exp;
+	uint64_t frac1, frac2;
+	int32_t exp;
 
 	result.parts.sign = a.parts.sign ^ b.parts.sign;
@@ -258,8 +258,8 @@
  * @param hi higher part of result
  */
-void mul64integers(__u64 a,__u64 b, __u64 *lo, __u64 *hi)
+void mul64integers(uint64_t a,uint64_t b, uint64_t *lo, uint64_t *hi)
 {
-	__u64 low, high, middle1, middle2;
-	__u32 alow, blow;
+	uint64_t low, high, middle1, middle2;
+	uint32_t alow, blow;
 
 	alow = a & 0xFFFFFFFF;
@@ -269,5 +269,5 @@
 	b >>= 32;
 	
-	low = ((__u64)alow) * blow;
+	low = ((uint64_t)alow) * blow;
 	middle1 = a * blow;
 	middle2 = alow * b;
@@ -275,5 +275,5 @@
 
 	middle1 += middle2;
-	high += (((__u64)(middle1 < middle2)) << 32) + (middle1 >> 32);
+	high += (((uint64_t)(middle1 < middle2)) << 32) + (middle1 >> 32);
 	middle1 <<= 32;
 	low += middle1;
Index: softfloat/generic/softfloat.c
===================================================================
--- softfloat/generic/softfloat.c	(revision f37d76960a21f813d1cf24c92836f45c8dfc151a)
+++ softfloat/generic/softfloat.c	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -39,6 +39,4 @@
 #include<other.h>
 
-#include<arch.h>
-#include<types.h>
 #include<functions.h>
 
@@ -485,12 +483,2 @@
 }
 
-float __mulsc3(float a, float b, float c, float d)
-{
-/* TODO: */
-}
-
-float __divsc3(float a, float b, float c, float d)
-{
-/* TODO: */
-}
-
Index: softfloat/generic/sub.c
===================================================================
--- softfloat/generic/sub.c	(revision f37d76960a21f813d1cf24c92836f45c8dfc151a)
+++ softfloat/generic/sub.c	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -36,5 +36,5 @@
 {
 	int expdiff;
-	__u32 exp1, exp2, frac1, frac2;
+	uint32_t exp1, exp2, frac1, frac2;
 	float32 result;
 
@@ -147,6 +147,6 @@
 {
 	int expdiff;
-	__u32 exp1, exp2;
-	__u64 frac1, frac2;
+	uint32_t exp1, exp2;
+	uint64_t frac1, frac2;
 	float64 result;
 
Index: softfloat/include/common.h
===================================================================
--- softfloat/include/common.h	(revision f37d76960a21f813d1cf24c92836f45c8dfc151a)
+++ softfloat/include/common.h	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -32,12 +32,12 @@
 #include<sftypes.h>
 
-float64 finishFloat64(__s32 cexp, __u64 cfrac, char sign);
+float64 finishFloat64(int32_t cexp, uint64_t cfrac, char sign);
 
-int countZeroes64(__u64 i);
-int countZeroes32(__u32 i);
-int countZeroes8(__u8 i);
+int countZeroes64(uint64_t i);
+int countZeroes32(uint32_t i);
+int countZeroes8(uint8_t i);
 
-void roundFloat32(__s32 *exp, __u32 *fraction);
-void roundFloat64(__s32 *exp, __u64 *fraction);
+void roundFloat32(int32_t *exp, uint32_t *fraction);
+void roundFloat64(int32_t *exp, uint64_t *fraction);
 
 #endif
Index: softfloat/include/conversion.h
===================================================================
--- softfloat/include/conversion.h	(revision f37d76960a21f813d1cf24c92836f45c8dfc151a)
+++ softfloat/include/conversion.h	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -34,27 +34,27 @@
 float32 convertFloat64ToFloat32(float64 a);
 
-__u32 float32_to_uint32(float32 a);
-__s32 float32_to_int32(float32 a);
+uint32_t float32_to_uint32(float32 a);
+int32_t float32_to_int32(float32 a);
 
-__u64 float32_to_uint64(float32 a);
-__s64 float32_to_int64(float32 a);
+uint64_t float32_to_uint64(float32 a);
+int64_t float32_to_int64(float32 a);
 
-__u64 float64_to_uint64(float64 a);
-__s64 float64_to_int64(float64 a);
+uint64_t float64_to_uint64(float64 a);
+int64_t float64_to_int64(float64 a);
 
-__u32 float64_to_uint32(float64 a);
-__s32 float64_to_int32(float64 a);
+uint32_t float64_to_uint32(float64 a);
+int32_t float64_to_int32(float64 a);
 
-float32 uint32_to_float32(__u32 i);
-float32 int32_to_float32(__s32 i);
+float32 uint32_to_float32(uint32_t i);
+float32 int32_to_float32(int32_t i);
 
-float32 uint64_to_float32(__u64 i);
-float32 int64_to_float32(__s64 i);
+float32 uint64_to_float32(uint64_t i);
+float32 int64_to_float32(int64_t i);
 
-float64 uint32_to_float64(__u32 i);
-float64 int32_to_float64(__s32 i);
+float64 uint32_to_float64(uint32_t i);
+float64 int32_to_float64(int32_t i);
 
-float64 uint64_to_float64(__u64 i);
-float64 int64_to_float64(__s64 i);
+float64 uint64_to_float64(uint64_t i);
+float64 int64_to_float64(int64_t i);
 
 #endif
Index: softfloat/include/div.h
===================================================================
--- softfloat/include/div.h	(revision f37d76960a21f813d1cf24c92836f45c8dfc151a)
+++ softfloat/include/div.h	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -33,5 +33,5 @@
 float64 divFloat64(float64 a, float64 b);
 
-__u64 divFloat64estim(__u64 a, __u64 b);
+uint64_t divFloat64estim(uint64_t a, uint64_t b);
 
 #endif
Index: softfloat/include/mul.h
===================================================================
--- softfloat/include/mul.h	(revision f37d76960a21f813d1cf24c92836f45c8dfc151a)
+++ softfloat/include/mul.h	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -34,5 +34,5 @@
 float64 mulFloat64(float64 a, float64 b);
 
-void mul64integers(__u64 a,__u64 b, __u64 *lo, __u64 *hi);
+void mul64integers(uint64_t a,uint64_t b, uint64_t *lo, uint64_t *hi);
 
 #endif
Index: softfloat/include/sftypes.h
===================================================================
--- softfloat/include/sftypes.h	(revision f37d76960a21f813d1cf24c92836f45c8dfc151a)
+++ softfloat/include/sftypes.h	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -30,22 +30,22 @@
 #define __SFTYPES_H__
 
-#include <types.h>
-#include <arch.h>
+#include <endian.h>
+#include <stdint.h>
 
 typedef union {
 	float f;
-	__u32 binary;
+	uint32_t binary;
 
 	struct 	{
-		#ifdef __BIG_ENDIAN__
-		__u32 sign:1;
-		__u32 exp:8;
-		__u32 fraction:23;
-		#elif defined __LITTLE_ENDIAN__
-		__u32 fraction:23;
-		__u32 exp:8;
-		__u32 sign:1;
+		#if __BYTE_ORDER == __BIG_ENDIAN
+		uint32_t sign:1;
+		uint32_t exp:8;
+		uint32_t fraction:23;
+		#elif __BYTE_ORDER == __LITTLE_ENDIAN
+		uint32_t fraction:23;
+		uint32_t exp:8;
+		uint32_t sign:1;
 		#else 
-		#error "Unknown endians."
+			#error "Unknown endians."
 		#endif
 		} parts __attribute__ ((packed));
@@ -54,17 +54,17 @@
 typedef union {
 	double d;
-	__u64 binary;
+	uint64_t binary;
 	
 	struct	{
-		#ifdef __BIG_ENDIAN__
-		__u64 sign:1;
-		__u64 exp:11;
-		__u64 fraction:52;
-		#elif defined __LITTLE_ENDIAN__
-		__u64 fraction:52;
-		__u64 exp:11;
-		__u64 sign:1;
+		#if __BYTE_ORDER == __BIG_ENDIAN
+		uint64_t sign:1;
+		uint64_t exp:11;
+		uint64_t fraction:52;
+		#elif __BYTE_ORDER == __LITTLE_ENDIAN
+		uint64_t fraction:52;
+		uint64_t exp:11;
+		uint64_t sign:1;
 		#else 
-		#error "Unknown endians."
+			#error "Unknown endians."
 		#endif
 		} parts __attribute__ ((packed));
Index: softfloat/include/softfloat.h
===================================================================
--- softfloat/include/softfloat.h	(revision f37d76960a21f813d1cf24c92836f45c8dfc151a)
+++ softfloat/include/softfloat.h	(revision aa59fa038704679a25298dc08da7b9f8dac2e27d)
@@ -158,5 +158,7 @@
 int __gttf2(long double a, long double b);
  
- 
+/* Not implemented yet*/ 
+float __powisf2(float a, int b);
+
 #endif
 
