aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-02-14 00:09:27 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-02-14 00:09:27 +0000
commit128642a1d818deadd5853ca045265397f2836f72 (patch)
tree73b46bb20907aa52729c46b0ae7e72c78641a0d7
parent50d2fe163f46566fd51f85557f6f30dafafb80a1 (diff)
downloadupstream-128642a1d818deadd5853ca045265397f2836f72.tar.gz
upstream-128642a1d818deadd5853ca045265397f2836f72.tar.bz2
upstream-128642a1d818deadd5853ca045265397f2836f72.zip
fix gcc 4.3.x segfault triggered by using -frename-registers (reproduced on arm, might be relevant for other platforms as well)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14505 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--toolchain/gcc/patches/4.3.1/400-arm_register_fix.patch24
-rw-r--r--toolchain/gcc/patches/4.3.2/400-arm_register_fix.patch24
-rw-r--r--toolchain/gcc/patches/4.3.3/400-arm_register_fix.patch24
3 files changed, 72 insertions, 0 deletions
diff --git a/toolchain/gcc/patches/4.3.1/400-arm_register_fix.patch b/toolchain/gcc/patches/4.3.1/400-arm_register_fix.patch
new file mode 100644
index 0000000000..2fb5aa627c
--- /dev/null
+++ b/toolchain/gcc/patches/4.3.1/400-arm_register_fix.patch
@@ -0,0 +1,24 @@
+Fixes GCC PR36350
+
+--- a/gcc/regrename.c
++++ b/gcc/regrename.c
+@@ -783,6 +783,10 @@ build_def_use (basic_block bb)
+ recog_data.operand_type[i] = OP_INOUT;
+ }
+
++ /* Unshare dup_loc RTL */
++ for (i = 0; i < recog_data.n_dups; i++)
++ *recog_data.dup_loc[i] = copy_rtx(*recog_data.dup_loc[i]);
++
+ /* Step 1: Close chains for which we have overlapping reads. */
+ for (i = 0; i < n_ops; i++)
+ scan_rtx (insn, recog_data.operand_loc[i],
+@@ -813,7 +817,7 @@ build_def_use (basic_block bb)
+ OP_IN, 0);
+
+ for (i = 0; i < recog_data.n_dups; i++)
+- *recog_data.dup_loc[i] = copy_rtx (old_dups[i]);
++ *recog_data.dup_loc[i] = old_dups[i];
+ for (i = 0; i < n_ops; i++)
+ *recog_data.operand_loc[i] = old_operands[i];
+ if (recog_data.n_dups)
diff --git a/toolchain/gcc/patches/4.3.2/400-arm_register_fix.patch b/toolchain/gcc/patches/4.3.2/400-arm_register_fix.patch
new file mode 100644
index 0000000000..2fb5aa627c
--- /dev/null
+++ b/toolchain/gcc/patches/4.3.2/400-arm_register_fix.patch
@@ -0,0 +1,24 @@
+Fixes GCC PR36350
+
+--- a/gcc/regrename.c
++++ b/gcc/regrename.c
+@@ -783,6 +783,10 @@ build_def_use (basic_block bb)
+ recog_data.operand_type[i] = OP_INOUT;
+ }
+
++ /* Unshare dup_loc RTL */
++ for (i = 0; i < recog_data.n_dups; i++)
++ *recog_data.dup_loc[i] = copy_rtx(*recog_data.dup_loc[i]);
++
+ /* Step 1: Close chains for which we have overlapping reads. */
+ for (i = 0; i < n_ops; i++)
+ scan_rtx (insn, recog_data.operand_loc[i],
+@@ -813,7 +817,7 @@ build_def_use (basic_block bb)
+ OP_IN, 0);
+
+ for (i = 0; i < recog_data.n_dups; i++)
+- *recog_data.dup_loc[i] = copy_rtx (old_dups[i]);
++ *recog_data.dup_loc[i] = old_dups[i];
+ for (i = 0; i < n_ops; i++)
+ *recog_data.operand_loc[i] = old_operands[i];
+ if (recog_data.n_dups)
diff --git a/toolchain/gcc/patches/4.3.3/400-arm_register_fix.patch b/toolchain/gcc/patches/4.3.3/400-arm_register_fix.patch
new file mode 100644
index 0000000000..2fb5aa627c
--- /dev/null
+++ b/toolchain/gcc/patches/4.3.3/400-arm_register_fix.patch
@@ -0,0 +1,24 @@
+Fixes GCC PR36350
+
+--- a/gcc/regrename.c
++++ b/gcc/regrename.c
+@@ -783,6 +783,10 @@ build_def_use (basic_block bb)
+ recog_data.operand_type[i] = OP_INOUT;
+ }
+
++ /* Unshare dup_loc RTL */
++ for (i = 0; i < recog_data.n_dups; i++)
++ *recog_data.dup_loc[i] = copy_rtx(*recog_data.dup_loc[i]);
++
+ /* Step 1: Close chains for which we have overlapping reads. */
+ for (i = 0; i < n_ops; i++)
+ scan_rtx (insn, recog_data.operand_loc[i],
+@@ -813,7 +817,7 @@ build_def_use (basic_block bb)
+ OP_IN, 0);
+
+ for (i = 0; i < recog_data.n_dups; i++)
+- *recog_data.dup_loc[i] = copy_rtx (old_dups[i]);
++ *recog_data.dup_loc[i] = old_dups[i];
+ for (i = 0; i < n_ops; i++)
+ *recog_data.operand_loc[i] = old_operands[i];
+ if (recog_data.n_dups)