summaryrefslogtreecommitdiff
path: root/gcc/config/rs6000/predicates.md
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-10 14:21:52 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-10 14:21:52 +0000
commit50b0c29ff2517ed425cfb8f9130976eb349d5e9b (patch)
tree5cde737193d69bf0f8f4036274f146fc1b1bb0e2 /gcc/config/rs6000/predicates.md
parent9cb87310b605dc6d8ed1a54f6f806d358f928ea7 (diff)
downloadgcc-50b0c29ff2517ed425cfb8f9130976eb349d5e9b.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102950 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000/predicates.md')
-rw-r--r--gcc/config/rs6000/predicates.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md
index a5bad7bfcd4..68c824a077f 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