]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/vax/constraints.md
Update copyright years.
[thirdparty/gcc.git] / gcc / config / vax / constraints.md
CommitLineData
c4e75102 1;; Constraints for the DEC VAX port.
7adcbafe 2;; Copyright (C) 2007-2022 Free Software Foundation, Inc.
c4e75102
MT
3;;
4;; This file is part of GCC.
5;;
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
9;; version.
10;;
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
14;; for more details.
15;;
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/>. */
19
20(define_constraint "Z0"
21 "Match a CONST_INT of 0"
22 (and (match_code "const_int")
23 (match_test "ival == 0")))
24
25(define_constraint "U06"
26 "unsigned 6 bit value (0..63)"
27 (and (match_code "const_int")
01512446 28 (match_test "ival >= 0 && ival < 64")))
c4e75102
MT
29
30(define_constraint "U08"
31 "Unsigned 8 bit value"
32 (and (match_code "const_int")
01512446 33 (match_test "ival >= 0 && ival < 256")))
c4e75102
MT
34
35(define_constraint "U16"
36 "Unsigned 16 bit value"
37 (and (match_code "const_int")
01512446 38 (match_test "ival >= 0 && ival < 65536")))
c4e75102
MT
39
40(define_constraint "CN6"
41 "negative 6 bit value (-63..-1)"
42 (and (match_code "const_int")
01512446 43 (match_test "ival >= -63 && ival < 0")))
c4e75102
MT
44
45(define_constraint "S08"
46 "signed 8 bit value [old]"
47 (and (match_code "const_int")
01512446 48 (match_test "ival >= -128 && ival < 128")))
c4e75102
MT
49
50(define_constraint "S16"
51 "signed 16 bit value [old]"
52 (and (match_code "const_int")
01512446 53 (match_test "ival >= -32768 && ival < 32768")))
c4e75102
MT
54
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))")))
59
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))")))
64
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))")))
69
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))")))
74
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))")))
79
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))")))
84
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))")))
89
90/* Similar, but for floating constants, and defining letters G and H. */
91
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)")))
96
97/* Optional extra constraints for this machine. */
98
99(define_memory_constraint "Q"
100 "operand is a MEM that does not have a mode-dependent address."
101 (and (match_code "mem")
5bfed9a9
GJL
102 (match_test "!mode_dependent_address_p (XEXP (op, 0),
103 MEM_ADDR_SPACE (op))")))
c4e75102
MT
104
105(define_memory_constraint "B"
106 ""
107 (and (match_operand:BLK 0 "memory_operand")
108 (not (match_operand:BLK 0 "illegal_blk_memory_operand" ""))))
109
110(define_memory_constraint "R"
111 ""
112 (and (match_operand:DI 0 "memory_operand")
113 (not (match_operand:DI 0 "illegal_addsub_di_memory_operand" ""))))
114
85f5a7d6
MR
115(define_constraint "A"
116 "@internal An integer constant suitable for address load operations."
117 (match_test ("CONSTANT_P (op) && pic_symbolic_operand (op, mode)")))
118
c4e75102
MT
119(define_constraint "T"
120 "@internal satisfies CONSTANT_P and, if pic is enabled, is not a SYMBOL_REF, LABEL_REF, or CONST."
97191ad0
JBG
121 (and (match_test ("CONSTANT_P (op)"))
122 (ior (not (match_code "symbol_ref,label_ref,const"))
123 (match_test "!flag_pic"))))