annotate gcc/config/mmix/constraints.md @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ;; MMIX constraints
kono
parents:
diff changeset
2 ;; Copyright (C) 2012-2017 Free Software Foundation, Inc.
kono
parents:
diff changeset
3 ;;
kono
parents:
diff changeset
4 ;; This file is part of GCC.
kono
parents:
diff changeset
5 ;;
kono
parents:
diff changeset
6 ;; GCC is free software; you can redistribute it and/or modify it
kono
parents:
diff changeset
7 ;; under the terms of the GNU General Public License as published by
kono
parents:
diff changeset
8 ;; the Free Software Foundation; either version 3, or (at your option)
kono
parents:
diff changeset
9 ;; any later version.
kono
parents:
diff changeset
10 ;;
kono
parents:
diff changeset
11 ;; GCC is distributed in the hope that it will be useful, but WITHOUT
kono
parents:
diff changeset
12 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
kono
parents:
diff changeset
13 ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
kono
parents:
diff changeset
14 ;; License for more details.
kono
parents:
diff changeset
15 ;;
kono
parents:
diff changeset
16 ;; You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
17 ;; along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
18 ;; <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 (define_register_constraint "x" "SYSTEM_REGS"
kono
parents:
diff changeset
21 "@internal")
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 (define_register_constraint "y" "REMAINDER_REG"
kono
parents:
diff changeset
24 "@internal")
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 (define_register_constraint "z" "HIMULT_REG"
kono
parents:
diff changeset
27 "@internal")
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 (define_constraint "I"
kono
parents:
diff changeset
30 "A 8-bit unsigned integer"
kono
parents:
diff changeset
31 (and (match_code "const_int")
kono
parents:
diff changeset
32 (match_test "IN_RANGE (ival, 0, 255)")))
kono
parents:
diff changeset
33
kono
parents:
diff changeset
34 (define_constraint "J"
kono
parents:
diff changeset
35 "A 16-bit unsigned integer."
kono
parents:
diff changeset
36 (and (match_code "const_int")
kono
parents:
diff changeset
37 (match_test "IN_RANGE (ival, 0, 65535)")))
kono
parents:
diff changeset
38
kono
parents:
diff changeset
39 (define_constraint "K"
kono
parents:
diff changeset
40 "An integer between -255 and 0."
kono
parents:
diff changeset
41 (and (match_code "const_int")
kono
parents:
diff changeset
42 (match_test "IN_RANGE (ival, -255, 0)")))
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44 (define_constraint "L"
kono
parents:
diff changeset
45 "@internal"
kono
parents:
diff changeset
46 (and (match_code "const_int")
kono
parents:
diff changeset
47 (match_test "mmix_shiftable_wyde_value (ival)")))
kono
parents:
diff changeset
48
kono
parents:
diff changeset
49 (define_constraint "M"
kono
parents:
diff changeset
50 "The value 0."
kono
parents:
diff changeset
51 (and (match_code "const_int")
kono
parents:
diff changeset
52 (match_test "ival == 0")))
kono
parents:
diff changeset
53
kono
parents:
diff changeset
54 (define_constraint "N"
kono
parents:
diff changeset
55 "@internal"
kono
parents:
diff changeset
56 (and (match_code "const_int")
kono
parents:
diff changeset
57 (match_test "mmix_shiftable_wyde_value (~ival)")))
kono
parents:
diff changeset
58
kono
parents:
diff changeset
59 (define_constraint "O"
kono
parents:
diff changeset
60 "The value 3, 5, 9, or 17."
kono
parents:
diff changeset
61 (and (match_code "const_int")
kono
parents:
diff changeset
62 (ior (match_test "ival == 3")
kono
parents:
diff changeset
63 (match_test "ival == 5")
kono
parents:
diff changeset
64 (match_test "ival == 9")
kono
parents:
diff changeset
65 (match_test "ival == 17"))))
kono
parents:
diff changeset
66
kono
parents:
diff changeset
67 ;; FIXME: M (or G) is redundant.
kono
parents:
diff changeset
68
kono
parents:
diff changeset
69 (define_constraint "G"
kono
parents:
diff changeset
70 "Floating-point zero."
kono
parents:
diff changeset
71 (and (match_code "const_double")
kono
parents:
diff changeset
72 (match_test "op == CONST0_RTX (mode)")))
kono
parents:
diff changeset
73
kono
parents:
diff changeset
74 ;; R asks whether x is to be loaded with GETA or something else. Right
kono
parents:
diff changeset
75 ;; now, only a SYMBOL_REF and LABEL_REF can fit for
kono
parents:
diff changeset
76 ;; TARGET_BASE_ADDRESSES.
kono
parents:
diff changeset
77 ;;
kono
parents:
diff changeset
78 ;; Only constant symbolic addresses apply. With TARGET_BASE_ADDRESSES,
kono
parents:
diff changeset
79 ;; we just allow straight LABEL_REF or SYMBOL_REFs with SYMBOL_REF_FLAG
kono
parents:
diff changeset
80 ;; set right now; only function addresses and code labels. If we change
kono
parents:
diff changeset
81 ;; to let SYMBOL_REF_FLAG be set on other symbols, we have to check
kono
parents:
diff changeset
82 ;; inside CONST expressions. When TARGET_BASE_ADDRESSES is not in
kono
parents:
diff changeset
83 ;; effect, a "raw" constant check together with mmix_constant_address_p
kono
parents:
diff changeset
84 ;; is all that's needed; we want all constant addresses to be loaded
kono
parents:
diff changeset
85 ;; with GETA then.
kono
parents:
diff changeset
86
kono
parents:
diff changeset
87 (define_constraint "R"
kono
parents:
diff changeset
88 "@internal"
kono
parents:
diff changeset
89 (and (not (match_code "const_int,const_double"))
kono
parents:
diff changeset
90 (match_test "mmix_constant_address_p (op)")
kono
parents:
diff changeset
91 (ior (match_test "!TARGET_BASE_ADDRESSES")
kono
parents:
diff changeset
92 (match_code "label_ref")
kono
parents:
diff changeset
93 (and (match_code "symbol_ref")
kono
parents:
diff changeset
94 (match_test "SYMBOL_REF_FLAG (op)")))))
kono
parents:
diff changeset
95
kono
parents:
diff changeset
96 ;; FIXME: L (or S) is redundant.
kono
parents:
diff changeset
97
kono
parents:
diff changeset
98 (define_constraint "S"
kono
parents:
diff changeset
99 "@internal"
kono
parents:
diff changeset
100 (and (match_code "const_int,const_double")
kono
parents:
diff changeset
101 (match_test "mmix_shiftable_wyde_value (mmix_intval (op))")))
kono
parents:
diff changeset
102
kono
parents:
diff changeset
103 ;; FIXME: N (or T) is redundant.
kono
parents:
diff changeset
104
kono
parents:
diff changeset
105 (define_constraint "T"
kono
parents:
diff changeset
106 "@internal"
kono
parents:
diff changeset
107 (and (match_code "const_int,const_double")
kono
parents:
diff changeset
108 (match_test "mmix_shiftable_wyde_value (~mmix_intval (op))")))
kono
parents:
diff changeset
109
kono
parents:
diff changeset
110 (define_address_constraint "U"
kono
parents:
diff changeset
111 "@internal"
kono
parents:
diff changeset
112 (match_operand 0 "mmix_address_operand"))
kono
parents:
diff changeset
113
kono
parents:
diff changeset
114 (define_constraint "Yf"
kono
parents:
diff changeset
115 "@internal"
kono
parents:
diff changeset
116 (match_operand 0 "frame_pointer_operand"))