annotate gcc/config/tilepro/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 ;; Constraint definitions for Tilera TILEPro chip.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 ;; Copyright (C) 2011-2018 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3 ;; Contributed by Walter Lee (walt@tilera.com)
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 (define_register_constraint "R00" "R0_REGS" "r0")
kono
parents:
diff changeset
22 (define_register_constraint "R01" "R1_REGS" "r1")
kono
parents:
diff changeset
23 (define_register_constraint "R02" "R2_REGS" "r2")
kono
parents:
diff changeset
24 (define_register_constraint "R03" "R3_REGS" "r3")
kono
parents:
diff changeset
25 (define_register_constraint "R04" "R4_REGS" "r4")
kono
parents:
diff changeset
26 (define_register_constraint "R05" "R5_REGS" "r5")
kono
parents:
diff changeset
27 (define_register_constraint "R06" "R6_REGS" "r6")
kono
parents:
diff changeset
28 (define_register_constraint "R07" "R7_REGS" "r7")
kono
parents:
diff changeset
29 (define_register_constraint "R08" "R8_REGS" "r8")
kono
parents:
diff changeset
30 (define_register_constraint "R09" "R9_REGS" "r9")
kono
parents:
diff changeset
31 (define_register_constraint "R10" "R10_REGS" "r10")
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33 (define_constraint "I"
kono
parents:
diff changeset
34 "A signed 8 bit constant"
kono
parents:
diff changeset
35 (and (match_code "const_int")
kono
parents:
diff changeset
36 (match_test "ival >= -128 && ival <= 127")))
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 (define_constraint "J"
kono
parents:
diff changeset
39 "Signed 16-bit integer constant"
kono
parents:
diff changeset
40 (and (match_code "const_int")
kono
parents:
diff changeset
41 (match_test "ival >= -32768 && ival <= 32767")))
kono
parents:
diff changeset
42
kono
parents:
diff changeset
43 (define_constraint "K"
kono
parents:
diff changeset
44 "Nonzero integer constant with low 16 bits zero"
kono
parents:
diff changeset
45 (and (match_code "const_int")
kono
parents:
diff changeset
46 (match_test "ival && (ival & 0xFFFF) == 0")))
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 (define_constraint "L"
kono
parents:
diff changeset
49 "Integer constant that fits in one signed byte when incremented"
kono
parents:
diff changeset
50 (and (match_code "const_int")
kono
parents:
diff changeset
51 (match_test "ival >= -129 && ival <= 126")))
kono
parents:
diff changeset
52
kono
parents:
diff changeset
53 (define_constraint "M"
kono
parents:
diff changeset
54 "A bit mask suitable for 'mm'"
kono
parents:
diff changeset
55 (and (match_code "const_int")
kono
parents:
diff changeset
56 (match_test "tilepro_bitfield_operand_p (ival, NULL, NULL)")))
kono
parents:
diff changeset
57
kono
parents:
diff changeset
58 (define_constraint "N"
kono
parents:
diff changeset
59 "Integer constant that is a byte tiled out four times"
kono
parents:
diff changeset
60 (and (match_code "const_int")
kono
parents:
diff changeset
61 (match_test "(ival & 0xFFFFFFFF) == (ival & 0xFF) * 0x01010101")))
kono
parents:
diff changeset
62
kono
parents:
diff changeset
63 (define_constraint "O"
kono
parents:
diff changeset
64 "The integer zero constant"
kono
parents:
diff changeset
65 (and (match_code "const_int")
kono
parents:
diff changeset
66 (match_test "ival == 0")))
kono
parents:
diff changeset
67
kono
parents:
diff changeset
68 (define_constraint "P"
kono
parents:
diff changeset
69 "Integer constant that is a sign-extended byte tiled out as two shorts"
kono
parents:
diff changeset
70 (and (match_code "const_int")
kono
parents:
diff changeset
71 (match_test "((ival & 0xFFFFFFFF)
kono
parents:
diff changeset
72 == ((trunc_int_for_mode (ival, QImode) & 0xFFFF)
kono
parents:
diff changeset
73 * 0x00010001))")))
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 (define_constraint "Q"
kono
parents:
diff changeset
76 "Integer constant that fits in one signed byte when incremented, but not -1"
kono
parents:
diff changeset
77 (and (match_code "const_int")
kono
parents:
diff changeset
78 (match_test "ival >= -129 && ival <= 126 && ival != -1")))
kono
parents:
diff changeset
79
kono
parents:
diff changeset
80 (define_constraint "T"
kono
parents:
diff changeset
81 "A const symbolc operand"
kono
parents:
diff changeset
82 (match_operand 0 "const_symbolic_operand"))
kono
parents:
diff changeset
83
kono
parents:
diff changeset
84 (define_memory_constraint "U"
kono
parents:
diff changeset
85 "Non-auto-incrementing memory"
kono
parents:
diff changeset
86 (and (match_code "mem")
kono
parents:
diff changeset
87 (match_test "GET_RTX_CLASS (GET_CODE (XEXP (op, 0))) != RTX_AUTOINC")))
kono
parents:
diff changeset
88
kono
parents:
diff changeset
89 (define_constraint "W"
kono
parents:
diff changeset
90 "A 4-element vector constant with identical elements"
kono
parents:
diff changeset
91 (and (match_code "const_vector")
kono
parents:
diff changeset
92 (match_test "CONST_VECTOR_NUNITS (op) == 4")
kono
parents:
diff changeset
93 (match_test "const_vec_duplicate_p (op)")))
kono
parents:
diff changeset
94
kono
parents:
diff changeset
95 (define_constraint "Y"
kono
parents:
diff changeset
96 "A 2-element vector constant with identical elements"
kono
parents:
diff changeset
97 (and (match_code "const_vector")
kono
parents:
diff changeset
98 (match_test "CONST_VECTOR_NUNITS (op) == 2")
kono
parents:
diff changeset
99 (match_test "const_vec_duplicate_p (op)")))