1 ;; Constraint definitions for DEC Alpha.
2 ;; Copyright (C) 2007, 2011 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 ghijkl pq tu 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" "TARGET_FPREGS ? FLOAT_REGS : NO_REGS"
36 "Any floating-point register")
38 (define_register_constraint "v" "R0_REG"
39 "General register 0, function value return address")
41 (define_memory_constraint "w"
42 "A memory whose address is only a register"
43 (match_operand 0 "mem_noofs_operand"))
45 ;; Integer constant constraints.
46 (define_constraint "I"
47 "An unsigned 8 bit constant"
48 (and (match_code "const_int")
49 (match_test "IN_RANGE (ival, 0, 255)")))
51 (define_constraint "J"
53 (and (match_code "const_int")
54 (match_test "ival == 0")))
56 (define_constraint "K"
57 "Signed 16-bit integer constant"
58 (and (match_code "const_int")
59 (match_test "IN_RANGE (ival, -32768, 32767)")))
61 (define_constraint "L"
62 "A shifted signed 16-bit constant appropriate for LDAH"
63 (and (match_code "const_int")
64 (match_test "(ival & 0xffff) == 0
65 && (ival >> 31 == -1 || ival >> 31 == 0)")))
67 (define_constraint "M"
68 "A valid operand of a ZAP insn"
69 (and (match_code "const_int")
70 (match_test "zap_mask (ival) != 0")))
72 (define_constraint "N"
73 "A complemented unsigned 8-bit constant"
74 (and (match_code "const_int")
75 (match_test "IN_RANGE (~ival, 0, 255)")))
77 (define_constraint "O"
78 "A negated unsigned 8-bit constant"
79 (and (match_code "const_int")
80 (match_test "IN_RANGE (-ival, 0, 255)")))
82 (define_constraint "P"
83 "The constant 1, 2 or 3"
84 (and (match_code "const_int")
85 (match_test "ival == 1 || ival == 2 || ival == 3")))
87 (define_constraint "H"
88 "A valid operand of a ZAP insn, when building with 32-bit HOST_WIDE_INT"
89 (and (match_code "const_double")
90 (match_test "mode == VOIDmode && zap_mask (hval) && zap_mask (lval)")))
92 ;; Floating-point constant constraints.
93 (define_constraint "G"
94 "The floating point zero constant"
95 (and (match_code "const_double")
96 (match_test "GET_MODE_CLASS (mode) == MODE_FLOAT
97 && op == CONST0_RTX (mode)")))
99 ;; "Extra" constraints.
100 (define_constraint "Q"
101 "@internal A normal_memory_operand"
102 (match_operand 0 "normal_memory_operand"))
104 (define_constraint "R"
105 "@internal A direct_call_operand"
106 (match_operand:DI 0 "direct_call_operand"))
108 (define_constraint "S"
109 "An unsigned 6-bit constant"
110 (and (match_code "const_int")
111 (match_test "IN_RANGE (ival, 0, 63)")))
113 (define_constraint "T"
114 "@internal A high-part symbol"
117 (define_constraint "W"
118 "A vector zero constant"
119 (and (match_code "const_vector")
120 (match_test "op == CONST0_RTX (mode)")))