]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
real.c: Avoid parse error if FLOAT_WORDS_BIG_ENDIAN is not a compile-time constant...
authorJason Thorpe <thorpej@wasabisystems.com>
Thu, 5 Sep 2002 16:45:24 +0000 (16:45 +0000)
committerJason Thorpe <thorpej@gcc.gnu.org>
Thu, 5 Sep 2002 16:45:24 +0000 (16:45 +0000)
* real.c: Avoid parse error if FLOAT_WORDS_BIG_ENDIAN is
not a compile-time constant for the non-IBM case.
* config/arm/arm-protos.h (arm_float_words_big_endian): New
prototype.
* config/arm/arm.c (arm_float_words_big_endian): New function.
(TARGET_CPU_CPP_BUILTINS): Define __VFP_FP__ if TARGET_VFP
and not TARGET_HARD_FLOAT.
(ARM_FLAG_VFP, TARGET_VFP): Define.
(FLOAT_WORDS_BIG_ENDIAN): Use arm_float_words_big_endian.

From-SVN: r56854

gcc/ChangeLog
gcc/config/arm/arm-protos.h
gcc/config/arm/arm.c
gcc/real.c

index ae0247fdaf8c039ca3a5100f7e851bb777ddfdf1..962752f940e0629e919ee7dbb63b8ee4bf52f29d 100644 (file)
@@ -1,3 +1,15 @@
+2002-09-05  Jason Thorpe  <thorpej@wasabisystems.com>
+
+       * real.c: Avoid parse error if FLOAT_WORDS_BIG_ENDIAN is
+       not a compile-time constant for the non-IBM case.
+       * config/arm/arm-protos.h (arm_float_words_big_endian): New
+       prototype. 
+       * config/arm/arm.c (arm_float_words_big_endian): New function.
+       (TARGET_CPU_CPP_BUILTINS): Define __VFP_FP__ if TARGET_VFP  
+       and not TARGET_HARD_FLOAT. 
+       (ARM_FLAG_VFP, TARGET_VFP): Define. 
+       (FLOAT_WORDS_BIG_ENDIAN): Use arm_float_words_big_endian.
+
 2002-09-05  David Edelsohn  <edelsohn@gnu.org>
 
        * doc/install.texi: Correct text of s390-*-linux* and s390x-*-linux*
index 6aaa1307857ceaa73eaeafdf6a9b0b0620ceb281..dbd950616c295cf104df1e4e28e5c64e7b208e5e 100644 (file)
@@ -153,6 +153,8 @@ extern void   common_section                PARAMS ((void));
 
 #endif /* RTX_CODE */
 
+extern int    arm_float_words_big_endian PARAMS ((void));
+
 /* Thumb functions.  */
 extern void   arm_init_expanders       PARAMS ((void));
 extern int    thumb_far_jump_used_p    PARAMS ((int));
index 9000cca326b4e8c1fb36e1be0ad35437f4c0d5ae..336f1821bd278ff4483b9b87e7307de89d038069 100644 (file)
@@ -1845,6 +1845,27 @@ arm_return_in_memory (type)
   return 1;
 }
 
+/* Indicate whether or not words of a double are in big-endian order. */
+
+int
+arm_float_words_big_endian ()
+{
+
+  /* For FPA, float words are always big-endian.  For VFP, floats words
+     follow the memory system mode.  */
+
+  if (TARGET_HARD_FLOAT)
+    {
+      /* FIXME: TARGET_HARD_FLOAT currently implies FPA.  */
+      return 1;
+    }
+
+  if (TARGET_VFP)
+    return (TARGET_BIG_END ? 1 : 0);
+
+  return 1;
+}
+
 /* Initialize a variable CUM of type CUMULATIVE_ARGS
    for a call to a function whose data type is FNTYPE.
    For a library call, FNTYPE is NULL.  */
index 077e313f3490a2e2823f4da1e57b2f008b383e6f..0a94c0599e529fd2b692c4656d5e249d30606ff2 100644 (file)
@@ -141,10 +141,12 @@ unknown arithmetic type
 #define VAX_HALFWORD_ORDER 1
 #endif
 #else
-#if defined(IBM) && !REAL_WORDS_BIG_ENDIAN
+#if defined(IBM)
+#if !REAL_WORDS_BIG_ENDIAN
   #error "Little-endian representations are not supported for IBM."
 #endif
 #endif
+#endif
 
 #if defined(DEC) && !defined (TARGET_G_FLOAT)
 #define TARGET_G_FLOAT 0