1 ;;- Constraint definitions for the pdp11 for GNU C compiler
2 ;; Copyright (C) 2010-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 (define_register_constraint "a" "LOAD_FPU_REGS"
22 "FPU register that can be directly loaded from memory")
24 (define_register_constraint "f" "FPU_REGS"
27 (define_register_constraint "h" "NO_LOAD_FPU_REGS"
28 "FPU register that cannot be directly loaded from memory")
30 (define_register_constraint "d" "MUL_REGS"
31 "General register that can be used for 16-bit multiply (odd numbered)")
33 (define_constraint "I"
34 "Integer constant that fits in 16 bits unsigned"
35 (and (match_code "const_int")
36 (match_test "(ival & 0xffff0000) == 0")))
38 (define_constraint "J"
39 "Integer constant whose low 16 bits are zero"
40 (and (match_code "const_int")
41 (match_test "(ival & 0xffff) == 0")))
43 (define_constraint "K"
44 "Integer constant whose lower and upper 16 bit half are both non-zero"
45 (and (match_code "const_int")
46 (match_test "(ival & 0xffff) != 0 && (ival & 0xffff0000) != 0")))
48 (define_constraint "L"
50 (and (match_code "const_int")
51 (match_test "ival == 1")))
53 (define_constraint "M"
55 (and (match_code "const_int")
56 (match_test "ival == -1")))
58 (define_constraint "N"
60 (and (match_code "const_int")
61 (match_test "ival == 0")))
63 (define_constraint "O"
64 "Integer constant for which several individual shifts are better than one big one"
65 (and (match_code "const_int")
66 (match_test "pdp11_small_shift (ival)")))
68 (define_constraint "G"
69 "Defines a real zero constant."
70 (and (match_code "const_double")
71 (match_test "op == CONST0_RTX (GET_MODE (op))")))
73 (define_constraint "Q"
74 "Memory reference that requires an additional word after the opcode"
75 (and (match_code "mem")
76 (match_test "memory_address_p (GET_MODE (op), XEXP (op, 0))
77 && !simple_memory_operand (op, GET_MODE (op))")))
79 (define_constraint "R"
80 "Memory reference that is encoded within the opcode"
81 (and (match_code "mem")
82 (match_test "memory_address_p (GET_MODE (op), XEXP (op, 0))
83 && simple_memory_operand (op, GET_MODE (op))")))
85 (define_constraint "D"
86 "Memory reference that is encoded within the opcode, and not push or pop"
87 (and (match_code "mem")
88 (match_test "memory_address_p (GET_MODE (op), XEXP (op, 0))
89 && no_side_effect_operand (op, GET_MODE (op))")))