aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-05-23 13:18:41 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2019-05-23 13:18:41 +0200
commit32d941139e8144662e0dc182d64e3f3f9df89ad4 (patch)
tree9f7ff5de4ec982ed84825ad775a05322c634493e
parent2b8235ea99f231c0840e7375d79c28cec5a525a4 (diff)
downloadgcc-32d941139e8144662e0dc182d64e3f3f9df89ad4.zip
gcc-32d941139e8144662e0dc182d64e3f3f9df89ad4.tar.gz
gcc-32d941139e8144662e0dc182d64e3f3f9df89ad4.tar.bz2
re PR target/90568 (stack protector should use cmp or sub, not xor, to allow macro-fusion on x86)
PR target/90568 * config/i386/i386.md (stack_protect_test_<mode>): Use sub instead of xor. From-SVN: r271552
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/i386.md2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2ccb803..e49c758 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2019-05-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/90568
+ * config/i386/i386.md (stack_protect_test_<mode>): Use sub instead
+ of xor.
+
2019-05-23 Martin Liska <mliska@suse.cz>
PR sanitizer/90570
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index da5163d..3fd11e2 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -19521,7 +19521,7 @@
UNSPEC_SP_TEST))
(clobber (match_scratch:PTR 3 "=&r"))]
""
- "mov{<imodesuffix>}\t{%1, %3|%3, %1}\;xor{<imodesuffix>}\t{%2, %3|%3, %2}"
+ "mov{<imodesuffix>}\t{%1, %3|%3, %1}\;sub{<imodesuffix>}\t{%2, %3|%3, %2}"
[(set_attr "type" "multi")])
(define_insn "sse4_2_crc32<mode>"