]>
Commit | Line | Data |
---|---|---|
14755fb0 | 1 | ;; Predicate definitions for Matsushita MN10300. |
aeee4812 | 2 | ;; Copyright (C) 2005-2023 Free Software Foundation, Inc. |
14755fb0 KH |
3 | ;; |
4 | ;; This file is part of GCC. | |
5 | ;; | |
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 | |
2f83c7d6 | 8 | ;; the Free Software Foundation; either version 3, or (at your option) |
14755fb0 KH |
9 | ;; any later version. |
10 | ;; | |
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. | |
15 | ;; | |
16 | ;; You should have received a copy of the GNU General Public License | |
2f83c7d6 NC |
17 | ;; along with GCC; see the file COPYING3. If not see |
18 | ;; <http://www.gnu.org/licenses/>. | |
14755fb0 KH |
19 | |
20 | ;; Return true if the operand is the 1.0f constant. | |
21 | ||
22 | (define_predicate "const_1f_operand" | |
23 | (match_code "const_int,const_double") | |
24 | { | |
25 | return (op == CONST1_RTX (SFmode)); | |
26 | }) | |
27 | ||
14755fb0 KH |
28 | ;; Return true if OP is a valid call operand. |
29 | ||
30 | (define_predicate "call_address_operand" | |
31 | (match_code "symbol_ref,reg,unspec") | |
32 | { | |
33 | if (flag_pic) | |
5abc5de9 | 34 | return (satisfies_constraint_S (op) || GET_CODE (op) == REG); |
14755fb0 KH |
35 | |
36 | return (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == REG); | |
37 | }) | |
4af476d7 NC |
38 | |
39 | (define_predicate "impossible_plus_operand" | |
40 | (match_code "plus") | |
41 | { | |
42 | return XEXP (op, 0) == stack_pointer_rtx | |
43 | || XEXP (op, 1) == stack_pointer_rtx; | |
44 | }) | |
bad41521 | 45 | |
44217823 RH |
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")))) | |
50 | ||
bad41521 RH |
51 | (define_predicate "label_ref_operand" |
52 | (match_code "label_ref")) | |
53 | ||
54 | (define_special_predicate "int_mode_flags" | |
55 | (match_code "reg") | |
56 | { | |
57 | if (REGNO (op) != CC_REG) | |
58 | return false; | |
59 | if (GET_MODE (op) == CC_FLOATmode) | |
60 | return false; | |
61 | return GET_MODE_CLASS (GET_MODE (op)) == MODE_CC; | |
62 | }) | |
63 | ||
64 | (define_predicate "CCZN_comparison_operator" | |
65 | (match_code "eq,ne,lt,ge")) | |
a45d420a NC |
66 | |
67 | (define_predicate "liw_operand" | |
68 | (ior (match_operand 0 "register_operand") | |
69 | (match_test "satisfies_constraint_O (op)"))) | |
2e62f2ff RS |
70 | |
71 | (define_predicate "mn10300_store_multiple_operation" | |
72 | (and (match_code "parallel") | |
c345a0b1 | 73 | (match_test "mn10300_store_multiple_regs (op) != 0"))) |