diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2015-02-04 20:00:48 +0000 |
---|---|---|
committer | Uros Bizjak <ubizjak@gmail.com> | 2015-02-04 20:00:48 +0000 |
commit | 4512d37f6782eead49ab99993838d60eae1b6c70 (patch) | |
tree | 2427c005e1e7bb480a7618781e1cb8cb13456574 | |
parent | d2057e1cafe996140f29b142583b1647c7c10b7d (diff) |
Backport from mainline
2015-01-31 Uros Bizjak <ubizjak@gmail.com>
PR target/64882
* config/i386/predicates.md (address_no_seg_operand): Reject
non-CONST_INT_P operands in invalid mode.
Backport from mainline
2015-01-31 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*prefetch_prefetchw1): Remove mode of
address_operand 0. Rename from *prefetch_prefetchwt1_<mode>.
* config/i386/predicates.md (address_no_seg_operand): Call
address_operand with VOIDmode.
(vsib_address_operand): Ditto.
testsuite/ChangeLog:
Backport from mainline
2015-01-31 Uros Bizjak <ubizjak@gmail.com>
PR target/64882
* gcc.dg/torture/pr64882.c: New test.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@220415 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 18 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 4 | ||||
-rw-r--r-- | gcc/config/i386/predicates.md | 9 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 8 |
4 files changed, 35 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6243963f496..db84437bb64 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,21 @@ +2015-02-04 Uros Bizjak <ubizjak@gmail.com> + + Backport from mainline + 2015-01-31 Uros Bizjak <ubizjak@gmail.com> + + PR target/64882 + * config/i386/predicates.md (address_no_seg_operand): Reject + non-CONST_INT_P operands in invalid mode. + + Backport from mainline + 2015-01-31 Uros Bizjak <ubizjak@gmail.com> + + * config/i386/i386.md (*prefetch_prefetchw1): Remove mode of + address_operand 0. Rename from *prefetch_prefetchwt1_<mode>. + * config/i386/predicates.md (address_no_seg_operand): Call + address_operand with VOIDmode. + (vsib_address_operand): Ditto. + 2015-02-01 H.J. Lu <hongjiu.lu@intel.com> Backported from mainline diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 79e2301117c..2f76305d23e 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -17623,8 +17623,8 @@ (symbol_ref "memory_address_length (operands[0], false)")) (set_attr "memory" "none")]) -(define_insn "*prefetch_prefetchwt1_<mode>" - [(prefetch (match_operand:P 0 "address_operand" "p") +(define_insn "*prefetch_prefetchwt1" + [(prefetch (match_operand 0 "address_operand" "p") (const_int 1) (const_int 2))] "TARGET_PREFETCHWT1" diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index 2ef1384246e..4ba2e6fbbca 100644 --- a/gcc/config/i386/predicates.md +++ b/gcc/config/i386/predicates.md @@ -968,11 +968,16 @@ ;; a segment override. Defined as a special predicate to allow ;; mode-less const_int operands pass to address_operand. (define_special_predicate "address_no_seg_operand" - (match_operand 0 "address_operand") + (match_test "address_operand (op, VOIDmode)") { struct ix86_address parts; int ok; + if (!CONST_INT_P (op) + && mode != VOIDmode + && GET_MODE (op) != mode) + return false; + ok = ix86_decompose_address (op, &parts); gcc_assert (ok); return parts.seg == SEG_DEFAULT; @@ -981,7 +986,7 @@ ;; Return true if op if a valid base register, displacement or ;; sum of base register and displacement for VSIB addressing. (define_predicate "vsib_address_operand" - (match_operand 0 "address_operand") + (match_test "address_operand (op, VOIDmode)") { struct ix86_address parts; int ok; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6a61b2efac2..a5b2b2a43c4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2015-02-04 Uros Bizjak <ubizjak@gmail.com> + + Backport from mainline + 2015-01-31 Uros Bizjak <ubizjak@gmail.com> + + PR target/64882 + * gcc.dg/torture/pr64882.c: New test. + 2015-02-01 H.J. Lu <hongjiu.lu@intel.com> Backported from mainline |