aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-devtools/gcc/gcc-4.5.inc13
-rw-r--r--meta-oe/recipes-devtools/gcc/gcc-4.5/gcc-with-linker-hash-style.patch212
-rw-r--r--meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99491.patch309
-rw-r--r--meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99541.patch22
-rw-r--r--meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99548.patch80
-rw-r--r--meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99549.patch460
6 files changed, 760 insertions, 336 deletions
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5.inc b/meta-oe/recipes-devtools/gcc/gcc-4.5.inc
index 579280ff1c..a0c2a7b289 100644
--- a/meta-oe/recipes-devtools/gcc/gcc-4.5.inc
+++ b/meta-oe/recipes-devtools/gcc/gcc-4.5.inc
@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
PV = "4.5"
-PR = "r43"
+PR = "r44"
# BINV should be incremented after updating to a revision
# after a minor gcc release (e.g. 4.5.1 or 4.5.2) has been made
@@ -23,8 +23,7 @@ PR = "r43"
# which will be next minor release and so on.
BINV = "${PV}.4"
-
-SRCREV = 178923
+SRCREV = 181733
BRANCH = "gcc-4_5-branch"
PR_append = "+svnr${SRCPV}"
@@ -179,7 +178,6 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \
file://linaro/gcc-4.5-linaro-r99483.patch \
file://linaro/gcc-4.5-linaro-r99488.patch \
file://linaro/gcc-4.5-linaro-r99489.patch \
- file://linaro/gcc-4.5-linaro-r99491.patch \
file://linaro/gcc-4.5-linaro-r99494.patch \
file://linaro/gcc-4.5-linaro-r99495.patch \
file://linaro/gcc-4.5-linaro-r99498.patch \
@@ -208,7 +206,8 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \
file://linaro/gcc-4.5-linaro-r99536.patch \
file://linaro/gcc-4.5-linaro-r99537.patch \
file://linaro/gcc-4.5-linaro-r99540.patch \
- file://linaro/gcc-4.5-linaro-r99541.patch \
+ file://linaro/gcc-4.5-linaro-r99548.patch \
+ file://linaro/gcc-4.5-linaro-r99549.patch \
\
file://more-epilogues.patch \
file://gcc-scalar-widening-pr45847.patch \
@@ -233,6 +232,7 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \
file://gcc-poison-parameters.patch \
file://gcc-ppc-config-fix.patch \
file://use-defaults.h-and-t-oe-in-B.patch \
+ file://gcc-with-linker-hash-style.patch \
"
# Language Overrides
@@ -252,6 +252,9 @@ EXTRA_OECONF_BASE = "--enable-lto \
--disable-bootstrap \
--disable-libgomp \
--disable-libmudflap \
+ --with-linker-hash-style=${LINKER_HASH_STYLE} \
+ --with-ppl=no \
+ --with-cloog=no \
--enable-cheaders=c_global "
EXTRA_OECONF_INITIAL = "--disable-libmudflap \
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/gcc-with-linker-hash-style.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/gcc-with-linker-hash-style.patch
new file mode 100644
index 0000000000..ac4281ac28
--- /dev/null
+++ b/meta-oe/recipes-devtools/gcc/gcc-4.5/gcc-with-linker-hash-style.patch
@@ -0,0 +1,212 @@
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+commit 3cb9bbfa927aa187048534f9069202c017a78e38
+Author: ppluzhnikov <ppluzhnikov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed May 11 18:28:14 2011 +0000
+
+ 2011-05-11 Satoru Takabayashi <satorux@google.com>
+ Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ * gcc/doc/install.texi (Configuration): Document
+ --with-linker-hash-style.
+ * gcc/gcc.c (init_spec): Handle LINKER_HASH_STYLE.
+ * gcc/config.in: Add LINKER_HASH_STYLE.
+ * gcc/configure.ac: Add --with-linker-hash-style.
+ * gcc/configure: Regenerate.
+
+
+
+ git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173668 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Index: gcc-4_5-branch/gcc/config.in
+===================================================================
+--- gcc-4_5-branch.orig/gcc/config.in 2011-12-03 13:41:00.000000000 -0800
++++ gcc-4_5-branch/gcc/config.in 2011-12-03 13:44:46.287530329 -0800
+@@ -113,6 +113,12 @@
+ #endif
+
+
++/* The linker hash style */
++#ifndef USED_FOR_TARGET
++#undef LINKER_HASH_STYLE
++#endif
++
++
+ /* Define to enable LTO support. */
+ #ifndef USED_FOR_TARGET
+ #undef ENABLE_LTO
+Index: gcc-4_5-branch/gcc/configure
+===================================================================
+--- gcc-4_5-branch.orig/gcc/configure 2011-12-03 13:41:00.000000000 -0800
++++ gcc-4_5-branch/gcc/configure 2011-12-03 13:46:12.747530321 -0800
+@@ -600,6 +600,7 @@
+
+ ac_subst_vars='LTLIBOBJS
+ LIBOBJS
++enable_target_optspace
+ enable_plugin
+ pluginlibs
+ LIBELFINC
+@@ -915,7 +916,7 @@
+ with_slibdir
+ enable_poison_system_directories
+ enable_plugin
+-enable_target_optspace
++with_linker_hash_style
+ '
+ ac_precious_vars='build_alias
+ host_alias
+@@ -1663,6 +1664,8 @@
+ with the compiler
+ --with-system-zlib use installed libz
+ --with-slibdir=DIR shared libraries in DIR [LIBDIR]
++ --with-linker-hash-style={sysv,gnu,both}
++ specify the linker hash style
+
+ Some influential environment variables:
+ CC C compiler command
+@@ -17115,7 +17118,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 17114 "configure"
++#line 17121 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -17221,7 +17224,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 17220 "configure"
++#line 17227 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -25659,12 +25662,42 @@
+
+ fi
+
+-if test x"$enable_target_optspace" != x; then :
++
++if test x"$enable_target_optspace" != x; then
+
+ $as_echo "#define ENABLE_TARGET_OPTSPACE 1" >>confdefs.h
+
+ fi
+
++# Specify what hash style to use by default.
++
++# Check whether --with-linker-hash-style was given.
++if test "${with_linker_hash_style+set}" = set; then :
++ withval=$with_linker_hash_style; case x"$withval" in
++ xsysv)
++ LINKER_HASH_STYLE=sysv
++ ;;
++ xgnu)
++ LINKER_HASH_STYLE=gnu
++ ;;
++ xboth)
++ LINKER_HASH_STYLE=both
++ ;;
++ *)
++ as_fn_error "$withval is an invalid option to --with-linker-hash-style" "$LINENO" 5
++ ;;
++ esac
++else
++ LINKER_HASH_STYLE=''
++fi
++
++if test x"${LINKER_HASH_STYLE}" != x; then
++
++cat >>confdefs.h <<_ACEOF
++#define LINKER_HASH_STYLE "$LINKER_HASH_STYLE"
++_ACEOF
++
++fi
+
+ # Configure the subdirectories
+ # AC_CONFIG_SUBDIRS($subdirs)
+Index: gcc-4_5-branch/gcc/configure.ac
+===================================================================
+--- gcc-4_5-branch.orig/gcc/configure.ac 2011-12-03 13:41:00.000000000 -0800
++++ gcc-4_5-branch/gcc/configure.ac 2011-12-03 13:41:04.499530358 -0800
+@@ -4664,6 +4664,30 @@
+ AC_DEFINE(ENABLE_TARGET_OPTSPACE, 1, [Define to enable target optspace support.])
+ fi
+
++# Specify what hash style to use by default.
++AC_ARG_WITH([linker-hash-style],
++[AC_HELP_STRING([--with-linker-hash-style={sysv,gnu,both}],
++ [specify the linker hash style])],
++[case x"$withval" in
++ xsysv)
++ LINKER_HASH_STYLE=sysv
++ ;;
++ xgnu)
++ LINKER_HASH_STYLE=gnu
++ ;;
++ xboth)
++ LINKER_HASH_STYLE=both
++ ;;
++ *)
++ AC_MSG_ERROR([$withval is an invalid option to --with-linker-hash-style])
++ ;;
++ esac],
++[LINKER_HASH_STYLE=''])
++if test x"${LINKER_HASH_STYLE}" != x; then
++ AC_DEFINE_UNQUOTED(LINKER_HASH_STYLE, "$LINKER_HASH_STYLE",
++ [The linker hash style])
++fi
++
+ # Configure the subdirectories
+ # AC_CONFIG_SUBDIRS($subdirs)
+
+Index: gcc-4_5-branch/gcc/doc/install.texi
+===================================================================
+--- gcc-4_5-branch.orig/gcc/doc/install.texi 2011-12-03 13:15:09.000000000 -0800
++++ gcc-4_5-branch/gcc/doc/install.texi 2011-12-03 13:41:04.499530358 -0800
+@@ -1630,6 +1630,11 @@
+ support @option{--build-id} option, a warning is issued and the
+ @option{--enable-linker-build-id} option is ignored. The default is off.
+
++@item --with-linker-hash-style=@var{choice}
++Tells GCC to pass @option{--hash-style=@var{choice}} option to the
++linker for all final links. @var{choice} can be one of
++@samp{sysv}, @samp{gnu}, and @samp{both} where @samp{sysv} is the default.
++
+ @item --enable-gnu-unique-object
+ @itemx --disable-gnu-unique-object
+ Tells GCC to use the gnu_unique_object relocation for C++ template
+Index: gcc-4_5-branch/gcc/gcc.c
+===================================================================
+--- gcc-4_5-branch.orig/gcc/gcc.c 2011-12-03 13:41:00.000000000 -0800
++++ gcc-4_5-branch/gcc/gcc.c 2011-12-03 13:41:04.499530358 -0800
+@@ -1917,7 +1917,8 @@
+ }
+ #endif
+
+-#if defined LINK_EH_SPEC || defined LINK_BUILDID_SPEC
++#if defined LINK_EH_SPEC || defined LINK_BUILDID_SPEC || \
++ defined LINKER_HASH_STYLE
+ # ifdef LINK_BUILDID_SPEC
+ /* Prepend LINK_BUILDID_SPEC to whatever link_spec we had before. */
+ obstack_grow (&obstack, LINK_BUILDID_SPEC, sizeof(LINK_BUILDID_SPEC) - 1);
+@@ -1926,6 +1927,16 @@
+ /* Prepend LINK_EH_SPEC to whatever link_spec we had before. */
+ obstack_grow (&obstack, LINK_EH_SPEC, sizeof(LINK_EH_SPEC) - 1);
+ # endif
++# ifdef LINKER_HASH_STYLE
++ /* Prepend --hash-style=LINKER_HASH_STYLE to whatever link_spec we had
++ before. */
++ {
++ static const char hash_style[] = "--hash-style=";
++ obstack_grow (&obstack, hash_style, sizeof(hash_style) - 1);
++ obstack_grow (&obstack, LINKER_HASH_STYLE, sizeof(LINKER_HASH_STYLE) - 1);
++ obstack_1grow (&obstack, ' ');
++ }
++# endif
+ obstack_grow0 (&obstack, link_spec, strlen (link_spec));
+ link_spec = XOBFINISH (&obstack, const char *);
+ #endif
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99491.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99491.patch
deleted file mode 100644
index a2d6c6a69a..0000000000
--- a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99491.patch
+++ /dev/null
@@ -1,309 +0,0 @@
-2011-04-08 Richard Sandiford <richard.sandiford@linaro.org>
-
- Backport from mainline:
- gcc/
- * dwarf2out.c (dw_loc_list_node): Add resolved_addr and replaced.
- (cached_dw_loc_list_def): New structure.
- (cached_dw_loc_list): New typedef.
- (cached_dw_loc_list_table): New variable.
- (cached_dw_loc_list_table_hash): New function.
- (cached_dw_loc_list_table_eq): Likewise.
- (add_location_or_const_value_attribute): Take a bool cache_p.
- Cache the list when the parameter is true.
- (gen_formal_parameter_die): Update caller.
- (gen_variable_die): Likewise.
- (dwarf2out_finish): Likewise.
- (dwarf2out_abstract_function): Nullify cached_dw_loc_list_table
- while generating debug info for the decl.
- (dwarf2out_function_decl): Clear cached_dw_loc_list_table.
- (dwarf2out_init): Initialize cached_dw_loc_list_table.
- (resolve_addr): Cache the result of resolving a chain of
- location lists.
-
- From: 2010-10-12 Jakub Jelinek <jakub@redhat.com>
- * dwarf2out.c (dw_loc_list_node): Add emitted field.
- (output_loc_list): Return immediately if emitted is set, set it.
-
-=== modified file 'gcc/dwarf2out.c'
---- old/gcc/dwarf2out.c 2011-03-10 14:55:10 +0000
-+++ new/gcc/dwarf2out.c 2011-03-28 09:43:50 +0000
-@@ -4256,6 +4256,12 @@
- Only on head of list */
- const char *section; /* Section this loclist is relative to */
- dw_loc_descr_ref expr;
-+ /* True if all addresses in this and subsequent lists are known to be
-+ resolved. */
-+ bool resolved_addr;
-+ /* True if this list has been replaced by dw_loc_next. */
-+ bool replaced;
-+ bool emitted;
- } dw_loc_list_node;
-
- #if defined (DWARF2_DEBUGGING_INFO) || defined (DWARF2_UNWIND_INFO)
-@@ -5759,6 +5765,19 @@
- /* Table of decl location linked lists. */
- static GTY ((param_is (var_loc_list))) htab_t decl_loc_table;
-
-+/* A cached location list. */
-+struct GTY (()) cached_dw_loc_list_def {
-+ /* The DECL_UID of the decl that this entry describes. */
-+ unsigned int decl_id;
-+
-+ /* The cached location list. */
-+ dw_loc_list_ref loc_list;
-+};
-+typedef struct cached_dw_loc_list_def cached_dw_loc_list;
-+
-+/* Table of cached location lists. */
-+static GTY ((param_is (cached_dw_loc_list))) htab_t cached_dw_loc_list_table;
-+
- /* A pointer to the base of a list of references to DIE's that
- are uniquely identified by their tag, presence/absence of
- children DIE's, and list of attribute/value pairs. */
-@@ -6112,7 +6131,7 @@
- static void insert_int (HOST_WIDE_INT, unsigned, unsigned char *);
- static void insert_float (const_rtx, unsigned char *);
- static rtx rtl_for_decl_location (tree);
--static bool add_location_or_const_value_attribute (dw_die_ref, tree,
-+static bool add_location_or_const_value_attribute (dw_die_ref, tree, bool,
- enum dwarf_attribute);
- static bool tree_add_const_value_attribute (dw_die_ref, tree);
- static bool tree_add_const_value_attribute_for_decl (dw_die_ref, tree);
-@@ -7731,6 +7750,24 @@
- htab_find_with_hash (decl_loc_table, decl, DECL_UID (decl));
- }
-
-+/* Returns a hash value for X (which really is a cached_dw_loc_list_list). */
-+
-+static hashval_t
-+cached_dw_loc_list_table_hash (const void *x)
-+{
-+ return (hashval_t) ((const cached_dw_loc_list *) x)->decl_id;
-+}
-+
-+/* Return nonzero if decl_id of cached_dw_loc_list X is the same as
-+ UID of decl *Y. */
-+
-+static int
-+cached_dw_loc_list_table_eq (const void *x, const void *y)
-+{
-+ return (((const cached_dw_loc_list *) x)->decl_id
-+ == DECL_UID ((const_tree) y));
-+}
-+
- /* Equate a DIE to a particular declaration. */
-
- static void
-@@ -10355,6 +10392,10 @@
- {
- dw_loc_list_ref curr = list_head;
-
-+ if (list_head->emitted)
-+ return;
-+ list_head->emitted = true;
-+
- ASM_OUTPUT_LABEL (asm_out_file, list_head->ll_symbol);
-
- /* Walk the location list, and output each range + expression. */
-@@ -15920,15 +15961,22 @@
- these things can crop up in other ways also.) Note that one type of
- constant value which can be passed into an inlined function is a constant
- pointer. This can happen for example if an actual argument in an inlined
-- function call evaluates to a compile-time constant address. */
-+ function call evaluates to a compile-time constant address.
-+
-+ CACHE_P is true if it is worth caching the location list for DECL,
-+ so that future calls can reuse it rather than regenerate it from scratch.
-+ This is true for BLOCK_NONLOCALIZED_VARS in inlined subroutines,
-+ since we will need to refer to them each time the function is inlined. */
-
- static bool
--add_location_or_const_value_attribute (dw_die_ref die, tree decl,
-+add_location_or_const_value_attribute (dw_die_ref die, tree decl, bool cache_p,
- enum dwarf_attribute attr)
- {
- rtx rtl;
- dw_loc_list_ref list;
- var_loc_list *loc_list;
-+ cached_dw_loc_list *cache;
-+ void **slot;
-
- if (TREE_CODE (decl) == ERROR_MARK)
- return false;
-@@ -15964,7 +16012,34 @@
- && add_const_value_attribute (die, rtl))
- return true;
- }
-- list = loc_list_from_tree (decl, decl_by_reference_p (decl) ? 0 : 2);
-+ /* If this decl is from BLOCK_NONLOCALIZED_VARS, we might need its
-+ list several times. See if we've already cached the contents. */
-+ list = NULL;
-+ if (loc_list == NULL || cached_dw_loc_list_table == NULL)
-+ cache_p = false;
-+ if (cache_p)
-+ {
-+ cache = (cached_dw_loc_list *)
-+ htab_find_with_hash (cached_dw_loc_list_table, decl, DECL_UID (decl));
-+ if (cache)
-+ list = cache->loc_list;
-+ }
-+ if (list == NULL)
-+ {
-+ list = loc_list_from_tree (decl, decl_by_reference_p (decl) ? 0 : 2);
-+ /* It is usually worth caching this result if the decl is from
-+ BLOCK_NONLOCALIZED_VARS and if the list has at least two elements. */
-+ if (cache_p && list && list->dw_loc_next)
-+ {
-+ slot = htab_find_slot_with_hash (cached_dw_loc_list_table, decl,
-+ DECL_UID (decl), INSERT);
-+ cache = (cached_dw_loc_list *)
-+ ggc_alloc_cleared (sizeof (cached_dw_loc_list));
-+ cache->decl_id = DECL_UID (decl);
-+ cache->loc_list = list;
-+ *slot = cache;
-+ }
-+ }
- if (list)
- {
- add_AT_location_description (die, attr, list);
-@@ -17532,7 +17607,7 @@
- equate_decl_number_to_die (node, parm_die);
- if (! DECL_ABSTRACT (node_or_origin))
- add_location_or_const_value_attribute (parm_die, node_or_origin,
-- DW_AT_location);
-+ node == NULL, DW_AT_location);
-
- break;
-
-@@ -17712,6 +17787,7 @@
- tree context;
- int was_abstract;
- htab_t old_decl_loc_table;
-+ htab_t old_cached_dw_loc_list_table;
-
- /* Make sure we have the actual abstract inline, not a clone. */
- decl = DECL_ORIGIN (decl);
-@@ -17725,7 +17801,9 @@
- DIE. Be sure to not clobber the outer location table nor use it or we would
- get locations in abstract instantces. */
- old_decl_loc_table = decl_loc_table;
-+ old_cached_dw_loc_list_table = cached_dw_loc_list_table;
- decl_loc_table = NULL;
-+ cached_dw_loc_list_table = NULL;
-
- /* Be sure we've emitted the in-class declaration DIE (if any) first, so
- we don't get confused by DECL_ABSTRACT. */
-@@ -17750,6 +17828,7 @@
-
- current_function_decl = save_fn;
- decl_loc_table = old_decl_loc_table;
-+ cached_dw_loc_list_table = old_cached_dw_loc_list_table;
- pop_cfun ();
- }
-
-@@ -18431,9 +18510,8 @@
- && !TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl_or_origin)))
- defer_location (decl_or_origin, var_die);
- else
-- add_location_or_const_value_attribute (var_die,
-- decl_or_origin,
-- DW_AT_location);
-+ add_location_or_const_value_attribute (var_die, decl_or_origin,
-+ decl == NULL, DW_AT_location);
- add_pubname (decl_or_origin, var_die);
- }
- else
-@@ -20049,6 +20127,7 @@
- dwarf2out_decl (decl);
-
- htab_empty (decl_loc_table);
-+ htab_empty (cached_dw_loc_list_table);
- }
-
- /* Output a marker (i.e. a label) for the beginning of the generated code for
-@@ -20649,6 +20728,11 @@
- decl_loc_table = htab_create_ggc (10, decl_loc_table_hash,
- decl_loc_table_eq, NULL);
-
-+ /* Allocate the cached_dw_loc_list_table. */
-+ cached_dw_loc_list_table
-+ = htab_create_ggc (10, cached_dw_loc_list_table_hash,
-+ cached_dw_loc_list_table_eq, NULL);
-+
- /* Allocate the initial hunk of the decl_scope_table. */
- decl_scope_table = VEC_alloc (tree, gc, 256);
-
-@@ -21278,30 +21362,53 @@
- {
- dw_die_ref c;
- dw_attr_ref a;
-- dw_loc_list_ref *curr;
-+ dw_loc_list_ref *curr, *start, loc;
- unsigned ix;
-
- for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++)
- switch (AT_class (a))
- {
- case dw_val_class_loc_list:
-- curr = AT_loc_list_ptr (a);
-- while (*curr)
-+ start = curr = AT_loc_list_ptr (a);
-+ loc = *curr;
-+ gcc_assert (loc);
-+ /* The same list can be referenced more than once. See if we have
-+ already recorded the result from a previous pass. */
-+ if (loc->replaced)
-+ *curr = loc->dw_loc_next;
-+ else if (!loc->resolved_addr)
- {
-- if (!resolve_addr_in_expr ((*curr)->expr))
-+ /* As things stand, we do not expect or allow one die to
-+ reference a suffix of another die's location list chain.
-+ References must be identical or completely separate.
-+ There is therefore no need to cache the result of this
-+ pass on any list other than the first; doing so
-+ would lead to unnecessary writes. */
-+ while (*curr)
- {
-- dw_loc_list_ref next = (*curr)->dw_loc_next;
-- if (next && (*curr)->ll_symbol)
-+ gcc_assert (!(*curr)->replaced && !(*curr)->resolved_addr);
-+ if (!resolve_addr_in_expr ((*curr)->expr))
- {
-- gcc_assert (!next->ll_symbol);
-- next->ll_symbol = (*curr)->ll_symbol;
-+ dw_loc_list_ref next = (*curr)->dw_loc_next;
-+ if (next && (*curr)->ll_symbol)
-+ {
-+ gcc_assert (!next->ll_symbol);
-+ next->ll_symbol = (*curr)->ll_symbol;
-+ }
-+ *curr = next;
- }
-- *curr = next;
-+ else
-+ curr = &(*curr)->dw_loc_next;
- }
-+ if (loc == *start)
-+ loc->resolved_addr = 1;
- else
-- curr = &(*curr)->dw_loc_next;
-+ {
-+ loc->replaced = 1;
-+ loc->dw_loc_next = *start;
-+ }
- }
-- if (!AT_loc_list (a))
-+ if (!*start)
- {
- remove_AT (die, a->dw_attr);
- ix--;
-@@ -21361,6 +21468,7 @@
- add_location_or_const_value_attribute (
- VEC_index (deferred_locations, deferred_locations_list, i)->die,
- VEC_index (deferred_locations, deferred_locations_list, i)->variable,
-+ false,
- DW_AT_location);
- }
-
-
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99541.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99541.patch
deleted file mode 100644
index ae0e4bcd35..0000000000
--- a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99541.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-2011-09-12 Richard Sandiford <richard.sandiford@linaro.org>
-
- gcc/
- Backport from mainline:
-
- 2010-12-06 Jakub Jelinek <jakub@redhat.com>
-
- PR debug/46771
- * reginfo.c (init_subregs_of_mode): Don't call find_subregs_of_mode
- on DEBUG_INSNs.
-
-=== modified file 'gcc/reginfo.c'
---- old/gcc/reginfo.c 2010-10-04 00:50:43 +0000
-+++ new/gcc/reginfo.c 2011-09-12 10:54:51 +0000
-@@ -1350,7 +1350,7 @@
-
- FOR_EACH_BB (bb)
- FOR_BB_INSNS (bb, insn)
-- if (INSN_P (insn))
-+ if (NONDEBUG_INSN_P (insn))
- find_subregs_of_mode (PATTERN (insn));
- }
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99548.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99548.patch
new file mode 100644
index 0000000000..b78319e8fa
--- /dev/null
+++ b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99548.patch
@@ -0,0 +1,80 @@
+2011-09-22 Revital Eres <revital.eres@linaro.org>
+
+ gcc/
+ Backport from trunk -r178804:
+ modulo-sched.c (remove_node_from_ps): Return void
+ instead of bool.
+ (optimize_sc): Adjust call to remove_node_from_ps.
+ (sms_schedule): Add print info.
+
+=== modified file 'gcc/modulo-sched.c'
+--- old/gcc/modulo-sched.c 2011-08-09 04:31:10 +0000
++++ new/gcc/modulo-sched.c 2011-09-22 13:58:43 +0000
+@@ -211,7 +211,7 @@
+ static bool try_scheduling_node_in_cycle (partial_schedule_ptr, ddg_node_ptr,
+ int, int, sbitmap, int *, sbitmap,
+ sbitmap);
+-static bool remove_node_from_ps (partial_schedule_ptr, ps_insn_ptr);
++static void remove_node_from_ps (partial_schedule_ptr, ps_insn_ptr);
+
+ #define SCHED_ASAP(x) (((node_sched_params_ptr)(x)->aux.info)->asap)
+ #define SCHED_TIME(x) (((node_sched_params_ptr)(x)->aux.info)->time)
+@@ -834,8 +834,7 @@
+ if (next_ps_i->node->cuid == g->closing_branch->cuid)
+ break;
+
+- gcc_assert (next_ps_i);
+- gcc_assert (remove_node_from_ps (ps, next_ps_i));
++ remove_node_from_ps (ps, next_ps_i);
+ success =
+ try_scheduling_node_in_cycle (ps, g->closing_branch,
+ g->closing_branch->cuid, c,
+@@ -1485,8 +1484,8 @@
+ if (dump_file)
+ {
+ fprintf (dump_file,
+- "SMS succeeded %d %d (with ii, sc)\n", ps->ii,
+- stage_count);
++ "%s:%d SMS succeeded %d %d (with ii, sc)\n",
++ insn_file (tail), insn_line (tail), ps->ii, stage_count);
+ print_partial_schedule (ps, dump_file);
+ }
+
+@@ -2810,22 +2809,18 @@
+ }
+
+
+-/* Removes the given PS_INSN from the partial schedule. Returns false if the
+- node is not found in the partial schedule, else returns true. */
+-static bool
++/* Removes the given PS_INSN from the partial schedule. */
++static void
+ remove_node_from_ps (partial_schedule_ptr ps, ps_insn_ptr ps_i)
+ {
+ int row;
+
+- if (!ps || !ps_i)
+- return false;
+-
++ gcc_assert (ps && ps_i);
++
+ row = SMODULO (ps_i->cycle, ps->ii);
+ if (! ps_i->prev_in_row)
+ {
+- if (ps_i != ps->rows[row])
+- return false;
+-
++ gcc_assert (ps_i == ps->rows[row]);
+ ps->rows[row] = ps_i->next_in_row;
+ if (ps->rows[row])
+ ps->rows[row]->prev_in_row = NULL;
+@@ -2839,7 +2834,7 @@
+
+ ps->rows_length[row] -= 1;
+ free (ps_i);
+- return true;
++ return;
+ }
+
+ /* Unlike what literature describes for modulo scheduling (which focuses
+
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99549.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99549.patch
new file mode 100644
index 0000000000..43617024a1
--- /dev/null
+++ b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99549.patch
@@ -0,0 +1,460 @@
+2011-10-03 Richard Sandiford <richard.sandiford@linaro.org>
+
+ gcc/
+ Backport from mainline:
+
+ 2010-12-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/46771
+ * reginfo.c (init_subregs_of_mode): Don't call find_subregs_of_mode
+ on DEBUG_INSNs.
+
+2011-10-03 Richard Sandiford <richard.sandiford@linaro.org>
+
+ gcc/
+ Backport from mainline:
+
+ 2011-09-22 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * config/arm/predicates.md (expandable_comparison_operator): New
+ predicate, extracted from...
+ (arm_comparison_operator): ...here.
+ * config/arm/arm.md (cbranchsi4, cbranchsf4, cbranchdf4, cbranchdi4)
+ (cstoresi4, cstoresf4, cstoredf4, cstoredi4, movsicc, movsfcc)
+ (movdfcc): Use expandable_comparison_operator.
+
+ gcc/testsuite/
+ Backport from mainline:
+
+ 2011-09-22 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * gcc.target/arm/cmp-1.c: New test.
+ * gcc.target/arm/cmp-2.c: Likewise.
+
+2011-10-03 Richard Sandiford <richard.sandiford@linaro.org>
+
+ gcc/
+ Backport from mainline:
+
+ 2011-09-07 Richard Sandiford <richard.sandiford@linaro.org>
+
+ PR target/49030
+ * config/arm/arm-protos.h (maybe_get_arm_condition_code): Declare.
+ * config/arm/arm.c (maybe_get_arm_condition_code): New function,
+ reusing the old code from get_arm_condition_code. Return ARM_NV
+ for invalid comparison codes.
+ (get_arm_condition_code): Redefine in terms of
+ maybe_get_arm_condition_code.
+ * config/arm/predicates.md (arm_comparison_operator): Use
+ maybe_get_arm_condition_code.
+
+ gcc/testsuite/
+ Backport from mainline:
+
+ 2011-09-07 Richard Sandiford <richard.sandiford@linaro.org>
+
+ PR target/49030
+ * gcc.dg/torture/pr49030.c: New test.
+
+=== modified file 'gcc/config/arm/arm-protos.h'
+--- old/gcc/config/arm/arm-protos.h 2011-09-15 10:06:35 +0000
++++ new/gcc/config/arm/arm-protos.h 2011-10-03 10:09:06 +0000
+@@ -182,6 +182,7 @@
+ #endif
+ extern int thumb_shiftable_const (unsigned HOST_WIDE_INT);
+ #ifdef RTX_CODE
++extern enum arm_cond_code maybe_get_arm_condition_code (rtx);
+ extern void thumb1_final_prescan_insn (rtx);
+ extern void thumb2_final_prescan_insn (rtx);
+ extern const char *thumb_load_double_from_address (rtx *);
+
+=== modified file 'gcc/config/arm/arm.c'
+--- old/gcc/config/arm/arm.c 2011-09-15 10:06:35 +0000
++++ new/gcc/config/arm/arm.c 2011-10-03 10:09:06 +0000
+@@ -17196,10 +17196,10 @@
+ decremented/zeroed by arm_asm_output_opcode as the insns are output. */
+
+ /* Returns the index of the ARM condition code string in
+- `arm_condition_codes'. COMPARISON should be an rtx like
+- `(eq (...) (...))'. */
+-static enum arm_cond_code
+-get_arm_condition_code (rtx comparison)
++ `arm_condition_codes', or ARM_NV if the comparison is invalid.
++ COMPARISON should be an rtx like `(eq (...) (...))'. */
++enum arm_cond_code
++maybe_get_arm_condition_code (rtx comparison)
+ {
+ enum machine_mode mode = GET_MODE (XEXP (comparison, 0));
+ enum arm_cond_code code;
+@@ -17223,11 +17223,11 @@
+ case CC_DLTUmode: code = ARM_CC;
+
+ dominance:
+- gcc_assert (comp_code == EQ || comp_code == NE);
+-
+ if (comp_code == EQ)
+ return ARM_INVERSE_CONDITION_CODE (code);
+- return code;
++ if (comp_code == NE)
++ return code;
++ return ARM_NV;
+
+ case CC_NOOVmode:
+ switch (comp_code)
+@@ -17236,7 +17236,7 @@
+ case EQ: return ARM_EQ;
+ case GE: return ARM_PL;
+ case LT: return ARM_MI;
+- default: gcc_unreachable ();
++ default: return ARM_NV;
+ }
+
+ case CC_Zmode:
+@@ -17244,7 +17244,7 @@
+ {
+ case NE: return ARM_NE;
+ case EQ: return ARM_EQ;
+- default: gcc_unreachable ();
++ default: return ARM_NV;
+ }
+
+ case CC_Nmode:
+@@ -17252,7 +17252,7 @@
+ {
+ case NE: return ARM_MI;
+ case EQ: return ARM_PL;
+- default: gcc_unreachable ();
++ default: return ARM_NV;
+ }
+
+ case CCFPEmode:
+@@ -17277,7 +17277,7 @@
+ /* UNEQ and LTGT do not have a representation. */
+ case UNEQ: /* Fall through. */
+ case LTGT: /* Fall through. */
+- default: gcc_unreachable ();
++ default: return ARM_NV;
+ }
+
+ case CC_SWPmode:
+@@ -17293,7 +17293,7 @@
+ case GTU: return ARM_CC;
+ case LEU: return ARM_CS;
+ case LTU: return ARM_HI;
+- default: gcc_unreachable ();
++ default: return ARM_NV;
+ }
+
+ case CC_Cmode:
+@@ -17301,7 +17301,7 @@
+ {
+ case LTU: return ARM_CS;
+ case GEU: return ARM_CC;
+- default: gcc_unreachable ();
++ default: return ARM_NV;
+ }
+
+ case CC_CZmode:
+@@ -17313,7 +17313,7 @@
+ case GTU: return ARM_HI;
+ case LEU: return ARM_LS;
+ case LTU: return ARM_CC;
+- default: gcc_unreachable ();
++ default: return ARM_NV;
+ }
+
+ case CC_NCVmode:
+@@ -17323,7 +17323,7 @@
+ case LT: return ARM_LT;
+ case GEU: return ARM_CS;
+ case LTU: return ARM_CC;
+- default: gcc_unreachable ();
++ default: return ARM_NV;
+ }
+
+ case CCmode:
+@@ -17339,13 +17339,22 @@
+ case GTU: return ARM_HI;
+ case LEU: return ARM_LS;
+ case LTU: return ARM_CC;
+- default: gcc_unreachable ();
++ default: return ARM_NV;
+ }
+
+ default: gcc_unreachable ();
+ }
+ }
+
++/* Like maybe_get_arm_condition_code, but never return ARM_NV. */
++static enum arm_cond_code
++get_arm_condition_code (rtx comparison)
++{
++ enum arm_cond_code code = maybe_get_arm_condition_code (comparison);
++ gcc_assert (code != ARM_NV);
++ return code;
++}
++
+ /* Tell arm_asm_output_opcode to output IT blocks for conditionally executed
+ instructions. */
+ void
+
+=== modified file 'gcc/config/arm/arm.md'
+--- old/gcc/config/arm/arm.md 2011-07-12 16:35:20 +0000
++++ new/gcc/config/arm/arm.md 2011-10-03 10:09:55 +0000
+@@ -6428,7 +6428,7 @@
+
+ (define_expand "cbranchsi4"
+ [(set (pc) (if_then_else
+- (match_operator 0 "arm_comparison_operator"
++ (match_operator 0 "expandable_comparison_operator"
+ [(match_operand:SI 1 "s_register_operand" "")
+ (match_operand:SI 2 "nonmemory_operand" "")])
+ (label_ref (match_operand 3 "" ""))
+@@ -6479,7 +6479,7 @@
+
+ (define_expand "cbranchsf4"
+ [(set (pc) (if_then_else
+- (match_operator 0 "arm_comparison_operator"
++ (match_operator 0 "expandable_comparison_operator"
+ [(match_operand:SF 1 "s_register_operand" "")
+ (match_operand:SF 2 "arm_float_compare_operand" "")])
+ (label_ref (match_operand 3 "" ""))
+@@ -6491,7 +6491,7 @@
+
+ (define_expand "cbranchdf4"
+ [(set (pc) (if_then_else
+- (match_operator 0 "arm_comparison_operator"
++ (match_operator 0 "expandable_comparison_operator"
+ [(match_operand:DF 1 "s_register_operand" "")
+ (match_operand:DF 2 "arm_float_compare_operand" "")])
+ (label_ref (match_operand 3 "" ""))
+@@ -6503,7 +6503,7 @@
+
+ (define_expand "cbranchdi4"
+ [(set (pc) (if_then_else
+- (match_operator 0 "arm_comparison_operator"
++ (match_operator 0 "expandable_comparison_operator"
+ [(match_operand:DI 1 "cmpdi_operand" "")
+ (match_operand:DI 2 "cmpdi_operand" "")])
+ (label_ref (match_operand 3 "" ""))
+@@ -7898,7 +7898,7 @@
+
+ (define_expand "cstoresi4"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+- (match_operator:SI 1 "arm_comparison_operator"
++ (match_operator:SI 1 "expandable_comparison_operator"
+ [(match_operand:SI 2 "s_register_operand" "")
+ (match_operand:SI 3 "reg_or_int_operand" "")]))]
+ "TARGET_32BIT || TARGET_THUMB1"
+@@ -8034,7 +8034,7 @@
+
+ (define_expand "cstoresf4"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+- (match_operator:SI 1 "arm_comparison_operator"
++ (match_operator:SI 1 "expandable_comparison_operator"
+ [(match_operand:SF 2 "s_register_operand" "")
+ (match_operand:SF 3 "arm_float_compare_operand" "")]))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT"
+@@ -8044,7 +8044,7 @@
+
+ (define_expand "cstoredf4"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+- (match_operator:SI 1 "arm_comparison_operator"
++ (match_operator:SI 1 "expandable_comparison_operator"
+ [(match_operand:DF 2 "s_register_operand" "")
+ (match_operand:DF 3 "arm_float_compare_operand" "")]))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && !TARGET_VFP_SINGLE"
+@@ -8054,7 +8054,7 @@
+
+ (define_expand "cstoredi4"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+- (match_operator:SI 1 "arm_comparison_operator"
++ (match_operator:SI 1 "expandable_comparison_operator"
+ [(match_operand:DI 2 "cmpdi_operand" "")
+ (match_operand:DI 3 "cmpdi_operand" "")]))]
+ "TARGET_32BIT"
+@@ -8174,7 +8174,7 @@
+
+ (define_expand "movsicc"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+- (if_then_else:SI (match_operand 1 "arm_comparison_operator" "")
++ (if_then_else:SI (match_operand 1 "expandable_comparison_operator" "")
+ (match_operand:SI 2 "arm_not_operand" "")
+ (match_operand:SI 3 "arm_not_operand" "")))]
+ "TARGET_32BIT"
+@@ -8194,7 +8194,7 @@
+
+ (define_expand "movsfcc"
+ [(set (match_operand:SF 0 "s_register_operand" "")
+- (if_then_else:SF (match_operand 1 "arm_comparison_operator" "")
++ (if_then_else:SF (match_operand 1 "expandable_comparison_operator" "")
+ (match_operand:SF 2 "s_register_operand" "")
+ (match_operand:SF 3 "nonmemory_operand" "")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT"
+@@ -8220,7 +8220,7 @@
+
+ (define_expand "movdfcc"
+ [(set (match_operand:DF 0 "s_register_operand" "")
+- (if_then_else:DF (match_operand 1 "arm_comparison_operator" "")
++ (if_then_else:DF (match_operand 1 "expandable_comparison_operator" "")
+ (match_operand:DF 2 "s_register_operand" "")
+ (match_operand:DF 3 "arm_float_add_operand" "")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP_DOUBLE)"
+
+=== modified file 'gcc/config/arm/predicates.md'
+--- old/gcc/config/arm/predicates.md 2011-09-15 10:06:35 +0000
++++ new/gcc/config/arm/predicates.md 2011-10-03 10:09:55 +0000
+@@ -236,11 +236,15 @@
+
+ ;; True for integer comparisons and, if FP is active, for comparisons
+ ;; other than LTGT or UNEQ.
++(define_special_predicate "expandable_comparison_operator"
++ (match_code "eq,ne,le,lt,ge,gt,geu,gtu,leu,ltu,
++ unordered,ordered,unlt,unle,unge,ungt"))
++
++;; Likewise, but only accept comparisons that are directly supported
++;; by ARM condition codes.
+ (define_special_predicate "arm_comparison_operator"
+- (ior (match_code "eq,ne,le,lt,ge,gt,geu,gtu,leu,ltu")
+- (and (match_test "TARGET_32BIT && TARGET_HARD_FLOAT
+- && (TARGET_FPA || TARGET_VFP)")
+- (match_code "unordered,ordered,unlt,unle,unge,ungt"))))
++ (and (match_operand 0 "expandable_comparison_operator")
++ (match_test "maybe_get_arm_condition_code (op) != ARM_NV")))
+
+ (define_special_predicate "lt_ge_comparison_operator"
+ (match_code "lt,ge"))
+
+=== modified file 'gcc/reginfo.c'
+--- old/gcc/reginfo.c 2011-09-15 10:06:35 +0000
++++ new/gcc/reginfo.c 2011-10-03 10:10:17 +0000
+@@ -1350,7 +1350,7 @@
+
+ FOR_EACH_BB (bb)
+ FOR_BB_INSNS (bb, insn)
+- if (INSN_P (insn))
++ if (NONDEBUG_INSN_P (insn))
+ find_subregs_of_mode (PATTERN (insn));
+ }
+
+
+=== added file 'gcc/testsuite/gcc.dg/torture/pr49030.c'
+--- old/gcc/testsuite/gcc.dg/torture/pr49030.c 1970-01-01 00:00:00 +0000
++++ new/gcc/testsuite/gcc.dg/torture/pr49030.c 2011-10-03 10:09:06 +0000
+@@ -0,0 +1,19 @@
++void
++sample_move_d32u24_sS (char *dst, float *src, unsigned long nsamples,
++ unsigned long dst_skip)
++{
++ long long y;
++ while (nsamples--)
++ {
++ y = (long long) (*src * 8388608.0f) << 8;
++ if (y > 2147483647) {
++ *(int *) dst = 2147483647;
++ } else if (y < -2147483647 - 1) {
++ *(int *) dst = -2147483647 - 1;
++ } else {
++ *(int *) dst = (int) y;
++ }
++ dst += dst_skip;
++ src++;
++ }
++}
+
+=== added file 'gcc/testsuite/gcc.target/arm/cmp-1.c'
+--- old/gcc/testsuite/gcc.target/arm/cmp-1.c 1970-01-01 00:00:00 +0000
++++ new/gcc/testsuite/gcc.target/arm/cmp-1.c 2011-10-03 10:09:55 +0000
+@@ -0,0 +1,37 @@
++/* { dg-do compile } */
++/* { dg-options "-O" } */
++/* { dg-final { scan-assembler-not "\tbl\t" } } */
++/* { dg-final { scan-assembler-not "__aeabi" } } */
++int x, y;
++
++#define TEST_EXPR(NAME, ARGS, EXPR) \
++ int NAME##1 ARGS { return (EXPR); } \
++ int NAME##2 ARGS { return !(EXPR); } \
++ int NAME##3 ARGS { return (EXPR) ? x : y; } \
++ void NAME##4 ARGS { if (EXPR) x++; } \
++ void NAME##5 ARGS { if (!(EXPR)) x++; }
++
++#define TEST(NAME, TYPE, OPERATOR) \
++ TEST_EXPR (NAME##_rr, (TYPE a1, TYPE a2), a1 OPERATOR a2) \
++ TEST_EXPR (NAME##_rm, (TYPE a1, TYPE *a2), a1 OPERATOR *a2) \
++ TEST_EXPR (NAME##_mr, (TYPE *a1, TYPE a2), *a1 OPERATOR a2) \
++ TEST_EXPR (NAME##_mm, (TYPE *a1, TYPE *a2), *a1 OPERATOR *a2) \
++ TEST_EXPR (NAME##_rc, (TYPE a1), a1 OPERATOR 100) \
++ TEST_EXPR (NAME##_cr, (TYPE a1), 100 OPERATOR a1)
++
++#define TEST_OP(NAME, OPERATOR) \
++ TEST (sc_##NAME, signed char, OPERATOR) \
++ TEST (uc_##NAME, unsigned char, OPERATOR) \
++ TEST (ss_##NAME, short, OPERATOR) \
++ TEST (us_##NAME, unsigned short, OPERATOR) \
++ TEST (si_##NAME, int, OPERATOR) \
++ TEST (ui_##NAME, unsigned int, OPERATOR) \
++ TEST (sll_##NAME, long long, OPERATOR) \
++ TEST (ull_##NAME, unsigned long long, OPERATOR)
++
++TEST_OP (eq, ==)
++TEST_OP (ne, !=)
++TEST_OP (lt, <)
++TEST_OP (gt, >)
++TEST_OP (le, <=)
++TEST_OP (ge, >=)
+
+=== added file 'gcc/testsuite/gcc.target/arm/cmp-2.c'
+--- old/gcc/testsuite/gcc.target/arm/cmp-2.c 1970-01-01 00:00:00 +0000
++++ new/gcc/testsuite/gcc.target/arm/cmp-2.c 2011-10-03 10:09:55 +0000
+@@ -0,0 +1,49 @@
++/* { dg-do compile } */
++/* { dg-require-effective-target arm_vfp_ok } */
++/* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */
++/* { dg-options "-O -mfpu=vfp -mfloat-abi=softfp" } */
++/* { dg-final { scan-assembler-not "\tbl\t" } } */
++/* { dg-final { scan-assembler-not "__aeabi" } } */
++int x, y;
++
++#define EQ(X, Y) ((X) == (Y))
++#define NE(X, Y) ((X) != (Y))
++#define LT(X, Y) ((X) < (Y))
++#define GT(X, Y) ((X) > (Y))
++#define LE(X, Y) ((X) <= (Y))
++#define GE(X, Y) ((X) >= (Y))
++
++#define TEST_EXPR(NAME, ARGS, EXPR) \
++ int NAME##1 ARGS { return (EXPR); } \
++ int NAME##2 ARGS { return !(EXPR); } \
++ int NAME##3 ARGS { return (EXPR) ? x : y; } \
++ void NAME##4 ARGS { if (EXPR) x++; } \
++ void NAME##5 ARGS { if (!(EXPR)) x++; }
++
++#define TEST(NAME, TYPE, OPERATOR) \
++ TEST_EXPR (NAME##_rr, (TYPE a1, TYPE a2), OPERATOR (a1, a2)) \
++ TEST_EXPR (NAME##_rm, (TYPE a1, TYPE *a2), OPERATOR (a1, *a2)) \
++ TEST_EXPR (NAME##_mr, (TYPE *a1, TYPE a2), OPERATOR (*a1, a2)) \
++ TEST_EXPR (NAME##_mm, (TYPE *a1, TYPE *a2), OPERATOR (*a1, *a2)) \
++ TEST_EXPR (NAME##_rc, (TYPE a1), OPERATOR (a1, 100)) \
++ TEST_EXPR (NAME##_cr, (TYPE a1), OPERATOR (100, a1))
++
++#define TEST_OP(NAME, OPERATOR) \
++ TEST (f_##NAME, float, OPERATOR) \
++ TEST (d_##NAME, double, OPERATOR) \
++ TEST (ld_##NAME, long double, OPERATOR)
++
++TEST_OP (eq, EQ)
++TEST_OP (ne, NE)
++TEST_OP (lt, LT)
++TEST_OP (gt, GT)
++TEST_OP (le, LE)
++TEST_OP (ge, GE)
++TEST_OP (blt, __builtin_isless)
++TEST_OP (bgt, __builtin_isgreater)
++TEST_OP (ble, __builtin_islessequal)
++TEST_OP (bge, __builtin_isgreaterequal)
++/* This one should be expanded into separate ordered and equality
++ comparisons. */
++TEST_OP (blg, __builtin_islessgreater)
++TEST_OP (bun, __builtin_isunordered)
+