1 ;; Predicate definitions for Lattice Mico32 architecture.
2 ;; Contributed by Jon Beniston <jon@beniston.com>
4 ;; Copyright (C) 2009-2016 Free Software Foundation, Inc.
6 ;; This file is part of GCC.
8 ;; GCC is free software; you can redistribute it and/or modify it
9 ;; under the terms of the GNU General Public License as published
10 ;; by the Free Software Foundation; either version 3, or (at your
11 ;; option) any later version.
13 ;; GCC is distributed in the hope that it will be useful, but WITHOUT
14 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 ;; License for more details.
18 ;; You should have received a copy of the GNU General Public License
19 ;; along with GCC; see the file COPYING3. If not see
20 ;; <http://www.gnu.org/licenses/>.
22 (define_predicate "const0_operand"
23 (and (match_code "const_int,const_double,const_vector")
24 (match_test "op == CONST0_RTX (GET_MODE (op))")))
26 (define_predicate "constant_K_operand"
27 (and (match_code "const_int")
28 (match_test "satisfies_constraint_K (op)")))
30 (define_predicate "constant_L_operand"
31 (and (match_code "const_int")
32 (match_test "satisfies_constraint_L (op)")))
34 (define_predicate "constant_M_operand"
35 (and (match_code "const_int")
36 (match_test "satisfies_constraint_M (op)")))
38 (define_predicate "register_or_zero_operand"
39 (ior (match_operand 0 "register_operand")
40 (match_operand 0 "const0_operand")))
42 (define_predicate "register_or_K_operand"
43 (ior (match_operand 0 "register_operand")
44 (match_operand 0 "constant_K_operand")))
46 (define_predicate "register_or_L_operand"
47 (ior (match_operand 0 "register_operand")
48 (match_operand 0 "constant_L_operand")))
50 (define_predicate "register_or_int_operand"
51 (ior (match_operand 0 "register_operand")
52 (match_code "const_int")))
54 (define_predicate "reloc_operand"
55 (ior (ior (match_code "label_ref")
56 (match_code "symbol_ref"))
57 (match_code "const")))
59 (define_predicate "symbolic_operand"
60 (ior (match_code "label_ref")
61 (match_code "symbol_ref")))
63 (define_predicate "no_pic_small_symbol"
64 (match_code "symbol_ref")
66 return !flag_pic && SYMBOL_REF_SMALL_P (op);
69 (define_predicate "call_operand"
70 (ior (match_code "symbol_ref")
71 (match_operand 0 "register_operand")))