* configure.in: added FPU test for ARM.
authorMalte Hildingson <malte@mono-cvs.ximian.com>
Sun, 3 Aug 2003 20:30:10 +0000 (20:30 -0000)
committerMalte Hildingson <malte@mono-cvs.ximian.com>
Sun, 3 Aug 2003 20:30:10 +0000 (20:30 -0000)
* mono-endian.h: changed to utilise the new ARM FPU defines.

svn path=/trunk/mono/; revision=17027

ChangeLog
configure.in
mono/metadata/mono-endian.h

index c136a719f56b68efd02f2787eb5dc22941a32c9b..4264370c3465e03da72ead9ddf695facda316b1f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
 
+Sun Aug  3 21:12:13 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
+
+       * configure.in: added FPU test for ARM.
+
 Thu Jul 31 16:19:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
 
        * configure.in, etc.: portability fixes and support for
index 986fe7a20980ae16f617865480c1ca08533e4bd1..bf9ab6371221058a9a0fc1181adfc5209d5281f2 100644 (file)
@@ -702,6 +702,26 @@ case "$host" in
                ;;
 esac
 
+if test ${TARGET} = ARM; then
+       dnl ******************************************
+       dnl *** Check to see what FPU is available ***
+       dnl ******************************************
+       AC_MSG_CHECKING(which FPU to use)
+
+       echo "double foo () { return 0.0; } \
+               int main () { double d = foo(); }" > conftest.c
+       ${CC} -S conftest.c -o conftest.s
+
+       if test -n "`grep f0 conftest.s`"; then fpu=FPA
+       else if test -n "`grep d0 conftest.s`"; then fpu=VFP
+       else fpu=NONE
+       fi fi
+
+       AC_MSG_RESULT($fpu)
+       CPPFLAGS="$CPPFLAGS -DARM_FPU_$fpu"
+       unset fpu
+fi
+
 if test ${TARGET} = unknown; then
        CPPFLAGS="$CPPFLAGS -DNO_PORT"
        AC_MSG_WARN("mono has not been ported to $host: some things may not work.")
index 2d7035ce699b076807a575f31286fd874110706a..6cee6415259bddbf97127c6dbf933e01494e6b7d 100644 (file)
@@ -14,7 +14,7 @@ typedef union {
        unsigned char cval [8];
 } mono_rdouble;
 
-#if defined(__arm__) && G_BYTE_ORDER == G_LITTLE_ENDIAN
+#ifdef ARM_FPU_FPA
 #define MONO_DOUBLE_ASSERT_ENDIANITY(dbl_ptr) \
        do { \
                mono_rdouble r; \