diff options
author | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-12-15 21:37:22 +0000 |
---|---|---|
committer | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-12-15 21:37:22 +0000 |
commit | 7c736129ddaf1b8ee6b002816b310ed4f4020d06 (patch) | |
tree | b7aecb2945dc88651bec92b0bf26abdeaea0768f /gcc/config/cris/predicates.md | |
parent | 8bdf2f829f10572621f55e5a0a2fd059e5c57546 (diff) | |
download | gcc-7c736129ddaf1b8ee6b002816b310ed4f4020d06.tar.gz |
* config/cris/predicates.md
("cris_general_operand_or_pic_source"): New predicate.
("cris_general_operand_or_plt_symbol"): Replace by...
("cris_nonmemory_operand_or_callable_symbol"): New predicate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130968 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/cris/predicates.md')
-rw-r--r-- | gcc/config/cris/predicates.md | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/gcc/config/cris/predicates.md b/gcc/config/cris/predicates.md index 19f31ebf9d4..edd16bbdd8e 100644 --- a/gcc/config/cris/predicates.md +++ b/gcc/config/cris/predicates.md @@ -63,7 +63,7 @@ (define_predicate "cris_bdap_const_operand" (and (match_code "label_ref, symbol_ref, const_int, const_double, const") (ior (not (match_test "flag_pic")) - (match_test "cris_valid_pic_const (op)")))) + (match_test "cris_valid_pic_const (op, true)")))) (define_predicate "cris_simple_address_operand" (ior (match_operand:SI 0 "register_operand") @@ -140,15 +140,26 @@ ; The following test is actually just an assertion. (match_test "cris_pic_symbol_type_of (op) != cris_no_symbol")))) +;; A predicate for the anon movsi expansion, one that fits a PCREL +;; operand as well as general_operand. + +(define_special_predicate "cris_general_operand_or_pic_source" + (ior (match_operand 0 "general_operand") + (and (match_test "flag_pic") + (match_test "cris_valid_pic_const (op, false)")))) + ;; Since a PLT symbol is not a general_operand, we have to have a ;; predicate that matches it when we need it. We use this in the expanded ;; "call" and "call_value" anonymous patterns. -(define_predicate "cris_general_operand_or_plt_symbol" - (ior (match_operand 0 "general_operand") +(define_predicate "cris_nonmemory_operand_or_callable_symbol" + (ior (match_operand 0 "nonmemory_operand") (and (match_code "const") - (and (match_test "GET_CODE (XEXP (op, 0)) == UNSPEC") - (not (match_test "TARGET_AVOID_GOTPLT")))))) + (and + (match_test "GET_CODE (XEXP (op, 0)) == UNSPEC") + (ior + (match_test "XINT (XEXP (op, 0), 1) == CRIS_UNSPEC_PLT_PCREL") + (match_test "XINT (XEXP (op, 0), 1) == CRIS_UNSPEC_PCREL")))))) ;; This matches a (MEM (general_operand)) or ;; (MEM (cris_general_operand_or_symbol)). The second one isn't a valid |