1 ;; Constraint definitions for DEC Alpha.
2 ;; Copyright (C) 2007 Free Software Foundation, Inc.
4 ;; This file is part of GCC.
6 ;; GCC is free software; you can redistribute it and/or modify
7 ;; it under the terms of the GNU General Public License as published by
8 ;; the Free Software Foundation; either version 3, or (at your option)
11 ;; GCC is distributed in the hope that it will be useful,
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;; GNU General Public License for more details.
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/>.
22 ;;; de ghijklmnopq stu wxyz
24 ;; Integer register constraints.
26 (define_register_constraint "a" "R24_REG"
27 "General register 24, input to division routine")
29 (define_register_constraint "b" "R25_REG"
30 "General register 24, input to division routine")
32 (define_register_constraint "c" "R27_REG"
33 "General register 27, function call address")
35 (define_register_constraint "f" "FLOAT_REGS"
36 "Any floating-point register")
38 (define_register_constraint "v" "R0_REG"
39 "General register 0, function value return address")
41 ;; Integer constant constraints.
42 (define_constraint "I"
43 "An unsigned 8 bit constant"
44 (and (match_code "const_int")
45 (match_test "IN_RANGE (ival, 0, 255)")))
47 (define_constraint "J"
49 (and (match_code "const_int")
50 (match_test "ival == 0")))
52 (define_constraint "K"
53 "Signed 16-bit integer constant"
54 (and (match_code "const_int")
55 (match_test "IN_RANGE (ival, -32768, 32767)")))
57 (define_constraint "L"
58 "A shifted signed 16-bit constant appropriate for LDAH"
59 (and (match_code "const_int")
60 (match_test "(ival & 0xffff) == 0
61 && (ival >> 31 == -1 || ival >> 31 == 0)")))
63 (define_constraint "M"
64 "A valid operand of a ZAP insn"
65 (and (match_code "const_int")
66 (match_test "zap_mask (ival) != 0")))
68 (define_constraint "N"
69 "A complemented unsigned 8-bit constant"
70 (and (match_code "const_int")
71 (match_test "IN_RANGE (~ival, 0, 255)")))
73 (define_constraint "O"
74 "A negated unsigned 8-bit constant"
75 (and (match_code "const_int")
76 (match_test "IN_RANGE (-ival, 0, 255)")))
78 (define_constraint "P"
79 "The constant 1, 2 or 3"
80 (and (match_code "const_int")
81 (match_test "ival == 1 || ival == 2 || ival == 3")))
83 (define_constraint "H"
84 "A valid operand of a ZAP insn, when building with 32-bit HOST_WIDE_INT"
85 (and (match_code "const_double")
86 (match_test "mode == VOIDmode && zap_mask (hval) && zap_mask (lval)")))
88 ;; Floating-point constant constraints.
89 (define_constraint "G"
90 "The floating point zero constant"
91 (and (match_code "const_double")
92 (match_test "GET_MODE_CLASS (mode) == MODE_FLOAT
93 && op == CONST0_RTX (mode)")))
95 ;; "Extra" constraints.
96 (define_constraint "Q"
97 "@internal A normal_memory_operand"
98 (match_operand 0 "normal_memory_operand"))
100 (define_constraint "R"
101 "@internal A direct_call_operand"
102 (match_operand:DI 0 "direct_call_operand"))
104 (define_constraint "S"
105 "An unsigned 6-bit constant"
106 (and (match_code "const_int")
107 (match_test "IN_RANGE (ival, 0, 63)")))
109 (define_constraint "T"
110 "@internal A high-part symbol"
113 (define_constraint "U"
114 "@internal A UNICOSMK symbol"
115 (and (match_test "TARGET_ABI_UNICOSMK")
116 (match_operand 0 "symbolic_operand")))
118 (define_constraint "W"
119 "A vector zero constant"
120 (and (match_code "const_vector")
121 (match_test "op == CONST0_RTX (mode)")))