1 ;;- Predicate definitions for the pdp11 for GNU C compiler
2 ;; Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2004, 2005
3 ;; 2007, 2008, 2010 Free Software Foundation, Inc.
4 ;; Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at).
6 ;; This file is part of GCC.
8 ;; GCC is free software; you can redistribute it and/or modify
9 ;; it under the terms of the GNU General Public License as published by
10 ;; the Free Software Foundation; either version 3, or (at your option)
13 ;; GCC is distributed in the hope that it will be useful,
14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;; GNU General Public 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 ;; Match CONST_DOUBLE zero for tstd/tstf.
23 (define_predicate "register_or_const0_operand"
24 (ior (match_operand 0 "register_operand")
25 (match_test "op == CONST0_RTX (GET_MODE (op))")))
27 ;; Accept integer arguments in the range -4..-2 and 2..4, which are the
28 ;; shift counts for which we unroll a shift. This matches the rule for
29 ;; the "O" constraint.
30 (define_predicate "expand_shift_operand"
31 (match_code "const_int")
36 return (abs (sh) > 1 && abs (sh) <= 4);
39 ;; Accept anything general_operand accepts, except that registers must
41 (define_predicate "float_operand"
42 (if_then_else (match_code "reg")
44 (match_test "REGNO_REG_CLASS (REGNO (op)) == LOAD_FPU_REGS")
45 (match_test "REGNO_REG_CLASS (REGNO (op)) == NO_LOAD_FPU_REGS"))
46 (match_test "general_operand (op, mode)")))
48 ;; Accept anything nonimmediate_operand accepts, except that registers must
50 (define_predicate "float_nonimm_operand"
51 (if_then_else (match_code "reg")
53 (match_test "REGNO_REG_CLASS (REGNO (op)) == LOAD_FPU_REGS")
54 (match_test "REGNO_REG_CLASS (REGNO (op)) == NO_LOAD_FPU_REGS"))
55 (match_test "nonimmediate_operand (op, mode)")))