Module Name: src
Committed By: pooka
Date: Fri Feb 25 11:53:07 UTC 2011
Modified Files:
src/lib/libc/arch/mips/softfloat: mips-gcc.h
Log Message:
Fix LE softfloat (mostly theoretical) and comment.
from Alessandro Forin
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/mips/softfloat/mips-gcc.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/arch/mips/softfloat/mips-gcc.h
diff -u src/lib/libc/arch/mips/softfloat/mips-gcc.h:1.2 src/lib/libc/arch/mips/softfloat/mips-gcc.h:1.3
--- src/lib/libc/arch/mips/softfloat/mips-gcc.h:1.2 Mon Dec 14 01:07:42 2009
+++ src/lib/libc/arch/mips/softfloat/mips-gcc.h Fri Feb 25 11:53:07 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mips-gcc.h,v 1.2 2009/12/14 01:07:42 matt Exp $ */
+/* $NetBSD: mips-gcc.h,v 1.3 2011/02/25 11:53:07 pooka Exp $ */
/*
-------------------------------------------------------------------------------
@@ -85,11 +85,16 @@
/*
-------------------------------------------------------------------------------
-The ARM FPA is odd in that it stores doubles high-order word first, no matter
+The MIPS FPA is odd in that it stores doubles high-order word first, no matter
what the endianness of the CPU. VFP is sane.
-------------------------------------------------------------------------------
*/
#if defined(SOFTFLOAT_FOR_GCC)
-#define FLOAT64_DEMANGLE(a) (a)
-#define FLOAT64_MANGLE(a) (a)
+#if defined(__MIPSEB__)
+#define FLOAT64_DEMANGLE(a) (a)
+#define FLOAT64_MANGLE(a) (a)
+#else
+#define FLOAT64_DEMANGLE(a) (((a) << 32) | ((a) >> 32))
+#define FLOAT64_MANGLE(a) FLOAT64_DEMANGLE(a)
+#endif
#endif