2 ;; Copyright (C) 2012-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
7 ;; 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, but WITHOUT
12 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14 ;; 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/>. */
20 (define_register_constraint "x" "SYSTEM_REGS"
23 (define_register_constraint "y" "REMAINDER_REG"
26 (define_register_constraint "z" "HIMULT_REG"
29 (define_constraint "I"
30 "A 8-bit unsigned integer"
31 (and (match_code "const_int")
32 (match_test "IN_RANGE (ival, 0, 255)")))
34 (define_constraint "J"
35 "A 16-bit unsigned integer."
36 (and (match_code "const_int")
37 (match_test "IN_RANGE (ival, 0, 65535)")))
39 (define_constraint "K"
40 "An integer between -255 and 0."
41 (and (match_code "const_int")
42 (match_test "IN_RANGE (ival, -255, 0)")))
44 (define_constraint "L"
46 (and (match_code "const_int")
47 (match_test "mmix_shiftable_wyde_value (ival)")))
49 (define_constraint "M"
51 (and (match_code "const_int")
52 (match_test "ival == 0")))
54 (define_constraint "N"
56 (and (match_code "const_int")
57 (match_test "mmix_shiftable_wyde_value (~ival)")))
59 (define_constraint "O"
60 "The value 3, 5, 9, or 17."
61 (and (match_code "const_int")
62 (ior (match_test "ival == 3")
63 (match_test "ival == 5")
64 (match_test "ival == 9")
65 (match_test "ival == 17"))))
67 ;; FIXME: M (or G) is redundant.
69 (define_constraint "G"
70 "Floating-point zero."
71 (and (match_code "const_double")
72 (match_test "op == CONST0_RTX (mode)")))
74 ;; R asks whether x is to be loaded with GETA or something else. Right
75 ;; now, only a SYMBOL_REF and LABEL_REF can fit for
76 ;; TARGET_BASE_ADDRESSES.
78 ;; Only constant symbolic addresses apply. With TARGET_BASE_ADDRESSES,
79 ;; we just allow straight LABEL_REF or SYMBOL_REFs with SYMBOL_REF_FLAG
80 ;; set right now; only function addresses and code labels. If we change
81 ;; to let SYMBOL_REF_FLAG be set on other symbols, we have to check
82 ;; inside CONST expressions. When TARGET_BASE_ADDRESSES is not in
83 ;; effect, a "raw" constant check together with mmix_constant_address_p
84 ;; is all that's needed; we want all constant addresses to be loaded
87 (define_constraint "R"
89 (and (not (match_code "const_int,const_double"))
90 (match_test "mmix_constant_address_p (op)")
91 (ior (match_test "!TARGET_BASE_ADDRESSES")
92 (match_code "label_ref")
93 (and (match_code "symbol_ref")
94 (match_test "SYMBOL_REF_FLAG (op)")))))
96 ;; FIXME: L (or S) is redundant.
98 (define_constraint "S"
100 (and (match_code "const_int,const_double")
101 (match_test "mmix_shiftable_wyde_value (mmix_intval (op))")))
103 ;; FIXME: N (or T) is redundant.
105 (define_constraint "T"
107 (and (match_code "const_int,const_double")
108 (match_test "mmix_shiftable_wyde_value (~mmix_intval (op))")))
110 (define_address_constraint "U"
112 (match_operand 0 "mmix_address_operand"))
114 (define_constraint "Yf"
116 (match_operand 0 "frame_pointer_operand"))