1 ;; Predicate definitions for Matsushita MN10300.
2 ;; Copyright (C) 2005-2020 Free Software Foundation, Inc.
4 ;; This file is part of GCC.
6 ;; GCC is free software; you can redistribute it and/or modify
7 ;; it under the terms of the GNU General Public License as published by
8 ;; the Free Software Foundation; either version 3, or (at your option)
11 ;; GCC is distributed in the hope that it will be useful,
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;; GNU General Public License for more details.
16 ;; You should have received a copy of the GNU General Public License
17 ;; along with GCC; see the file COPYING3. If not see
18 ;; <http://www.gnu.org/licenses/>.
20 ;; Return true if the operand is the 1.0f constant.
22 (define_predicate "const_1f_operand"
23 (match_code "const_int,const_double")
25 return (op == CONST1_RTX (SFmode));
28 ;; Return true if OP is a valid call operand.
30 (define_predicate "call_address_operand"
31 (match_code "symbol_ref,reg,unspec")
34 return (satisfies_constraint_S (op) || GET_CODE (op) == REG);
36 return (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == REG);
39 (define_predicate "impossible_plus_operand"
42 return XEXP (op, 0) == stack_pointer_rtx
43 || XEXP (op, 1) == stack_pointer_rtx;
46 (define_predicate "reg_or_am33_const_operand"
47 (ior (match_operand 0 "register_operand")
48 (and (match_test "TARGET_AM33")
49 (match_operand 0 "immediate_operand"))))
51 (define_predicate "label_ref_operand"
52 (match_code "label_ref"))
54 (define_special_predicate "int_mode_flags"
57 if (REGNO (op) != CC_REG)
59 if (GET_MODE (op) == CC_FLOATmode)
61 return GET_MODE_CLASS (GET_MODE (op)) == MODE_CC;
64 (define_predicate "CCZN_comparison_operator"
65 (match_code "eq,ne,lt,ge"))
67 (define_predicate "liw_operand"
68 (ior (match_operand 0 "register_operand")
69 (match_test "satisfies_constraint_O (op)")))
71 (define_predicate "mn10300_store_multiple_operation"
72 (and (match_code "parallel")
73 (match_test "mn10300_store_multiple_regs (op) != 0")))