summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0365-gcc.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-06-12 20:56:57 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-14 14:37:31 +0100
commit3968f33b6542cf20cf63cf49bfbc033bd2486295 (patch)
tree2bdb5e2f692a3bd3ecadbf2b4c7dc9f54485c737 /meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0365-gcc.patch
parent022ca1d1357caafdfe23aa9ab82f90ba89b6942b (diff)
downloadopenembedded-core-3968f33b6542cf20cf63cf49bfbc033bd2486295.tar.gz
openembedded-core-3968f33b6542cf20cf63cf49bfbc033bd2486295.tar.bz2
openembedded-core-3968f33b6542cf20cf63cf49bfbc033bd2486295.tar.xz
openembedded-core-3968f33b6542cf20cf63cf49bfbc033bd2486295.zip
gcc-4.6.0: Bring in patches from FSF 4.6 branch
This brings in new patches from 4.6 release branch updates the comment section of existing branch to not contain patch numbers. Tested build on qemu for arm ppc mips x86 and x86_64 Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0365-gcc.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0365-gcc.patch125
1 files changed, 125 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0365-gcc.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0365-gcc.patch
new file mode 100644
index 000000000..378076392
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0365-gcc.patch
@@ -0,0 +1,125 @@
+From 158892fce220b03d3fe3d8d7656e1b0786609283 Mon Sep 17 00:00:00 2001
+From: rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Sun, 29 May 2011 17:47:51 +0000
+Subject: [PATCH] gcc/
+ PR target/43995
+ * config/mips/mips.c (mips_pic_call_symbol_from_set): Add a
+ recurse_p argument. Only follow register copies if it is set,
+ and prevent mips_find_pic_call_symbol from recursing.
+ (mips_find_pic_call_symbol): Add a recurse_p argument.
+ Pass it to mips_pic_call_symbol_from_set.
+ (mips_annotate_pic_calls): Update accordingly.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@174404 138bc75d-0d04-0410-961f-82ee72b054a4
+
+index 9de479b..027fc2d 100644
+--- a/gcc/config/mips/mips.c
++++ b/gcc/config/mips/mips.c
+@@ -1186,7 +1186,7 @@ static const struct mips_rtx_cost_data
+ }
+ };
+
+-static rtx mips_find_pic_call_symbol (rtx, rtx);
++static rtx mips_find_pic_call_symbol (rtx, rtx, bool);
+ static int mips_register_move_cost (enum machine_mode, reg_class_t,
+ reg_class_t);
+ static unsigned int mips_function_arg_boundary (enum machine_mode, const_tree);
+@@ -14160,12 +14160,16 @@ mips_call_expr_from_insn (rtx insn, rtx *second_call)
+ }
+
+ /* REG is set in DEF. See if the definition is one of the ways we load a
+- register with a symbol address for a mips_use_pic_fn_addr_reg_p call. If
+- it is return the symbol reference of the function, otherwise return
+- NULL_RTX. */
++ register with a symbol address for a mips_use_pic_fn_addr_reg_p call.
++ If it is, return the symbol reference of the function, otherwise return
++ NULL_RTX.
++
++ If RECURSE_P is true, use mips_find_pic_call_symbol to interpret
++ the values of source registers, otherwise treat such registers as
++ having an unknown value. */
+
+ static rtx
+-mips_pic_call_symbol_from_set (df_ref def, rtx reg)
++mips_pic_call_symbol_from_set (df_ref def, rtx reg, bool recurse_p)
+ {
+ rtx def_insn, set;
+
+@@ -14192,21 +14196,39 @@ mips_pic_call_symbol_from_set (df_ref def, rtx reg)
+ return symbol;
+ }
+
+- /* Follow simple register copies. */
+- if (REG_P (src))
+- return mips_find_pic_call_symbol (def_insn, src);
++ /* Follow at most one simple register copy. Such copies are
++ interesting in cases like:
++
++ for (...)
++ {
++ locally_binding_fn (...);
++ }
++
++ and:
++
++ locally_binding_fn (...);
++ ...
++ locally_binding_fn (...);
++
++ where the load of locally_binding_fn can legitimately be
++ hoisted or shared. However, we do not expect to see complex
++ chains of copies, so a full worklist solution to the problem
++ would probably be overkill. */
++ if (recurse_p && REG_P (src))
++ return mips_find_pic_call_symbol (def_insn, src, false);
+ }
+
+ return NULL_RTX;
+ }
+
+-/* Find the definition of the use of REG in INSN. See if the definition is
+- one of the ways we load a register with a symbol address for a
+- mips_use_pic_fn_addr_reg_p call. If it is return the symbol reference of
+- the function, otherwise return NULL_RTX. */
++/* Find the definition of the use of REG in INSN. See if the definition
++ is one of the ways we load a register with a symbol address for a
++ mips_use_pic_fn_addr_reg_p call. If it is return the symbol reference
++ of the function, otherwise return NULL_RTX. RECURSE_P is as for
++ mips_pic_call_symbol_from_set. */
+
+ static rtx
+-mips_find_pic_call_symbol (rtx insn, rtx reg)
++mips_find_pic_call_symbol (rtx insn, rtx reg, bool recurse_p)
+ {
+ df_ref use;
+ struct df_link *defs;
+@@ -14218,7 +14240,7 @@ mips_find_pic_call_symbol (rtx insn, rtx reg)
+ defs = DF_REF_CHAIN (use);
+ if (!defs)
+ return NULL_RTX;
+- symbol = mips_pic_call_symbol_from_set (defs->ref, reg);
++ symbol = mips_pic_call_symbol_from_set (defs->ref, reg, recurse_p);
+ if (!symbol)
+ return NULL_RTX;
+
+@@ -14227,7 +14249,7 @@ mips_find_pic_call_symbol (rtx insn, rtx reg)
+ {
+ rtx other;
+
+- other = mips_pic_call_symbol_from_set (defs->ref, reg);
++ other = mips_pic_call_symbol_from_set (defs->ref, reg, recurse_p);
+ if (!rtx_equal_p (symbol, other))
+ return NULL_RTX;
+ }
+@@ -14298,7 +14320,7 @@ mips_annotate_pic_calls (void)
+ if (!REG_P (reg))
+ continue;
+
+- symbol = mips_find_pic_call_symbol (insn, reg);
++ symbol = mips_find_pic_call_symbol (insn, reg, true);
+ if (symbol)
+ {
+ mips_annotate_pic_call_expr (call, symbol);
+--
+1.7.0.4
+