aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJoern Rennecke <joern.rennecke@embecosm.com>2010-11-03 10:45:40 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2010-11-03 10:45:40 +0000
commit2e681adf5db47a5230dd6159c202f89383f98eff (patch)
tree8b011a627911d0c6c53d5e9ba79752c0b699e5e7 /gcc
parent43236c265b65d3e9447f84272300db648416d37e (diff)
downloadgcc-2e681adf5db47a5230dd6159c202f89383f98eff.zip
gcc-2e681adf5db47a5230dd6159c202f89383f98eff.tar.gz
gcc-2e681adf5db47a5230dd6159c202f89383f98eff.tar.bz2
re PR bootstrap/44335 (gcc-4.6-20100529 java bootstrap failure on arm-linux-gnueabi)
PR bootstrap/44335 gcc: * targhooks.c (targhook_words_big_endian): New function. (targhook_float_words_big_endian): Likewise. * targhooks.h (targhook_words_big_endian): Declare. (targhook_float_words_big_endian): Likewise. * target.def (words_big_endian, float_words_big_endian): New hooks. gcc/java: * jfc-parse.c (target.h): Include. (handle_constant): Use targetm.words_big_endian and targetm.float_words_big_endian. (get_constant): Use targetm.float_words_big_endian. From-SVN: r166238
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/java/ChangeLog8
-rw-r--r--gcc/java/jcf-parse.c7
-rw-r--r--gcc/target.def16
-rw-r--r--gcc/targhooks.c13
-rw-r--r--gcc/targhooks.h2
6 files changed, 52 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0454a9f..1286395 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2010-11-03 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ PR bootstrap/44335
+ * targhooks.c (targhook_words_big_endian): New function.
+ (targhook_float_words_big_endian): Likewise.
+ * targhooks.h (targhook_words_big_endian): Declare.
+ (targhook_float_words_big_endian): Likewise.
+ * target.def (words_big_endian, float_words_big_endian): New hooks.
+
2010-11-03 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/46165
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 41ae31c..ae89444 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,11 @@
+2010-11-03 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ PR bootstrap/44335
+ * jfc-parse.c (target.h): Include.
+ (handle_constant): Use targetm.words_big_endian and
+ targetm.float_words_big_endian.
+ (get_constant): Use targetm.float_words_big_endian.
+
2010-10-13 Richard Henderson <rth@redhat.com>
* lang.c (java_eh_personality): Update call to
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index e6dc44c..30f171c 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -43,6 +43,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "cgraph.h"
#include "vecprim.h"
#include "bitmap.h"
+#include "target.h"
#ifdef HAVE_LOCALE_H
#include <locale.h>
@@ -555,12 +556,12 @@ handle_constant (JCF *jcf, int index, enum cpool_tag purpose)
case CONSTANT_Long:
index = handle_long_constant (jcf, cpool, CONSTANT_Long, index,
- WORDS_BIG_ENDIAN);
+ targetm.words_big_endian ());
break;
case CONSTANT_Double:
index = handle_long_constant (jcf, cpool, CONSTANT_Double, index,
- FLOAT_WORDS_BIG_ENDIAN);
+ targetm.float_words_big_endian ());
break;
case CONSTANT_Float:
@@ -1071,7 +1072,7 @@ get_constant (JCF *jcf, int index)
hi = JPOOL_UINT (jcf, index);
lo = JPOOL_UINT (jcf, index+1);
- if (FLOAT_WORDS_BIG_ENDIAN)
+ if (targetm.float_words_big_endian ())
buf[0] = hi, buf[1] = lo;
else
buf[0] = lo, buf[1] = hi;
diff --git a/gcc/target.def b/gcc/target.def
index 37ba3bc..7947961 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -1141,6 +1141,22 @@ DEFHOOK
bool, (const_tree record_type),
hook_bool_const_tree_false)
+/* For now this is only an interface to WORDS_BIG_ENDIAN for
+ target-independent code like the front ends, need performance testing
+ before switching completely to the target hook. */
+DEFHOOK_UNDOC
+(words_big_endian,
+ "",
+ bool, (void),
+ targhook_words_big_endian)
+
+/* Likewise for FLOAT_WORDS_BIG_ENDIAN. */
+DEFHOOK_UNDOC
+(float_words_big_endian,
+ "",
+ bool, (void),
+ targhook_float_words_big_endian)
+
/* True if the target supports decimal floating point. */
DEFHOOK
(decimal_float_supported_p,
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index 22bba3b..3647436 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -425,6 +425,19 @@ default_scalar_mode_supported_p (enum machine_mode mode)
}
}
+/* Make some target macros useable by target-independent code. */
+bool
+targhook_words_big_endian (void)
+{
+ return !!WORDS_BIG_ENDIAN;
+}
+
+bool
+targhook_float_words_big_endian (void)
+{
+ return !!FLOAT_WORDS_BIG_ENDIAN;
+}
+
/* True if the target supports decimal floating point. */
bool
diff --git a/gcc/targhooks.h b/gcc/targhooks.h
index 8762513..eeefe05 100644
--- a/gcc/targhooks.h
+++ b/gcc/targhooks.h
@@ -68,6 +68,8 @@ extern bool default_print_operand_punct_valid_p (unsigned char);
extern bool default_asm_output_addr_const_extra (FILE *, rtx);
extern bool default_scalar_mode_supported_p (enum machine_mode);
+extern bool targhook_words_big_endian (void);
+extern bool targhook_float_words_big_endian (void);
extern bool default_decimal_float_supported_p (void);
extern bool default_fixed_point_supported_p (void);