1 ;;- Predicate definitions for the pdp11 for GNU C compiler
2 ;; Copyright (C) 1994-2018 Free Software Foundation, Inc.
3 ;; Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at).
5 ;; This file is part of GCC.
7 ;; GCC is free software; you can redistribute it and/or modify
8 ;; it under the terms of the GNU General Public License as published by
9 ;; the Free Software Foundation; either version 3, or (at your option)
12 ;; GCC is distributed in the hope that it will be useful,
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;; GNU General Public License for more details.
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with GCC; see the file COPYING3. If not see
19 ;; <http://www.gnu.org/licenses/>.
21 ;; Match CONST_DOUBLE zero for tstd/tstf.
22 (define_predicate "register_or_const0_operand"
23 (ior (match_operand 0 "register_operand")
24 (match_test "op == CONST0_RTX (GET_MODE (op))")))
26 ;; Accept integer arguments in the range 1..3, which are the
27 ;; shift counts for which we unroll a shift. This matches the rule for
28 ;; the "O" constraint.
29 (define_predicate "expand_shift_operand"
30 (and (match_code "const_int")
31 (match_test "(unsigned) INTVAL (op) < 4")))
33 ;; Accept anything general_operand accepts, except that registers must
35 (define_predicate "float_operand"
36 (if_then_else (match_code "reg")
38 (match_test "REGNO_REG_CLASS (REGNO (op)) == LOAD_FPU_REGS")
39 (match_test "REGNO_REG_CLASS (REGNO (op)) == NO_LOAD_FPU_REGS"))
40 (match_operand 0 "general_operand")))
42 ;; Accept anything nonimmediate_operand accepts, except that registers must
44 (define_predicate "float_nonimm_operand"
45 (if_then_else (match_code "reg")
47 (match_test "REGNO_REG_CLASS (REGNO (op)) == LOAD_FPU_REGS")
48 (match_test "REGNO_REG_CLASS (REGNO (op)) == NO_LOAD_FPU_REGS"))
49 (match_operand 0 "nonimmediate_operand")))
51 ;; Accept any comparison valid for CCNZmode
52 (define_predicate "ccnz_operator"
53 (match_code "eq,ne,ge,lt"))