annotate gcc/config/s390/s390-modes.def @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents 77e2b8dfacca
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 /* Definitions of target machine for GNU compiler, for IBM S/390
111
kono
parents: 55
diff changeset
2 Copyright (C) 2002-2017 Free Software Foundation, Inc.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 Contributed by Hartmut Penner (hpenner@de.ibm.com) and
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 Ulrich Weigand (uweigand@de.ibm.com).
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 This file is part of GCC.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 GCC is free software; you can redistribute it and/or modify it under
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 the terms of the GNU General Public License as published by the Free
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 Software Foundation; either version 3, or (at your option) any later
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 version.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 for more details.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 along with GCC; see the file COPYING3. If not see
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 <http://www.gnu.org/licenses/>. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 /* 256-bit integer mode is needed for STACK_SAVEAREA_MODE. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 INT_MODE (OI, 32);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 /* Define TFmode to work around reload problem PR 20927. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 FLOAT_MODE (TF, 16, ieee_quad_format);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 /* Add any extra modes needed to represent the condition code. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 Condition Codes
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 Check for zero
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 CCZ: EQ NE NE NE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 CCZ1: EQ NE (CS)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 Unsigned compares
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 CCU: EQ LTU GTU NE (CLG/R, CL/R/Y, CLM/Y, CLI/Y)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 CCUR: EQ GTU LTU NE (CLGF/R)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 Signed compares
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 CCS: EQ LT GT UNORDERED (LTGFR, LTGR, LTR, ICM/Y,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 LTDBR, LTDR, LTEBR, LTER,
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
48 CG/R, C/R/Y, CGHI, CHI,
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
49 CDB/R, CD/R, CEB/R, CE/R,
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 ADB/R, AEB/R, SDB/R, SEB/R,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 SRAG, SRA, SRDA)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 CCSR: EQ GT LT UNORDERED (CGF/R, CH/Y)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 Condition codes resulting from add with overflow
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
55
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 CCA: EQ LT GT Overflow
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 CCAP: EQ LT GT LT (AGHI, AHI)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 CCAN: EQ LT GT GT (AGHI, AHI)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 Condition codes of unsigned adds and subs
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
61
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 CCL: EQ NE EQ NE (ALGF/R, ALG/R, AL/R/Y,
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
63 ALCG/R, ALC/R,
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 SLGF/R, SLG/R, SL/R/Y,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 SLBG/R, SLB/R)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 CCL1: GEU GEU LTU LTU (ALG/R, AL/R/Y)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 CCL2: GTU GTU LEU LEU (SLG/R, SL/R/Y)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 CCL3: EQ LTU EQ GTU (SLG/R, SL/R/Y)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
69
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 Test under mask checks
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
71
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
72 CCT: EQ NE NE NE (ICM/Y, TML, CG/R, CGHI,
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 C/R/Y, CHI, NG/R, N/R/Y,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 OG/R, O/R/Y, XG/R, X/R/Y)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 CCT1: NE EQ NE NE (TMH, TML)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 CCT2: NE NE EQ NE (TMH, TML)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 CCT3: NE NE NE EQ (TMH, TML)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
78
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
79 CCA and CCT modes are request only modes. These modes are never returned by
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 s390_select_cc_mode. They are only intended to match other modes.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
81
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 Requested mode -> Destination CC register mode
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
83
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 CCS, CCU, CCT, CCSR, CCUR -> CCZ
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 CCA -> CCAP, CCAN
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
86
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
87
111
kono
parents: 55
diff changeset
88
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 *** Comments ***
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
90
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 CCAP, CCAN
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
92
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
93 The CC obtained from add instruction usually can't be used for comparisons
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
94 because its coupling with overflow flag. In case of an overflow the
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
95 less than/greater than data are lost. Nevertheless a comparison can be done
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
96 whenever immediate values are involved because they are known at compile time.
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
97 If you know whether the used constant is positive or negative you can predict
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 the sign of the result even in case of an overflow.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
99
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
100
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 CCT, CCT1, CCT2, CCT3
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
102
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
103 If bits of an integer masked with an AND instruction are checked, the test under
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 mask instructions turn out to be very handy for a set of special cases.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
105 The simple cases are checks whether all masked bits are zero or ones:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
106
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
107 int a;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 if ((a & (16 + 128)) == 0) -> CCT/CCZ
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
109 if ((a & (16 + 128)) == 16 + 128) -> CCT3
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
110
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
111 Using two extra modes makes it possible to do complete checks on two bits of an
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 integer (This is possible on register operands only. TM does not provide the
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 information necessary for CCT1 and CCT2 modes.):
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
114
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 int a;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 if ((a & (16 + 128)) == 16) -> CCT1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 if ((a & (16 + 128)) == 128) -> CCT2
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
118
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
119
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 CCSR, CCUR
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
121
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
122 There are several instructions comparing 32 bit with 64-bit unsigned/signed
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 values. Such instructions can be considered to have a builtin zero/sign_extend.
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
124 The problem is that in the RTL (to be canonical) the zero/sign extended operand
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
125 has to be the first one but the machine instructions like it the other way
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
126 around. The following both modes can be considered as CCS and CCU modes with
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 exchanged operands.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
128
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
129
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 CCL1, CCL2
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
131
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
132 These modes represent the result of overflow checks.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
133
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
134 if (a + b < a) -> CCL1 state of the carry bit (CC2 | CC3)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 if (a - b > a) -> CCL2 state of the borrow bit (CC0 | CC1)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
136
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 They are used when multi word numbers are computed dealing one SImode part after
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
138 another or whenever manual overflow checks like the examples above are
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 compiled.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
140
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
141
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
142 CCL3
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
143
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
144 A logical subtract instruction sets the borrow bit in case of an overflow.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
145 The resulting condition code of those instructions is represented by the
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
146 CCL3 mode. Together with the CCU mode this mode is used for jumpless
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
147 implementations of several if-constructs - see s390_expand_addcc for more
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 details.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
149
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
150 CCZ1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
151
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
152 The compare and swap instructions sets the condition code to 0/1 if the
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
153 operands were equal/unequal. The CCZ1 mode ensures the result can be
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
154 effectively placed into a register.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
155
111
kono
parents: 55
diff changeset
156 CCVIH, CCVIHU, CCVFH, CCVFHE
kono
parents: 55
diff changeset
157
kono
parents: 55
diff changeset
158 These are condition code modes used in instructions setting the
kono
parents: 55
diff changeset
159 condition code. The mode determines which comparison to perform (H -
kono
parents: 55
diff changeset
160 high, HU - high unsigned, HE - high or equal) and whether it is a
kono
parents: 55
diff changeset
161 floating point comparison or not (I - int, F - float).
kono
parents: 55
diff changeset
162
kono
parents: 55
diff changeset
163 The comparison operation to be performed needs to be encoded into the
kono
parents: 55
diff changeset
164 condition code mode since the comparison operator is not available in
kono
parents: 55
diff changeset
165 compare style patterns (set cc (compare (op0) (op1))). So the
kono
parents: 55
diff changeset
166 condition code mode is the only information to determine the
kono
parents: 55
diff changeset
167 instruction to be used.
kono
parents: 55
diff changeset
168
kono
parents: 55
diff changeset
169 CCVIALL, CCVIANY, CCVFALL, CCVFANY
kono
parents: 55
diff changeset
170
kono
parents: 55
diff changeset
171 These modes are used in instructions reading the condition code.
kono
parents: 55
diff changeset
172 Opposed to the CC producer patterns the comparison operator is
kono
parents: 55
diff changeset
173 available. Hence the comparison operation does not need to be part of
kono
parents: 55
diff changeset
174 the CC mode. However, we still need to know whether CC has been
kono
parents: 55
diff changeset
175 generated by a float or an integer comparison in order to be able to
kono
parents: 55
diff changeset
176 invert the condition correctly (int: GT -> LE, float: GT -> UNLE).
kono
parents: 55
diff changeset
177
kono
parents: 55
diff changeset
178 The ALL and ANY variants differ only in the usage of CC1 which
kono
parents: 55
diff changeset
179 indicates a mixed result across the vector elements. Be aware that
kono
parents: 55
diff changeset
180 depending on the comparison code the ALL and ANY variants might
kono
parents: 55
diff changeset
181 actually refer to their opposite meaning. I.e. while inverting the
kono
parents: 55
diff changeset
182 comparison in (EQ (reg:CCVIALL 33) (const_int 0)) results in (NE
kono
parents: 55
diff changeset
183 (reg:CCVIALL 33) (const_int 0)) it in fact describes an ANY comparison
kono
parents: 55
diff changeset
184 (inverting "all equal" should be "any not equal") However, the
kono
parents: 55
diff changeset
185 middle-end does invert only the comparison operator without touching
kono
parents: 55
diff changeset
186 the mode.
kono
parents: 55
diff changeset
187 Hence, the ALL/ANY in the mode names refer to the meaning in the
kono
parents: 55
diff changeset
188 context of EQ, GT, GE while for the inverted codes it actually means
kono
parents: 55
diff changeset
189 ANY/ALL.
kono
parents: 55
diff changeset
190
kono
parents: 55
diff changeset
191 CCRAW
kono
parents: 55
diff changeset
192
kono
parents: 55
diff changeset
193 The cc mode generated by a non-compare instruction. The condition
kono
parents: 55
diff changeset
194 code mask for the CC consumer is determined by the comparison operator
kono
parents: 55
diff changeset
195 (only EQ and NE allowed) and the immediate value given as second
kono
parents: 55
diff changeset
196 operand to the operator. For the other CC modes this value used to be
kono
parents: 55
diff changeset
197 0.
kono
parents: 55
diff changeset
198
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
199 */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
200
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
201
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
202 CC_MODE (CCZ);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
203 CC_MODE (CCZ1);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
204 CC_MODE (CCA);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
205 CC_MODE (CCAP);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
206 CC_MODE (CCAN);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
207 CC_MODE (CCL);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
208 CC_MODE (CCL1);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
209 CC_MODE (CCL2);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
210 CC_MODE (CCL3);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
211 CC_MODE (CCU);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
212 CC_MODE (CCUR);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
213 CC_MODE (CCS);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
214 CC_MODE (CCSR);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
215 CC_MODE (CCT);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
216 CC_MODE (CCT1);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
217 CC_MODE (CCT2);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
218 CC_MODE (CCT3);
111
kono
parents: 55
diff changeset
219 CC_MODE (CCRAW);
kono
parents: 55
diff changeset
220
kono
parents: 55
diff changeset
221 CC_MODE (CCVEQ);
kono
parents: 55
diff changeset
222
kono
parents: 55
diff changeset
223 CC_MODE (CCVIH);
kono
parents: 55
diff changeset
224 CC_MODE (CCVIHU);
kono
parents: 55
diff changeset
225
kono
parents: 55
diff changeset
226 CC_MODE (CCVFH);
kono
parents: 55
diff changeset
227 CC_MODE (CCVFHE);
kono
parents: 55
diff changeset
228
kono
parents: 55
diff changeset
229 CC_MODE (CCVIALL);
kono
parents: 55
diff changeset
230 CC_MODE (CCVIANY);
kono
parents: 55
diff changeset
231
kono
parents: 55
diff changeset
232 CC_MODE (CCVFALL);
kono
parents: 55
diff changeset
233 CC_MODE (CCVFANY);
kono
parents: 55
diff changeset
234
kono
parents: 55
diff changeset
235 /* Vector modes. */
kono
parents: 55
diff changeset
236
kono
parents: 55
diff changeset
237 VECTOR_MODES (INT, 2); /* V2QI */
kono
parents: 55
diff changeset
238 VECTOR_MODES (INT, 4); /* V4QI V2HI */
kono
parents: 55
diff changeset
239 VECTOR_MODES (INT, 8); /* V8QI V4HI V2SI */
kono
parents: 55
diff changeset
240 VECTOR_MODES (INT, 16); /* V16QI V8HI V4SI V2DI */
kono
parents: 55
diff changeset
241
kono
parents: 55
diff changeset
242 VECTOR_MODE (FLOAT, SF, 2); /* V2SF */
kono
parents: 55
diff changeset
243 VECTOR_MODE (FLOAT, SF, 4); /* V4SF */
kono
parents: 55
diff changeset
244 VECTOR_MODE (FLOAT, DF, 2); /* V2DF */
kono
parents: 55
diff changeset
245
kono
parents: 55
diff changeset
246 VECTOR_MODE (INT, QI, 1); /* V1QI */
kono
parents: 55
diff changeset
247 VECTOR_MODE (INT, HI, 1); /* V1HI */
kono
parents: 55
diff changeset
248 VECTOR_MODE (INT, SI, 1); /* V1SI */
kono
parents: 55
diff changeset
249 VECTOR_MODE (INT, DI, 1); /* V1DI */
kono
parents: 55
diff changeset
250 VECTOR_MODE (INT, TI, 1); /* V1TI */
kono
parents: 55
diff changeset
251
kono
parents: 55
diff changeset
252 VECTOR_MODE (FLOAT, SF, 1); /* V1SF */
kono
parents: 55
diff changeset
253 VECTOR_MODE (FLOAT, DF, 1); /* V1DF */
kono
parents: 55
diff changeset
254 VECTOR_MODE (FLOAT, TF, 1); /* V1TF */