PR tree-optimization/84480 - bogus -Wstringop-truncation despite assignment with...
[official-gcc.git] / gcc / config / pdp11 / constraints.md
blob0d78dd86835ca0c89e272880c871f904c0b7e20b
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)
10 ;; any later version.
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 "f" "FPU_REGS"
22   "Any FPU register")
24 (define_register_constraint "a" "LOAD_FPU_REGS"
25   "FPU register that can be directly loaded from memory")
27 (define_register_constraint "d" "MUL_REGS"
28   "General register that can be used for 16-bit multiply (odd numbered)")
30 (define_constraint "I"
31   "Integer constant that fits in 16 bits unsigned"
32   (and (match_code "const_int")
33        (match_test "(ival & 0xffff0000) == 0")))
35 (define_constraint "J"
36   "Integer constant whose low 16 bits are zero"
37   (and (match_code "const_int")
38        (match_test "(ival & 0xffff) == 0")))
40 (define_constraint "K"
41   "Integer constant whose lower and upper 16 bit half are both non-zero"
42   (and (match_code "const_int")
43        (match_test "(ival & 0xffff) != 0 && (ival & 0xffff0000) != 0")))
45 (define_constraint "L"
46   "Integer constant 1"
47   (and (match_code "const_int")
48        (match_test "ival == 1")))
50 (define_constraint "M"
51   "Integer constant -1"
52   (and (match_code "const_int")
53        (match_test "ival == -1")))
55 (define_constraint "N"
56   "Integer constant 0"
57   (and (match_code "const_int")
58        (match_test "ival == 0")))
60 (define_constraint "O"
61   "Integer constant for which several individual shifts are better than one big one"
62   (and (match_code "const_int")
63        (match_test "abs (ival) > 1 && abs (ival) <= 4")))
65 (define_constraint "G"
66   "Defines a real zero constant."
67   (and (match_code "const_double")
68        (match_test "op == CONST0_RTX (GET_MODE (op))")))
70 (define_constraint "Q"
71   "Memory reference that requires an additional word after the opcode"
72   (and (match_code "mem")
73        (match_test "memory_address_p (GET_MODE (op), XEXP (op, 0))
74                     && !simple_memory_operand (op, GET_MODE (op))")))
76 (define_constraint "R"
77   "Memory reference that is encoded within the opcode"
78   (and (match_code "mem")
79        (match_test "memory_address_p (GET_MODE (op), XEXP (op, 0))
80                     && simple_memory_operand (op, GET_MODE (op))")))