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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166238
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
+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
#include "cgraph.h"
#include "vecprim.h"
#include "bitmap.h"
+#include "target.h"
#ifdef HAVE_LOCALE_H
#include <locale.h>
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:
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;
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,
}
}
+/* 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
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);