aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Edelsohn <edelsohn@gnu.org>2005-08-10 14:21:52 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2005-08-10 10:21:52 -0400
commit11aac14fcefc15b085f4172ae4eb39542f505b5a (patch)
tree5cde737193d69bf0f8f4036274f146fc1b1bb0e2 /gcc
parent9bd0510849773836fce158f056b7d1f81d01f961 (diff)
downloadgcc-11aac14fcefc15b085f4172ae4eb39542f505b5a.zip
gcc-11aac14fcefc15b085f4172ae4eb39542f505b5a.tar.gz
gcc-11aac14fcefc15b085f4172ae4eb39542f505b5a.tar.bz2
predicates.md (indexed_or_indirect_address): New.
* config/rs6000/predicates.md (indexed_or_indirect_address): New. * config/rs6000/rs6000.md (prefetch): Remove operand 0 mode and change predicate to indexed_or_indirect_address. From-SVN: r102950
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/rs6000/predicates.md8
-rw-r--r--gcc/config/rs6000/rs6000.md2
3 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8092a46..567c492 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-08-10 David Edelsohn <edelsohn@gnu.org>
+
+ * config/rs6000/predicates.md (indexed_or_indirect_address): New.
+ * config/rs6000/rs6000.md (prefetch): Remove operand 0 mode and
+ change predicate to indexed_or_indirect_address.
+
2005-08-10 Richard Sandiford <richard@codesourcery.com>
* config/arm/lib1funcs.asm (__aeabi_uidiv, __aeabi_idiv): New aliases.
diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md
index a5bad7b..68c824a 100644
--- a/gcc/config/rs6000/predicates.md
+++ b/gcc/config/rs6000/predicates.md
@@ -369,6 +369,14 @@
|| GET_CODE (XEXP (XEXP (op, 0), 1)) != CONST_INT
|| INTVAL (XEXP (XEXP (op, 0), 1)) % 4 == 0")))
+;; Return 1 if the operand is an indexed or indirect address.
+(define_predicate "indexed_or_indirect_address"
+ (and (match_operand 0 "address_operand")
+ (match_test "REG_P (op)
+ || (GET_CODE (op) == PLUS
+ && REG_P (XEXP (op, 0))
+ && REG_P (XEXP (op, 1)))")))
+
;; Used for the destination of the fix_truncdfsi2 expander.
;; If stfiwx will be used, the result goes to memory; otherwise,
;; we're going to emit a store and a load of a subreg, so the dest is a
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 3cc613a..05ff9bd 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -14016,7 +14016,7 @@
}")
(define_insn "prefetch"
- [(prefetch (match_operand:V4SI 0 "address_operand" "p")
+ [(prefetch (match_operand 0 "indexed_or_indirect_address" "p")
(match_operand:SI 1 "const_int_operand" "n")
(match_operand:SI 2 "const_int_operand" "n"))]
"TARGET_POWERPC"