aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-01-04 22:54:23 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2018-01-04 22:54:23 +0100
commitac2be67b328e79b3be27b0559de62f054f8bf4c7 (patch)
tree7588e3ffc637765e1a3f1a7c01b71e422c5da9c8 /gcc
parent91a00d11a32d7590285395534a2315ad65a6402f (diff)
downloadgcc-ac2be67b328e79b3be27b0559de62f054f8bf4c7.zip
gcc-ac2be67b328e79b3be27b0559de62f054f8bf4c7.tar.gz
gcc-ac2be67b328e79b3be27b0559de62f054f8bf4c7.tar.bz2
re PR target/83554 (ICE: in ix86_mitigate_rop, at config/i386/i386.c:41274 with -mmitigate-rop)
PR target/83554 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use QIreg_operand instead of register_operand predicate. * config/i386/i386.c (ix86_rop_should_change_byte_p, set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in comments instead of -fmitigate[-_]rop. * gcc.target/i386/pr83554.c: New test. Co-Authored-By: Uros Bizjak <ubizjak@gmail.com> From-SVN: r256268
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/i386/i386.c6
-rw-r--r--gcc/config/i386/i386.md2
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/gcc.target/i386/pr83554.c15
5 files changed, 32 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0692c62..58ec505 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2018-01-04 Jakub Jelinek <jakub@redhat.com>
+ Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/83554
+ * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
+ QIreg_operand instead of register_operand predicate.
+ * config/i386/i386.c (ix86_rop_should_change_byte_p,
+ set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
+ comments instead of -fmitigate[-_]rop.
+
2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR bootstrap/81926
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index c363de9..9956d56 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -3089,7 +3089,7 @@ ix86_debug_options (void)
}
/* Return true if T is one of the bytes we should avoid with
- -fmitigate-rop. */
+ -mmitigate-rop. */
static bool
ix86_rop_should_change_byte_p (int t)
@@ -41175,7 +41175,7 @@ ix86_seh_fixup_eh_fallthru (void)
/* Given a register number BASE, the lowest of a group of registers, update
regsets IN and OUT with the registers that should be avoided in input
and output operands respectively when trying to avoid generating a modr/m
- byte for -fmitigate-rop. */
+ byte for -mmitigate-rop. */
static void
set_rop_modrm_reg_bits (int base, HARD_REG_SET &in, HARD_REG_SET &out)
@@ -41186,7 +41186,7 @@ set_rop_modrm_reg_bits (int base, HARD_REG_SET &in, HARD_REG_SET &out)
SET_HARD_REG_BIT (in, base + 3);
}
-/* Called if -fmitigate_rop is in effect. Try to rewrite instructions so
+/* Called if -mmitigate-rop is in effect. Try to rewrite instructions so
that certain encodings of modr/m bytes do not occur. */
static void
ix86_mitigate_rop (void)
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 5911852..3f58780 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -11643,7 +11643,7 @@
(set_attr "mode" "QI")])
(define_split
- [(set (match_operand:HI 0 "register_operand")
+ [(set (match_operand:HI 0 "QIreg_operand")
(any_rotate:HI (match_dup 0) (const_int 8)))
(clobber (reg:CC FLAGS_REG))]
"reload_completed
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f7d629e..90f4d57 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,8 @@
2018-01-04 Jakub Jelinek <jakub@redhat.com>
+ PR target/83554
+ * gcc.target/i386/pr83554.c: New test.
+
PR ipa/82352
* g++.dg/ipa/pr82352.C (size_t): Define to __SIZE_TYPE__ instead of
long unsigned int.
diff --git a/gcc/testsuite/gcc.target/i386/pr83554.c b/gcc/testsuite/gcc.target/i386/pr83554.c
new file mode 100644
index 0000000..63ab366
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr83554.c
@@ -0,0 +1,15 @@
+/* PR target/83554 */
+/* { dg-do compile { target int128 } } */
+/* { dg-options "-Os -mmitigate-rop" } */
+
+unsigned a;
+unsigned __int128
+foo (unsigned char c, unsigned short d, unsigned e, unsigned long f,
+ unsigned __int128 g, unsigned h, unsigned short i, unsigned long j)
+{
+ j /= (unsigned)-2;
+ h += h &= c == c;
+ h -= g;
+ i = i >> 8 | i << 8;
+ return c + d + e + f + g + h + i + j + a;
+}