aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-06-27 00:57:28 +0100
committerSam James <sam@gentoo.org>2024-06-27 00:57:52 +0100
commite35c53788a928179ef26b76833bcbe297f84fe6a (patch)
tree309e6ac19ee8e506885740003f180e0eefa48836 /15.0.0/gentoo/77_all_i386-fix-ix86_expand_move.patch
parent15.0.0: cut patchset 2 for musl (diff)
downloadgcc-patches-e35c53788a928179ef26b76833bcbe297f84fe6a.tar.gz
gcc-patches-e35c53788a928179ef26b76833bcbe297f84fe6a.tar.bz2
gcc-patches-e35c53788a928179ef26b76833bcbe297f84fe6a.zip
15.0.0: workaround recent x86 changes
Bug: https://gcc.gnu.org/PR115635 Bug: https://gcc.gnu.org/PR115661 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to '15.0.0/gentoo/77_all_i386-fix-ix86_expand_move.patch')
-rw-r--r--15.0.0/gentoo/77_all_i386-fix-ix86_expand_move.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/15.0.0/gentoo/77_all_i386-fix-ix86_expand_move.patch b/15.0.0/gentoo/77_all_i386-fix-ix86_expand_move.patch
new file mode 100644
index 0000000..4b42ea9
--- /dev/null
+++ b/15.0.0/gentoo/77_all_i386-fix-ix86_expand_move.patch
@@ -0,0 +1,45 @@
+From ec0ead755e65ba51813aa8b66f4eb5574dd8437c Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 26 Jun 2024 13:19:42 +0100
+Subject: [PATCH 1/2] i386: fix ix86_expand_move
+
+Before r15-1599-g63512c72df09b4, legitimize_pe_coff_symbol would return NULL_RTX
+for non-PECOFF targets, so the else branch would get taken.
+
+(This is a hack which doesn't work for PECOFF targets but fixes miscompilations
+on ELF.)
+
+Bug: https://gcc.gnu.org/PR115635
+Bug: https://gcc.gnu.org/PR115661
+---
+ gcc/config/i386/i386-expand.cc | 10 ----------
+ 1 file changed, 10 deletions(-)
+
+diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc
+index 5dfa7d49f58c..5e0173bc7a84 100644
+--- a/gcc/config/i386/i386-expand.cc
++++ b/gcc/config/i386/i386-expand.cc
+@@ -412,20 +412,10 @@ ix86_expand_move (machine_mode mode, rtx operands[])
+ }
+ else
+ {
+-#if TARGET_PECOFF
+- tmp = legitimize_pe_coff_symbol (op1, addend != NULL_RTX);
+- if (tmp)
+- {
+- op1 = tmp;
+- if (!addend)
+- break;
+- }
+- else
+ {
+ op1 = operands[1];
+ break;
+ }
+-#endif
+ }
+
+ if (addend)
+--
+2.45.2
+