1 ;;- Predicate definitions for the pdp11 for GNU C compiler
2 ;; Copyright (C) 1994-2017 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 -4..-2 and 2..4, 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 (match_code "const_int")
35 return (abs (sh) > 1 && abs (sh) <= 4);
38 ;; Accept anything general_operand accepts, except that registers must
40 (define_predicate "float_operand"
41 (if_then_else (match_code "reg")
43 (match_test "REGNO_REG_CLASS (REGNO (op)) == LOAD_FPU_REGS")
44 (match_test "REGNO_REG_CLASS (REGNO (op)) == NO_LOAD_FPU_REGS"))
45 (match_operand 0 "general_operand")))
47 ;; Accept anything nonimmediate_operand accepts, except that registers must
49 (define_predicate "float_nonimm_operand"
50 (if_then_else (match_code "reg")
52 (match_test "REGNO_REG_CLASS (REGNO (op)) == LOAD_FPU_REGS")
53 (match_test "REGNO_REG_CLASS (REGNO (op)) == NO_LOAD_FPU_REGS"))
54 (match_operand 0 "nonimmediate_operand")))