aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106776.patch
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106776.patch')
-rw-r--r--toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106776.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106776.patch b/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106776.patch
new file mode 100644
index 0000000000..3d4d5c5049
--- /dev/null
+++ b/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106776.patch
@@ -0,0 +1,46 @@
+2011-07-15 Michael Hope <michael.hope@linaro.org>
+
+ gcc/
+ Backport from mainline:
+ 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
+
+ * combine.c (simplify_set): Try harder to find the best CC mode when
+ simplifying a nested COMPARE on the RHS.
+
+=== modified file 'gcc/combine.c'
+--- old/gcc/combine.c 2011-05-27 14:31:18 +0000
++++ new/gcc/combine.c 2011-07-11 03:52:31 +0000
+@@ -6287,10 +6287,18 @@
+ enum rtx_code new_code;
+ rtx op0, op1, tmp;
+ int other_changed = 0;
++ rtx inner_compare = NULL_RTX;
+ enum machine_mode compare_mode = GET_MODE (dest);
+
+ if (GET_CODE (src) == COMPARE)
+- op0 = XEXP (src, 0), op1 = XEXP (src, 1);
++ {
++ op0 = XEXP (src, 0), op1 = XEXP (src, 1);
++ if (GET_CODE (op0) == COMPARE && op1 == const0_rtx)
++ {
++ inner_compare = op0;
++ op0 = XEXP (inner_compare, 0), op1 = XEXP (inner_compare, 1);
++ }
++ }
+ else
+ op0 = src, op1 = CONST0_RTX (GET_MODE (src));
+
+@@ -6332,6 +6340,12 @@
+ need to use a different CC mode here. */
+ if (GET_MODE_CLASS (GET_MODE (op0)) == MODE_CC)
+ compare_mode = GET_MODE (op0);
++ else if (inner_compare
++ && GET_MODE_CLASS (GET_MODE (inner_compare)) == MODE_CC
++ && new_code == old_code
++ && op0 == XEXP (inner_compare, 0)
++ && op1 == XEXP (inner_compare, 1))
++ compare_mode = GET_MODE (inner_compare);
+ else
+ compare_mode = SELECT_CC_MODE (new_code, op0, op1);
+
+