1 |
709 |
jeremybenn |
;; Constraint definitions for Tilera TILEPro chip.
|
2 |
|
|
;; Copyright (C) 2011, 2012
|
3 |
|
|
;; Free Software Foundation, Inc.
|
4 |
|
|
;; Contributed by Walter Lee (walt@tilera.com)
|
5 |
|
|
;;
|
6 |
|
|
;; This file is part of GCC.
|
7 |
|
|
;;
|
8 |
|
|
;; GCC is free software; you can redistribute it and/or modify it
|
9 |
|
|
;; under the terms of the GNU General Public License as published
|
10 |
|
|
;; by the Free Software Foundation; either version 3, or (at your
|
11 |
|
|
;; option) any later version.
|
12 |
|
|
;;
|
13 |
|
|
;; GCC is distributed in the hope that it will be useful, but WITHOUT
|
14 |
|
|
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
15 |
|
|
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
16 |
|
|
;; License for more details.
|
17 |
|
|
;;
|
18 |
|
|
;; You should have received a copy of the GNU General Public License
|
19 |
|
|
;; along with GCC; see the file COPYING3. If not see
|
20 |
|
|
;; .
|
21 |
|
|
|
22 |
|
|
(define_register_constraint "R00" "R0_REGS" "r0")
|
23 |
|
|
(define_register_constraint "R01" "R1_REGS" "r1")
|
24 |
|
|
(define_register_constraint "R02" "R2_REGS" "r2")
|
25 |
|
|
(define_register_constraint "R03" "R3_REGS" "r3")
|
26 |
|
|
(define_register_constraint "R04" "R4_REGS" "r4")
|
27 |
|
|
(define_register_constraint "R05" "R5_REGS" "r5")
|
28 |
|
|
(define_register_constraint "R06" "R6_REGS" "r6")
|
29 |
|
|
(define_register_constraint "R07" "R7_REGS" "r7")
|
30 |
|
|
(define_register_constraint "R08" "R8_REGS" "r8")
|
31 |
|
|
(define_register_constraint "R09" "R9_REGS" "r9")
|
32 |
|
|
(define_register_constraint "R10" "R10_REGS" "r10")
|
33 |
|
|
|
34 |
|
|
(define_constraint "I"
|
35 |
|
|
"A signed 8 bit constant"
|
36 |
|
|
(and (match_code "const_int")
|
37 |
|
|
(match_test "ival >= -128 && ival <= 127")))
|
38 |
|
|
|
39 |
|
|
(define_constraint "J"
|
40 |
|
|
"Signed 16-bit integer constant"
|
41 |
|
|
(and (match_code "const_int")
|
42 |
|
|
(match_test "ival >= -32768 && ival <= 32767")))
|
43 |
|
|
|
44 |
|
|
(define_constraint "K"
|
45 |
|
|
"Nonzero integer constant with low 16 bits zero"
|
46 |
|
|
(and (match_code "const_int")
|
47 |
|
|
(match_test "ival && (ival & 0xFFFF) == 0")))
|
48 |
|
|
|
49 |
|
|
(define_constraint "L"
|
50 |
|
|
"Integer constant that fits in one signed byte when incremented"
|
51 |
|
|
(and (match_code "const_int")
|
52 |
|
|
(match_test "ival >= -129 && ival <= 126")))
|
53 |
|
|
|
54 |
|
|
(define_constraint "M"
|
55 |
|
|
"A bit mask suitable for 'mm'"
|
56 |
|
|
(and (match_code "const_int")
|
57 |
|
|
(match_test "tilepro_bitfield_operand_p (ival, NULL, NULL)")))
|
58 |
|
|
|
59 |
|
|
(define_constraint "N"
|
60 |
|
|
"Integer constant that is a byte tiled out four times"
|
61 |
|
|
(and (match_code "const_int")
|
62 |
|
|
(match_test "(ival & 0xFFFFFFFF) == (ival & 0xFF) * 0x01010101")))
|
63 |
|
|
|
64 |
|
|
(define_constraint "O"
|
65 |
|
|
"The integer zero constant"
|
66 |
|
|
(and (match_code "const_int")
|
67 |
|
|
(match_test "ival == 0")))
|
68 |
|
|
|
69 |
|
|
(define_constraint "P"
|
70 |
|
|
"Integer constant that is a sign-extended byte tiled out as two shorts"
|
71 |
|
|
(and (match_code "const_int")
|
72 |
|
|
(match_test "((ival & 0xFFFFFFFF)
|
73 |
|
|
== ((trunc_int_for_mode (ival, QImode) & 0xFFFF)
|
74 |
|
|
* 0x00010001))")))
|
75 |
|
|
|
76 |
|
|
(define_constraint "Q"
|
77 |
|
|
"Integer constant that fits in one signed byte when incremented, but not -1"
|
78 |
|
|
(and (match_code "const_int")
|
79 |
|
|
(match_test "ival >= -129 && ival <= 126 && ival != -1")))
|
80 |
|
|
|
81 |
|
|
(define_constraint "T"
|
82 |
|
|
"A const symbolc operand"
|
83 |
|
|
(match_operand 0 "const_symbolic_operand"))
|
84 |
|
|
|
85 |
|
|
(define_memory_constraint "U"
|
86 |
|
|
"Non-auto-incrementing memory"
|
87 |
|
|
(and (match_code "mem")
|
88 |
|
|
(match_test "GET_RTX_CLASS (GET_CODE (XEXP (op, 0))) != RTX_AUTOINC")))
|
89 |
|
|
|
90 |
|
|
(define_constraint "W"
|
91 |
|
|
"A 4-element vector constant with identical elements"
|
92 |
|
|
(and (match_code "const_vector")
|
93 |
|
|
(match_test "CONST_VECTOR_NUNITS (op) == 4")
|
94 |
|
|
(match_test "CONST_VECTOR_ELT (op, 0) == CONST_VECTOR_ELT (op, 1)")
|
95 |
|
|
(match_test "CONST_VECTOR_ELT (op, 0) == CONST_VECTOR_ELT (op, 2)")
|
96 |
|
|
(match_test "CONST_VECTOR_ELT (op, 0) == CONST_VECTOR_ELT (op, 3)")))
|
97 |
|
|
|
98 |
|
|
(define_constraint "Y"
|
99 |
|
|
"A 2-element vector constant with identical elements"
|
100 |
|
|
(and (match_code "const_vector")
|
101 |
|
|
(match_test "CONST_VECTOR_NUNITS (op) == 2")
|
102 |
|
|
(match_test "CONST_VECTOR_ELT (op, 0) == CONST_VECTOR_ELT (op, 1)")))
|