1 ;; Predicate definitions for Sunplus S+CORE.
2 ;; Copyright (C) 2005 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 2, 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 COPYING. If not, write to
18 ;; the Free Software Foundation, 51 Franklin Street, Fifth Floor,
19 ;; Boston, MA 02110-1301, USA.
21 (define_predicate "arith_operand"
22 (ior (match_code "const_int")
23 (match_operand 0 "register_operand")))
25 (define_predicate "const_call_insn_operand"
26 (match_code "const,symbol_ref,label_ref")
28 enum score_symbol_type symbol_type;
30 return (mda_symbolic_constant_p (op, &symbol_type)
31 && (symbol_type == SYMBOL_GENERAL));
34 (define_predicate "call_insn_operand"
35 (ior (match_operand 0 "const_call_insn_operand")
36 (match_operand 0 "register_operand")))
38 (define_predicate "const_bi_operand"
39 (and (match_code "const_int")
40 (match_test "CONST_OK_FOR_LETTER_P (INTVAL (op), 'J')")))
42 (define_predicate "pindex_off_operand"
43 (and (match_code "const_int")
44 (match_test "CONST_OK_FOR_LETTER_P (INTVAL (op), 'P')")))
46 (define_predicate "hireg_operand"
47 (and (match_code "reg")
48 (match_test "REGNO (op) == HI_REGNUM")))
50 (define_predicate "loreg_operand"
51 (and (match_code "reg")
52 (match_test "REGNO (op) == LO_REGNUM")))
54 (define_predicate "g32reg_operand"
55 (and (match_code "reg")
56 (match_test "GP_REG_P (REGNO (op))")))
58 (define_predicate "branch_n_operator"
61 (define_predicate "branch_nz_operator"
62 (match_code "eq,ne,lt,ge"))