diff options
author | Bernd Schmidt <bernds@redhat.com> | 2015-12-03 14:17:35 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2015-12-03 14:17:35 +0000 |
commit | 47e16c6a6aed01dde2774a5490a3e5c7f97e9f92 (patch) | |
tree | 1a704a39609e4dd7faea72ad422cfe306701f3fa /gcc/config | |
parent | 9a863523b43ee0ddbfbbb4ce82edc577b6f372de (diff) | |
download | gcc-47e16c6a6aed01dde2774a5490a3e5c7f97e9f92.zip gcc-47e16c6a6aed01dde2774a5490a3e5c7f97e9f92.tar.gz gcc-47e16c6a6aed01dde2774a5490a3e5c7f97e9f92.tar.bz2 |
Fix some issues with the ROP patch (PR 68471, 68472)
PR target/68471
PR target/68472
* config/i386/i386.c (ix86_mitigate_rop): Don't call
compute_bb_for_insn again. Call df_insn_rescan_all.
* config/i386/i386.md (set_got_rex64): Override modrm_class.
* regrename.c (build_def_use): Ignore stack regs if regstack_completed.
testsuite/
* gcc.target/i386/rop1.c: New test.
From-SVN: r231228
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i386/i386.c | 3 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 05e7fe6..96d6c98 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -45267,8 +45267,9 @@ ix86_mitigate_rop (void) COPY_HARD_REG_SET (inout_risky, input_risky); IOR_HARD_REG_SET (inout_risky, output_risky); - compute_bb_for_insn (); df_note_add_problem (); + /* Fix up what stack-regs did. */ + df_insn_rescan_all (); df_analyze (); regrename_init (true); diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index e8c5f06..f2b2041 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -12421,6 +12421,7 @@ "lea{q}\t{_GLOBAL_OFFSET_TABLE_(%%rip), %0|%0, _GLOBAL_OFFSET_TABLE_[rip]}" [(set_attr "type" "lea") (set_attr "length_address" "4") + (set_attr "modrm_class" "unknown") (set_attr "mode" "DI")]) (define_insn "set_rip_rex64" |