1 ;; Constraints for the DEC VAX port.
2 ;; Copyright (C) 2007-2016 Free Software Foundation, Inc.
4 ;; This file is part of GCC.
6 ;; GCC is free software; you can redistribute it and/or modify it under
7 ;; the terms of the GNU General Public License as published by the Free
8 ;; Software Foundation; either version 3, or (at your option) any later
11 ;; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 ;; WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 ;; You should have received a copy of the GNU General Public License
17 ;; along with GCC; see the file COPYING3. If not see
18 ;; <http://www.gnu.org/licenses/>. */
20 (define_constraint "Z0"
21 "Match a CONST_INT of 0"
22 (and (match_code "const_int")
23 (match_test "ival == 0")))
25 (define_constraint "U06"
26 "unsigned 6 bit value (0..63)"
27 (and (match_code "const_int")
28 (match_test "0 <= ival && ival < 64")))
30 (define_constraint "U08"
31 "Unsigned 8 bit value"
32 (and (match_code "const_int")
33 (match_test "0 <= ival && ival < 256")))
35 (define_constraint "U16"
36 "Unsigned 16 bit value"
37 (and (match_code "const_int")
38 (match_test "0 <= ival && ival < 65536")))
40 (define_constraint "CN6"
41 "negative 6 bit value (-63..-1)"
42 (and (match_code "const_int")
43 (match_test "-63 <= ival && ival < 0")))
45 (define_constraint "S08"
46 "signed 8 bit value [old]"
47 (and (match_code "const_int")
48 (match_test "-128 <= ival && ival < 128")))
50 (define_constraint "S16"
51 "signed 16 bit value [old]"
52 (and (match_code "const_int")
53 (match_test "-32768 <= ival && ival < 32768")))
55 (define_constraint "I"
56 "Match a CONST_INT of 0 [old]"
57 (and (match_code "const_int")
58 (match_test "satisfies_constraint_Z0 (GEN_INT (ival))")))
60 (define_constraint "J"
61 "unsigned 6 bit value [old]"
62 (and (match_code "const_int")
63 (match_test "satisfies_constraint_U06 (GEN_INT (ival))")))
65 (define_constraint "K"
66 "signed 8 bit value [old]"
67 (and (match_code "const_int")
68 (match_test "satisfies_constraint_S08 (GEN_INT (ival))")))
70 (define_constraint "L"
71 "signed 16 bit value [old]"
72 (and (match_code "const_int")
73 (match_test "satisfies_constraint_S16 (GEN_INT (ival))")))
75 (define_constraint "M"
76 "Unsigned 8 bit value [old]"
77 (and (match_code "const_int")
78 (match_test "satisfies_constraint_U08 (GEN_INT (ival))")))
80 (define_constraint "N"
81 "Unsigned 16 bit value [old]"
82 (and (match_code "const_int")
83 (match_test "satisfies_constraint_U16 (GEN_INT (ival))")))
85 (define_constraint "O"
86 "Negative short literals (-63..-1) [old]"
87 (and (match_code "const_int")
88 (match_test "satisfies_constraint_CN6 (GEN_INT (ival))")))
90 /* Similar, but for floating constants, and defining letters G and H. */
92 (define_constraint "G"
93 "Match a floating-point zero"
94 (and (match_code "const_double")
95 (match_test "op == CONST0_RTX (DFmode) || op == CONST0_RTX (SFmode)")))
97 /* Optional extra constraints for this machine. */
99 (define_memory_constraint "Q"
100 "operand is a MEM that does not have a mode-dependent address."
101 (and (match_code "mem")
102 (match_test "!mode_dependent_address_p (XEXP (op, 0),
103 MEM_ADDR_SPACE (op))")))
105 (define_memory_constraint "B"
107 (and (match_operand:BLK 0 "memory_operand")
108 (not (match_operand:BLK 0 "illegal_blk_memory_operand" ""))))
110 (define_memory_constraint "R"
112 (and (match_operand:DI 0 "memory_operand")
113 (not (match_operand:DI 0 "illegal_addsub_di_memory_operand" ""))))
115 (define_constraint "T"
116 "@internal satisfies CONSTANT_P and, if pic is enabled, is not a SYMBOL_REF, LABEL_REF, or CONST."
117 (and (match_test ("CONSTANT_P (op)"))
118 (ior (not (match_code "symbol_ref,label_ref,const"))
119 (match_test "!flag_pic"))))