aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Thorpe <thorpej@wasabisystems.com>2002-09-05 16:45:24 +0000
committerJason Thorpe <thorpej@gcc.gnu.org>2002-09-05 16:45:24 +0000
commit3717da940a1fd923eb39014ca383877a25f8abd9 (patch)
tree70329ae1dde96296047c6f28b8b0a2e52b164a39
parentdf4c36e62da882bddf3969fc1c2daad8e6b13c47 (diff)
downloadgcc-3717da940a1fd923eb39014ca383877a25f8abd9.zip
gcc-3717da940a1fd923eb39014ca383877a25f8abd9.tar.gz
gcc-3717da940a1fd923eb39014ca383877a25f8abd9.tar.bz2
real.c: Avoid parse error if FLOAT_WORDS_BIG_ENDIAN is not a compile-time constant for...
* 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
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/config/arm/arm-protos.h2
-rw-r--r--gcc/config/arm/arm.c21
-rw-r--r--gcc/real.c4
4 files changed, 38 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ae0247f..962752f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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*
diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h
index 6aaa130..dbd9506 100644
--- a/gcc/config/arm/arm-protos.h
+++ b/gcc/config/arm/arm-protos.h
@@ -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));
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 9000cca..336f182 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -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. */
diff --git a/gcc/real.c b/gcc/real.c
index 077e313..0a94c05 100644
--- a/gcc/real.c
+++ b/gcc/real.c
@@ -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