annotate gcc/config/cr16/constraints.md @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ;; Predicates of machine description for CR16.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 ;; Copyright (C) 2012-2018 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3 ;; Contributed by KPIT Cummins Infosystems Limited.
kono
parents:
diff changeset
4 ;;
kono
parents:
diff changeset
5 ;; This file is part of GCC.
kono
parents:
diff changeset
6 ;;
kono
parents:
diff changeset
7 ;; GCC is free software; you can redistribute it and/or modify it
kono
parents:
diff changeset
8 ;; under the terms of the GNU General Public License as published
kono
parents:
diff changeset
9 ;; by the Free Software Foundation; either version 3, or (at your
kono
parents:
diff changeset
10 ;; option) any later version.
kono
parents:
diff changeset
11 ;;
kono
parents:
diff changeset
12 ;; GCC is distributed in the hope that it will be useful, but WITHOUT
kono
parents:
diff changeset
13 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
kono
parents:
diff changeset
14 ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
kono
parents:
diff changeset
15 ;; License for more details.
kono
parents:
diff changeset
16 ;;
kono
parents:
diff changeset
17 ;; You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
18 ;; along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
19 ;; <http://www.gnu.org/licenses/>.
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 ;; Constraints
kono
parents:
diff changeset
22 ;; Register constraints
kono
parents:
diff changeset
23 (define_register_constraint "b" "NOSP_REGS"
kono
parents:
diff changeset
24 "@no sp registers")
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 (define_register_constraint "c" "SHORT_REGS"
kono
parents:
diff changeset
27 "@short registers")
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 (define_register_constraint "d" "LONG_REGS"
kono
parents:
diff changeset
30 "@long registers")
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 ;; Integer constraints.
kono
parents:
diff changeset
33 (define_constraint "I"
kono
parents:
diff changeset
34 "A signed 4-bit immediate."
kono
parents:
diff changeset
35 (and (match_code "const_int")
kono
parents:
diff changeset
36 (match_test "SIGNED_INT_FITS_N_BITS (ival, 4)")))
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 (define_constraint "J"
kono
parents:
diff changeset
39 "A signed 5-bit immediate."
kono
parents:
diff changeset
40 (and (match_code "const_int")
kono
parents:
diff changeset
41 (match_test "SIGNED_INT_FITS_N_BITS (ival, 5)")))
kono
parents:
diff changeset
42
kono
parents:
diff changeset
43 (define_constraint "K"
kono
parents:
diff changeset
44 "A signed 6-bit immediate."
kono
parents:
diff changeset
45 (and (match_code "const_int")
kono
parents:
diff changeset
46 (match_test "SIGNED_INT_FITS_N_BITS (ival, 6)")))
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 (define_constraint "L"
kono
parents:
diff changeset
49 "A unsigned 4-bit immediate."
kono
parents:
diff changeset
50 (and (match_code "const_int")
kono
parents:
diff changeset
51 (match_test "UNSIGNED_INT_FITS_N_BITS (ival, 4)")))
kono
parents:
diff changeset
52
kono
parents:
diff changeset
53 (define_constraint "M"
kono
parents:
diff changeset
54 "A unsigned and customized 4-bit immediate."
kono
parents:
diff changeset
55 (and (match_code "const_int")
kono
parents:
diff changeset
56 (match_test "(IN_RANGE_P (ival, 0, 15) && ((ival != 9) && (ival != 11)))")))
kono
parents:
diff changeset
57
kono
parents:
diff changeset
58 (define_constraint "N"
kono
parents:
diff changeset
59 "A signed 16-bit immediate."
kono
parents:
diff changeset
60 (and (match_code "const_int")
kono
parents:
diff changeset
61 (match_test "IN_RANGE_P (ival, -32768, 32767)")))
kono
parents:
diff changeset
62
kono
parents:
diff changeset
63 (define_constraint "O"
kono
parents:
diff changeset
64 "A unsigned 20-bit immediate."
kono
parents:
diff changeset
65 (and (match_code "const_int")
kono
parents:
diff changeset
66 (match_test "IN_RANGE_P (ival, 0, 1048575)")))
kono
parents:
diff changeset
67
kono
parents:
diff changeset
68 (define_constraint "Q"
kono
parents:
diff changeset
69 "A shift QI immediate."
kono
parents:
diff changeset
70 (and (match_code "const_int")
kono
parents:
diff changeset
71 (match_test "IN_RANGE_P (ival, 0, 7)")))
kono
parents:
diff changeset
72
kono
parents:
diff changeset
73 (define_constraint "R"
kono
parents:
diff changeset
74 "A shift HI immediate."
kono
parents:
diff changeset
75 (and (match_code "const_int")
kono
parents:
diff changeset
76 (match_test "IN_RANGE_P (ival, 0, 15)")))
kono
parents:
diff changeset
77
kono
parents:
diff changeset
78 (define_constraint "S"
kono
parents:
diff changeset
79 "A shift SI immediate."
kono
parents:
diff changeset
80 (and (match_code "const_int")
kono
parents:
diff changeset
81 (match_test "IN_RANGE_P (ival, 0, 31)")))