annotate gcc/config/s390/s390.h @ 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
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
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 Copyright (C) 1999-2018 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
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
4 Ulrich Weigand (uweigand@de.ibm.com).
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
5 Andreas Krebbel (Andreas.Krebbel@de.ibm.com)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 This file is part of GCC.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 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
10 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
11 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
12 version.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 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
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 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
17 for more details.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 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
20 along with GCC; see the file COPYING3. If not see
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 <http://www.gnu.org/licenses/>. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 #ifndef _S390_H
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 #define _S390_H
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 /* Optional architectural facilities supported by the processor. */
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 enum processor_flags
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 PF_IEEE_FLOAT = 1,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 PF_ZARCH = 2,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 PF_LONG_DISPLACEMENT = 4,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 PF_EXTIMM = 8,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 PF_DFP = 16,
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
35 PF_Z10 = 32,
111
kono
parents: 67
diff changeset
36 PF_Z196 = 64,
kono
parents: 67
diff changeset
37 PF_ZEC12 = 128,
kono
parents: 67
diff changeset
38 PF_TX = 256,
kono
parents: 67
diff changeset
39 PF_Z13 = 512,
kono
parents: 67
diff changeset
40 PF_VX = 1024,
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
41 PF_Z14 = 2048,
111
kono
parents: 67
diff changeset
42 PF_VXE = 4096
0
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
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
45 /* This is necessary to avoid a warning about comparing different enum
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
46 types. */
111
kono
parents: 67
diff changeset
47 #define s390_tune_attr ((enum attr_cpu)(s390_tune > PROCESSOR_2964_Z13 ? PROCESSOR_2964_Z13 : s390_tune ))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
48
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 /* These flags indicate that the generated code should run on a cpu
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 providing the respective hardware facility regardless of the
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 current cpu mode (ESA or z/Architecture). */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 #define TARGET_CPU_IEEE_FLOAT \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 (s390_arch_flags & PF_IEEE_FLOAT)
111
kono
parents: 67
diff changeset
55 #define TARGET_CPU_IEEE_FLOAT_P(opts) \
kono
parents: 67
diff changeset
56 (opts->x_s390_arch_flags & PF_IEEE_FLOAT)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 #define TARGET_CPU_LONG_DISPLACEMENT \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 (s390_arch_flags & PF_LONG_DISPLACEMENT)
111
kono
parents: 67
diff changeset
59 #define TARGET_CPU_LONG_DISPLACEMENT_P(opts) \
kono
parents: 67
diff changeset
60 (opts->x_s390_arch_flags & PF_LONG_DISPLACEMENT)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 #define TARGET_CPU_EXTIMM \
111
kono
parents: 67
diff changeset
62 (s390_arch_flags & PF_EXTIMM)
kono
parents: 67
diff changeset
63 #define TARGET_CPU_EXTIMM_P(opts) \
kono
parents: 67
diff changeset
64 (opts->x_s390_arch_flags & PF_EXTIMM)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 #define TARGET_CPU_DFP \
111
kono
parents: 67
diff changeset
66 (s390_arch_flags & PF_DFP)
kono
parents: 67
diff changeset
67 #define TARGET_CPU_DFP_P(opts) \
kono
parents: 67
diff changeset
68 (opts->x_s390_arch_flags & PF_DFP)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 #define TARGET_CPU_Z10 \
111
kono
parents: 67
diff changeset
70 (s390_arch_flags & PF_Z10)
kono
parents: 67
diff changeset
71 #define TARGET_CPU_Z10_P(opts) \
kono
parents: 67
diff changeset
72 (opts->x_s390_arch_flags & PF_Z10)
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
73 #define TARGET_CPU_Z196 \
111
kono
parents: 67
diff changeset
74 (s390_arch_flags & PF_Z196)
kono
parents: 67
diff changeset
75 #define TARGET_CPU_Z196_P(opts) \
kono
parents: 67
diff changeset
76 (opts->x_s390_arch_flags & PF_Z196)
kono
parents: 67
diff changeset
77 #define TARGET_CPU_ZEC12 \
kono
parents: 67
diff changeset
78 (s390_arch_flags & PF_ZEC12)
kono
parents: 67
diff changeset
79 #define TARGET_CPU_ZEC12_P(opts) \
kono
parents: 67
diff changeset
80 (opts->x_s390_arch_flags & PF_ZEC12)
kono
parents: 67
diff changeset
81 #define TARGET_CPU_HTM \
kono
parents: 67
diff changeset
82 (s390_arch_flags & PF_TX)
kono
parents: 67
diff changeset
83 #define TARGET_CPU_HTM_P(opts) \
kono
parents: 67
diff changeset
84 (opts->x_s390_arch_flags & PF_TX)
kono
parents: 67
diff changeset
85 #define TARGET_CPU_Z13 \
kono
parents: 67
diff changeset
86 (s390_arch_flags & PF_Z13)
kono
parents: 67
diff changeset
87 #define TARGET_CPU_Z13_P(opts) \
kono
parents: 67
diff changeset
88 (opts->x_s390_arch_flags & PF_Z13)
kono
parents: 67
diff changeset
89 #define TARGET_CPU_VX \
kono
parents: 67
diff changeset
90 (s390_arch_flags & PF_VX)
kono
parents: 67
diff changeset
91 #define TARGET_CPU_VX_P(opts) \
kono
parents: 67
diff changeset
92 (opts->x_s390_arch_flags & PF_VX)
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
93 #define TARGET_CPU_Z14 \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
94 (s390_arch_flags & PF_Z14)
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
95 #define TARGET_CPU_Z14_P(opts) \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
96 (opts->x_s390_arch_flags & PF_Z14)
111
kono
parents: 67
diff changeset
97 #define TARGET_CPU_VXE \
kono
parents: 67
diff changeset
98 (s390_arch_flags & PF_VXE)
kono
parents: 67
diff changeset
99 #define TARGET_CPU_VXE_P(opts) \
kono
parents: 67
diff changeset
100 (opts->x_s390_arch_flags & PF_VXE)
kono
parents: 67
diff changeset
101
kono
parents: 67
diff changeset
102 #define TARGET_HARD_FLOAT_P(opts) (!TARGET_SOFT_FLOAT_P(opts))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
103
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 /* These flags indicate that the generated code should run on a cpu
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
105 providing the respective hardware facility when run in
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 z/Architecture mode. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
107
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 #define TARGET_LONG_DISPLACEMENT \
111
kono
parents: 67
diff changeset
109 (TARGET_ZARCH && TARGET_CPU_LONG_DISPLACEMENT)
kono
parents: 67
diff changeset
110 #define TARGET_LONG_DISPLACEMENT_P(opts) \
kono
parents: 67
diff changeset
111 (TARGET_ZARCH_P (opts->x_target_flags) \
kono
parents: 67
diff changeset
112 && TARGET_CPU_LONG_DISPLACEMENT_P (opts))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 #define TARGET_EXTIMM \
111
kono
parents: 67
diff changeset
114 (TARGET_ZARCH && TARGET_CPU_EXTIMM)
kono
parents: 67
diff changeset
115 #define TARGET_EXTIMM_P(opts) \
kono
parents: 67
diff changeset
116 (TARGET_ZARCH_P (opts->x_target_flags) && TARGET_CPU_EXTIMM_P (opts))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 #define TARGET_DFP \
111
kono
parents: 67
diff changeset
118 (TARGET_ZARCH && TARGET_CPU_DFP && TARGET_HARD_FLOAT)
kono
parents: 67
diff changeset
119 #define TARGET_DFP_P(opts) \
kono
parents: 67
diff changeset
120 (TARGET_ZARCH_P (opts->x_target_flags) && TARGET_CPU_DFP_P (opts) \
kono
parents: 67
diff changeset
121 && TARGET_HARD_FLOAT_P (opts->x_target_flags))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
122 #define TARGET_Z10 \
111
kono
parents: 67
diff changeset
123 (TARGET_ZARCH && TARGET_CPU_Z10)
kono
parents: 67
diff changeset
124 #define TARGET_Z10_P(opts) \
kono
parents: 67
diff changeset
125 (TARGET_ZARCH_P (opts->x_target_flags) && TARGET_CPU_Z10_P (opts))
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
126 #define TARGET_Z196 \
111
kono
parents: 67
diff changeset
127 (TARGET_ZARCH && TARGET_CPU_Z196)
kono
parents: 67
diff changeset
128 #define TARGET_Z196_P(opts) \
kono
parents: 67
diff changeset
129 (TARGET_ZARCH_P (opts->x_target_flags) && TARGET_CPU_Z196_P (opts))
kono
parents: 67
diff changeset
130 #define TARGET_ZEC12 \
kono
parents: 67
diff changeset
131 (TARGET_ZARCH && TARGET_CPU_ZEC12)
kono
parents: 67
diff changeset
132 #define TARGET_ZEC12_P(opts) \
kono
parents: 67
diff changeset
133 (TARGET_ZARCH_P (opts->x_target_flags) && TARGET_CPU_ZEC12_P (opts))
kono
parents: 67
diff changeset
134 #define TARGET_HTM (TARGET_OPT_HTM)
kono
parents: 67
diff changeset
135 #define TARGET_HTM_P(opts) (TARGET_OPT_HTM_P (opts->x_target_flags))
kono
parents: 67
diff changeset
136 #define TARGET_Z13 \
kono
parents: 67
diff changeset
137 (TARGET_ZARCH && TARGET_CPU_Z13)
kono
parents: 67
diff changeset
138 #define TARGET_Z13_P(opts) \
kono
parents: 67
diff changeset
139 (TARGET_ZARCH_P (opts->x_target_flags) && TARGET_CPU_Z13_P (opts))
kono
parents: 67
diff changeset
140 #define TARGET_VX \
kono
parents: 67
diff changeset
141 (TARGET_ZARCH && TARGET_CPU_VX && TARGET_OPT_VX && TARGET_HARD_FLOAT)
kono
parents: 67
diff changeset
142 #define TARGET_VX_P(opts) \
kono
parents: 67
diff changeset
143 (TARGET_ZARCH_P (opts->x_target_flags) && TARGET_CPU_VX_P (opts) \
kono
parents: 67
diff changeset
144 && TARGET_OPT_VX_P (opts->x_target_flags) \
kono
parents: 67
diff changeset
145 && TARGET_HARD_FLOAT_P (opts->x_target_flags))
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
146 #define TARGET_Z14 (TARGET_ZARCH && TARGET_CPU_Z14)
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
147 #define TARGET_Z14_P(opts) \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
148 (TARGET_ZARCH_P (opts->x_target_flags) && TARGET_CPU_Z14_P (opts))
111
kono
parents: 67
diff changeset
149 #define TARGET_VXE \
kono
parents: 67
diff changeset
150 (TARGET_VX && TARGET_CPU_VXE)
kono
parents: 67
diff changeset
151 #define TARGET_VXE_P(opts) \
kono
parents: 67
diff changeset
152 (TARGET_VX_P (opts) && TARGET_CPU_VXE_P (opts))
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
153
111
kono
parents: 67
diff changeset
154 #ifdef HAVE_AS_MACHINE_MACHINEMODE
kono
parents: 67
diff changeset
155 #define S390_USE_TARGET_ATTRIBUTE 1
kono
parents: 67
diff changeset
156 #else
kono
parents: 67
diff changeset
157 #define S390_USE_TARGET_ATTRIBUTE 0
kono
parents: 67
diff changeset
158 #endif
kono
parents: 67
diff changeset
159
kono
parents: 67
diff changeset
160 #ifdef HAVE_AS_ARCHITECTURE_MODIFIERS
kono
parents: 67
diff changeset
161 #define S390_USE_ARCHITECTURE_MODIFIERS 1
kono
parents: 67
diff changeset
162 #else
kono
parents: 67
diff changeset
163 #define S390_USE_ARCHITECTURE_MODIFIERS 0
kono
parents: 67
diff changeset
164 #endif
kono
parents: 67
diff changeset
165
kono
parents: 67
diff changeset
166 #if S390_USE_TARGET_ATTRIBUTE
kono
parents: 67
diff changeset
167 /* For switching between functions with different target attributes. */
kono
parents: 67
diff changeset
168 #define SWITCHABLE_TARGET 1
kono
parents: 67
diff changeset
169 #endif
kono
parents: 67
diff changeset
170
kono
parents: 67
diff changeset
171 #define TARGET_SUPPORTS_WIDE_INT 1
kono
parents: 67
diff changeset
172
kono
parents: 67
diff changeset
173 /* Use the ABI introduced with IBM z13:
kono
parents: 67
diff changeset
174 - pass vector arguments <= 16 bytes in VRs
kono
parents: 67
diff changeset
175 - align *all* vector types to 8 bytes */
kono
parents: 67
diff changeset
176 #define TARGET_VX_ABI TARGET_VX
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
177
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
178 #define TARGET_AVOID_CMP_AND_BRANCH (s390_tune == PROCESSOR_2817_Z196)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
179
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
180 /* Issue a write prefetch for the +4 cache line. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
181 #define TARGET_SETMEM_PREFETCH_DISTANCE 1024
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
182
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
183 /* Expand to a C expressions evaluating to true if a setmem to VAL of
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
184 length LEN should be emitted using prefetch instructions. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
185 #define TARGET_SETMEM_PFD(VAL,LEN) \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
186 (TARGET_Z10 \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
187 && (s390_tune < PROCESSOR_2964_Z13 || (VAL) != const0_rtx) \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
188 && (!CONST_INT_P (LEN) || INTVAL ((LEN)) > TARGET_SETMEM_PREFETCH_DISTANCE))
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
189
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
190 /* Run-time target specification. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
191
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
192 /* Defaults for option flags defined only on some subtargets. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
193 #ifndef TARGET_TPF_PROFILING
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
194 #define TARGET_TPF_PROFILING 0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
195 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
196
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
197 /* This will be overridden by OS headers. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
198 #define TARGET_TPF 0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
199
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
200 /* Target CPU builtins. */
111
kono
parents: 67
diff changeset
201 #define TARGET_CPU_CPP_BUILTINS() s390_cpu_cpp_builtins (pfile)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
202
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
203 #ifdef DEFAULT_TARGET_64BIT
111
kono
parents: 67
diff changeset
204 #define TARGET_DEFAULT (MASK_64BIT | MASK_ZARCH | MASK_HARD_DFP \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
205 | MASK_OPT_HTM | MASK_OPT_VX)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
206 #else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
207 #define TARGET_DEFAULT 0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
208 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
209
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
210 /* Support for configure-time defaults. */
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
211 #define OPTION_DEFAULT_SPECS \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
212 { "mode", "%{!mesa:%{!mzarch:-m%(VALUE)}}" }, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
213 { "arch", "%{!march=*:-march=%(VALUE)}" }, \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
214 { "tune", "%{!mtune=*:%{!march=*:-mtune=%(VALUE)}}" }
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
215
111
kono
parents: 67
diff changeset
216 #ifdef __s390__
kono
parents: 67
diff changeset
217 extern const char *s390_host_detect_local_cpu (int argc, const char **argv);
kono
parents: 67
diff changeset
218 # define EXTRA_SPEC_FUNCTIONS \
kono
parents: 67
diff changeset
219 { "local_cpu_detect", s390_host_detect_local_cpu },
kono
parents: 67
diff changeset
220
kono
parents: 67
diff changeset
221 #define MARCH_MTUNE_NATIVE_SPECS \
kono
parents: 67
diff changeset
222 "%{mtune=native:%<mtune=native %:local_cpu_detect(tune)} " \
kono
parents: 67
diff changeset
223 "%{march=native:%<march=native" \
kono
parents: 67
diff changeset
224 " %:local_cpu_detect(arch %{mesa|mzarch:mesa_mzarch})}"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
225 #else
111
kono
parents: 67
diff changeset
226 # define MARCH_MTUNE_NATIVE_SPECS ""
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
227 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
228
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
229 #ifdef DEFAULT_TARGET_64BIT
111
kono
parents: 67
diff changeset
230 #define S390_TARGET_BITS_STRING "64"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
231 #else
111
kono
parents: 67
diff changeset
232 #define S390_TARGET_BITS_STRING "31"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
233 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
234
111
kono
parents: 67
diff changeset
235 /* Defaulting rules. */
kono
parents: 67
diff changeset
236 #define DRIVER_SELF_SPECS \
kono
parents: 67
diff changeset
237 MARCH_MTUNE_NATIVE_SPECS, \
kono
parents: 67
diff changeset
238 "%{!m31:%{!m64:-m" S390_TARGET_BITS_STRING "}}", \
kono
parents: 67
diff changeset
239 "%{!mesa:%{!mzarch:%{m31:-mesa}%{m64:-mzarch}}}", \
kono
parents: 67
diff changeset
240 "%{!march=*:-march=z900}"
kono
parents: 67
diff changeset
241
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
242 /* Constants needed to control the TEST DATA CLASS (TDC) instruction. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
243 #define S390_TDC_POSITIVE_ZERO (1 << 11)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
244 #define S390_TDC_NEGATIVE_ZERO (1 << 10)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
245 #define S390_TDC_POSITIVE_NORMALIZED_BFP_NUMBER (1 << 9)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
246 #define S390_TDC_NEGATIVE_NORMALIZED_BFP_NUMBER (1 << 8)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
247 #define S390_TDC_POSITIVE_DENORMALIZED_BFP_NUMBER (1 << 7)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
248 #define S390_TDC_NEGATIVE_DENORMALIZED_BFP_NUMBER (1 << 6)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
249 #define S390_TDC_POSITIVE_INFINITY (1 << 5)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
250 #define S390_TDC_NEGATIVE_INFINITY (1 << 4)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
251 #define S390_TDC_POSITIVE_QUIET_NAN (1 << 3)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
252 #define S390_TDC_NEGATIVE_QUIET_NAN (1 << 2)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
253 #define S390_TDC_POSITIVE_SIGNALING_NAN (1 << 1)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
254 #define S390_TDC_NEGATIVE_SIGNALING_NAN (1 << 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
255
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
256 /* The following values are different for DFP. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
257 #define S390_TDC_POSITIVE_DENORMALIZED_DFP_NUMBER (1 << 9)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
258 #define S390_TDC_NEGATIVE_DENORMALIZED_DFP_NUMBER (1 << 8)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
259 #define S390_TDC_POSITIVE_NORMALIZED_DFP_NUMBER (1 << 7)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
260 #define S390_TDC_NEGATIVE_NORMALIZED_DFP_NUMBER (1 << 6)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
261
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
262 /* For signbit, the BFP-DFP-difference makes no difference. */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
263 #define S390_TDC_SIGNBIT_SET (S390_TDC_NEGATIVE_ZERO \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
264 | S390_TDC_NEGATIVE_NORMALIZED_BFP_NUMBER \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
265 | S390_TDC_NEGATIVE_DENORMALIZED_BFP_NUMBER\
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
266 | S390_TDC_NEGATIVE_INFINITY \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
267 | S390_TDC_NEGATIVE_QUIET_NAN \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
268 | S390_TDC_NEGATIVE_SIGNALING_NAN )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
269
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
270 #define S390_TDC_INFINITY (S390_TDC_POSITIVE_INFINITY \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
271 | S390_TDC_NEGATIVE_INFINITY )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
272
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
273 /* Target machine storage layout. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
274
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
275 /* Everything is big-endian. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
276 #define BITS_BIG_ENDIAN 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
277 #define BYTES_BIG_ENDIAN 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
278 #define WORDS_BIG_ENDIAN 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
279
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
280 #define STACK_SIZE_MODE (Pmode)
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
281
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
282 #ifndef IN_LIBGCC2
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
283
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
284 /* Width of a word, in units (bytes). */
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
285 #define UNITS_PER_WORD (TARGET_ZARCH ? 8 : 4)
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
286
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
287 /* Width of a pointer. To be used instead of UNITS_PER_WORD in
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
288 ABI-relevant contexts. This always matches
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
289 GET_MODE_SIZE (Pmode). */
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
290 #define UNITS_PER_LONG (TARGET_64BIT ? 8 : 4)
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
291 #define MIN_UNITS_PER_WORD 4
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
292 #define MAX_BITS_PER_WORD 64
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
293 #else
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
294
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
295 /* In libgcc, UNITS_PER_WORD has ABI-relevant effects, e.g. whether
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
296 the library should export TImode functions or not. Thus, we have
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
297 to redefine UNITS_PER_WORD depending on __s390x__ for libgcc. */
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
298 #ifdef __s390x__
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
299 #define UNITS_PER_WORD 8
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
300 #else
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
301 #define UNITS_PER_WORD 4
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
302 #endif
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
303 #endif
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
304
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
305 /* Width of a pointer, in bits. */
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
306 #define POINTER_SIZE (TARGET_64BIT ? 64 : 32)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
307
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
308 /* Allocation boundary (in *bits*) for storing arguments in argument list. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
309 #define PARM_BOUNDARY (TARGET_64BIT ? 64 : 32)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
310
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
311 /* Boundary (in *bits*) on which stack pointer should be aligned. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
312 #define STACK_BOUNDARY 64
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
313
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
314 /* Allocation boundary (in *bits*) for the code of a function. */
111
kono
parents: 67
diff changeset
315 #define FUNCTION_BOUNDARY 64
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
316
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
317 /* There is no point aligning anything to a rounder boundary than this. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
318 #define BIGGEST_ALIGNMENT 64
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
319
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
320 /* Alignment of field after `int : 0' in a structure. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
321 #define EMPTY_FIELD_BOUNDARY 32
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
322
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
323 /* Alignment on even addresses for LARL instruction. */
111
kono
parents: 67
diff changeset
324 #define DATA_ABI_ALIGNMENT(TYPE, ALIGN) (ALIGN) < 16 ? 16 : (ALIGN)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
325
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
326 /* Alignment is not required by the hardware. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
327 #define STRICT_ALIGNMENT 0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
328
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
329 /* Mode of stack savearea.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
330 FUNCTION is VOIDmode because calling convention maintains SP.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
331 BLOCK needs Pmode for SP.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
332 NONLOCAL needs twice Pmode to maintain both backchain and SP. */
111
kono
parents: 67
diff changeset
333 #define STACK_SAVEAREA_MODE(LEVEL) \
kono
parents: 67
diff changeset
334 ((LEVEL) == SAVE_FUNCTION ? VOIDmode \
kono
parents: 67
diff changeset
335 : (LEVEL) == SAVE_NONLOCAL ? (TARGET_64BIT ? OImode : TImode) : Pmode)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
336
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
337
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
338 /* Type layout. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
339
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
340 /* Sizes in bits of the source language data types. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
341 #define SHORT_TYPE_SIZE 16
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
342 #define INT_TYPE_SIZE 32
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
343 #define LONG_TYPE_SIZE (TARGET_64BIT ? 64 : 32)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
344 #define LONG_LONG_TYPE_SIZE 64
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
345 #define FLOAT_TYPE_SIZE 32
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
346 #define DOUBLE_TYPE_SIZE 64
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
347 #define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
348
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
349 /* Work around target_flags dependency in ada/targtyps.c. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
350 #define WIDEST_HARDWARE_FP_SIZE 64
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
351
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
352 /* We use "unsigned char" as default. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
353 #define DEFAULT_SIGNED_CHAR 0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
354
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
355
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
356 /* Register usage. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
357
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
358 /* We have 16 general purpose registers (registers 0-15),
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
359 and 16 floating point registers (registers 16-31).
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
360 (On non-IEEE machines, we have only 4 fp registers.)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
361
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
362 Amongst the general purpose registers, some are used
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
363 for specific purposes:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
364 GPR 11: Hard frame pointer (if needed)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
365 GPR 12: Global offset table pointer (if needed)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
366 GPR 13: Literal pool base register
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
367 GPR 14: Return address register
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
368 GPR 15: Stack pointer
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
369
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
370 Registers 32-35 are 'fake' hard registers that do not
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
371 correspond to actual hardware:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
372 Reg 32: Argument pointer
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
373 Reg 33: Condition code
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
374 Reg 34: Frame pointer
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
375 Reg 35: Return address pointer
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
376
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
377 Registers 36 and 37 are mapped to access registers
111
kono
parents: 67
diff changeset
378 0 and 1, used to implement thread-local storage.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
379
111
kono
parents: 67
diff changeset
380 Reg 38-53: Vector registers v16-v31 */
kono
parents: 67
diff changeset
381
kono
parents: 67
diff changeset
382 #define FIRST_PSEUDO_REGISTER 54
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
383
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
384 /* Standard register usage. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
385 #define GENERAL_REGNO_P(N) ((int)(N) >= 0 && (N) < 16)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
386 #define ADDR_REGNO_P(N) ((N) >= 1 && (N) < 16)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
387 #define FP_REGNO_P(N) ((N) >= 16 && (N) < 32)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
388 #define CC_REGNO_P(N) ((N) == 33)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
389 #define FRAME_REGNO_P(N) ((N) == 32 || (N) == 34 || (N) == 35)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
390 #define ACCESS_REGNO_P(N) ((N) == 36 || (N) == 37)
111
kono
parents: 67
diff changeset
391 #define VECTOR_NOFP_REGNO_P(N) ((N) >= 38 && (N) <= 53)
kono
parents: 67
diff changeset
392 #define VECTOR_REGNO_P(N) (FP_REGNO_P (N) || VECTOR_NOFP_REGNO_P (N))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
393
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
394 #define GENERAL_REG_P(X) (REG_P (X) && GENERAL_REGNO_P (REGNO (X)))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
395 #define ADDR_REG_P(X) (REG_P (X) && ADDR_REGNO_P (REGNO (X)))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
396 #define FP_REG_P(X) (REG_P (X) && FP_REGNO_P (REGNO (X)))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
397 #define CC_REG_P(X) (REG_P (X) && CC_REGNO_P (REGNO (X)))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
398 #define FRAME_REG_P(X) (REG_P (X) && FRAME_REGNO_P (REGNO (X)))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
399 #define ACCESS_REG_P(X) (REG_P (X) && ACCESS_REGNO_P (REGNO (X)))
111
kono
parents: 67
diff changeset
400 #define VECTOR_NOFP_REG_P(X) (REG_P (X) && VECTOR_NOFP_REGNO_P (REGNO (X)))
kono
parents: 67
diff changeset
401 #define VECTOR_REG_P(X) (REG_P (X) && VECTOR_REGNO_P (REGNO (X)))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
402
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
403 /* Set up fixed registers and calling convention:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
404
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
405 GPRs 0-5 are always call-clobbered,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
406 GPRs 6-15 are always call-saved.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
407 GPR 12 is fixed if used as GOT pointer.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
408 GPR 13 is always fixed (as literal pool pointer).
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
409 GPR 14 is always fixed on S/390 machines (as return address).
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
410 GPR 15 is always fixed (as stack pointer).
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
411 The 'fake' hard registers are call-clobbered and fixed.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
412 The access registers are call-saved and fixed.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
413
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
414 On 31-bit, FPRs 18-19 are call-clobbered;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
415 on 64-bit, FPRs 24-31 are call-clobbered.
111
kono
parents: 67
diff changeset
416 The remaining FPRs are call-saved.
kono
parents: 67
diff changeset
417
kono
parents: 67
diff changeset
418 All non-FP vector registers are call-clobbered v16-v31. */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
419
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
420 #define FIXED_REGISTERS \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
421 { 0, 0, 0, 0, \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
422 0, 0, 0, 0, \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
423 0, 0, 0, 0, \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
424 0, 1, 1, 1, \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
425 0, 0, 0, 0, \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
426 0, 0, 0, 0, \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
427 0, 0, 0, 0, \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
428 0, 0, 0, 0, \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
429 1, 1, 1, 1, \
111
kono
parents: 67
diff changeset
430 1, 1, \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
431 0, 0, 0, 0, \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
432 0, 0, 0, 0, \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
433 0, 0, 0, 0, \
111
kono
parents: 67
diff changeset
434 0, 0, 0, 0 }
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
435
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
436 #define CALL_USED_REGISTERS \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
437 { 1, 1, 1, 1, \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
438 1, 1, 0, 0, \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
439 0, 0, 0, 0, \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
440 0, 1, 1, 1, \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
441 1, 1, 1, 1, \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
442 1, 1, 1, 1, \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
443 1, 1, 1, 1, \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
444 1, 1, 1, 1, \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
445 1, 1, 1, 1, \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
446 1, 1, \
111
kono
parents: 67
diff changeset
447 1, 1, 1, 1, \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
448 1, 1, 1, 1, \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
449 1, 1, 1, 1, \
111
kono
parents: 67
diff changeset
450 1, 1, 1, 1 }
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
451
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
452 #define CALL_REALLY_USED_REGISTERS \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
453 { 1, 1, 1, 1, /* r0 - r15 */ \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
454 1, 1, 0, 0, \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
455 0, 0, 0, 0, \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
456 0, 0, 0, 0, \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
457 1, 1, 1, 1, /* f0 (16) - f15 (31) */ \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
458 1, 1, 1, 1, \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
459 1, 1, 1, 1, \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
460 1, 1, 1, 1, \
111
kono
parents: 67
diff changeset
461 1, 1, 1, 1, /* arg, cc, fp, ret addr */ \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
462 0, 0, /* a0 (36), a1 (37) */ \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
463 1, 1, 1, 1, /* v16 (38) - v23 (45) */ \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
464 1, 1, 1, 1, \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
465 1, 1, 1, 1, /* v24 (46) - v31 (53) */ \
111
kono
parents: 67
diff changeset
466 1, 1, 1, 1 }
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
467
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
468 /* Preferred register allocation order. */
111
kono
parents: 67
diff changeset
469 #define REG_ALLOC_ORDER \
kono
parents: 67
diff changeset
470 { 1, 2, 3, 4, 5, 0, 12, 11, 10, 9, 8, 7, 6, 14, 13, \
kono
parents: 67
diff changeset
471 16, 17, 18, 19, 20, 21, 22, 23, \
kono
parents: 67
diff changeset
472 24, 25, 26, 27, 28, 29, 30, 31, \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
473 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, \
111
kono
parents: 67
diff changeset
474 15, 32, 33, 34, 35, 36, 37 }
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
475
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
476
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
477 #define HARD_REGNO_RENAME_OK(FROM, TO) \
111
kono
parents: 67
diff changeset
478 s390_hard_regno_rename_ok ((FROM), (TO))
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
479
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
480 /* Maximum number of registers to represent a value of mode MODE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
481 in a register of class CLASS. */
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
482 #define CLASS_MAX_NREGS(CLASS, MODE) \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
483 s390_class_max_nregs ((CLASS), (MODE))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
484
111
kono
parents: 67
diff changeset
485 /* We can reverse a CC mode safely if we know whether it comes from a
kono
parents: 67
diff changeset
486 floating point compare or not. With the vector modes it is encoded
kono
parents: 67
diff changeset
487 as part of the mode.
kono
parents: 67
diff changeset
488 FIXME: It might make sense to do this for other cc modes as well. */
kono
parents: 67
diff changeset
489 #define REVERSIBLE_CC_MODE(MODE) \
kono
parents: 67
diff changeset
490 ((MODE) == CCVIALLmode || (MODE) == CCVIANYmode \
kono
parents: 67
diff changeset
491 || (MODE) == CCVFALLmode || (MODE) == CCVFANYmode)
kono
parents: 67
diff changeset
492
kono
parents: 67
diff changeset
493 /* Given a condition code and a mode, return the inverse condition. */
kono
parents: 67
diff changeset
494 #define REVERSE_CONDITION(CODE, MODE) s390_reverse_condition (MODE, CODE)
kono
parents: 67
diff changeset
495
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
496
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
497 /* Register classes. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
498
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
499 /* We use the following register classes:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
500 GENERAL_REGS All general purpose registers
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
501 ADDR_REGS All general purpose registers except %r0
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
502 (These registers can be used in address generation)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
503 FP_REGS All floating point registers
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
504 CC_REGS The condition code register
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
505 ACCESS_REGS The access registers
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
506
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
507 GENERAL_FP_REGS Union of GENERAL_REGS and FP_REGS
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
508 ADDR_FP_REGS Union of ADDR_REGS and FP_REGS
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
509 GENERAL_CC_REGS Union of GENERAL_REGS and CC_REGS
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
510 ADDR_CC_REGS Union of ADDR_REGS and CC_REGS
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
511
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
512 NO_REGS No registers
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
513 ALL_REGS All registers
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
514
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
515 Note that the 'fake' frame pointer and argument pointer registers
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
516 are included amongst the address registers here. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
517
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
518 enum reg_class
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
519 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
520 NO_REGS, CC_REGS, ADDR_REGS, GENERAL_REGS, ACCESS_REGS,
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
521 ADDR_CC_REGS, GENERAL_CC_REGS,
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
522 FP_REGS, ADDR_FP_REGS, GENERAL_FP_REGS,
111
kono
parents: 67
diff changeset
523 VEC_REGS, ADDR_VEC_REGS, GENERAL_VEC_REGS,
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
524 ALL_REGS, LIM_REG_CLASSES
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
525 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
526 #define N_REG_CLASSES (int) LIM_REG_CLASSES
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
527
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
528 #define REG_CLASS_NAMES \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
529 { "NO_REGS", "CC_REGS", "ADDR_REGS", "GENERAL_REGS", "ACCESS_REGS", \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
530 "ADDR_CC_REGS", "GENERAL_CC_REGS", \
111
kono
parents: 67
diff changeset
531 "FP_REGS", "ADDR_FP_REGS", "GENERAL_FP_REGS", \
kono
parents: 67
diff changeset
532 "VEC_REGS", "ADDR_VEC_REGS", "GENERAL_VEC_REGS", \
kono
parents: 67
diff changeset
533 "ALL_REGS" }
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
534
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
535 /* Class -> register mapping. */
111
kono
parents: 67
diff changeset
536 #define REG_CLASS_CONTENTS \
kono
parents: 67
diff changeset
537 { \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
538 { 0x00000000, 0x00000000 }, /* NO_REGS */ \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
539 { 0x00000000, 0x00000002 }, /* CC_REGS */ \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
540 { 0x0000fffe, 0x0000000d }, /* ADDR_REGS */ \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
541 { 0x0000ffff, 0x0000000d }, /* GENERAL_REGS */ \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
542 { 0x00000000, 0x00000030 }, /* ACCESS_REGS */ \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
543 { 0x0000fffe, 0x0000000f }, /* ADDR_CC_REGS */ \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
544 { 0x0000ffff, 0x0000000f }, /* GENERAL_CC_REGS */ \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
545 { 0xffff0000, 0x00000000 }, /* FP_REGS */ \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
546 { 0xfffffffe, 0x0000000d }, /* ADDR_FP_REGS */ \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
547 { 0xffffffff, 0x0000000d }, /* GENERAL_FP_REGS */ \
111
kono
parents: 67
diff changeset
548 { 0xffff0000, 0x003fffc0 }, /* VEC_REGS */ \
kono
parents: 67
diff changeset
549 { 0xfffffffe, 0x003fffcd }, /* ADDR_VEC_REGS */ \
kono
parents: 67
diff changeset
550 { 0xffffffff, 0x003fffcd }, /* GENERAL_VEC_REGS */ \
kono
parents: 67
diff changeset
551 { 0xffffffff, 0x003fffff }, /* ALL_REGS */ \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
552 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
553
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
554 /* In some case register allocation order is not enough for IRA to
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
555 generate a good code. The following macro (if defined) increases
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
556 cost of REGNO for a pseudo approximately by pseudo usage frequency
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
557 multiplied by the macro value.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
558
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
559 We avoid usage of BASE_REGNUM by nonzero macro value because the
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
560 reload can decide not to use the hard register because some
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
561 constant was forced to be in memory. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
562 #define IRA_HARD_REGNO_ADD_COST_MULTIPLIER(regno) \
111
kono
parents: 67
diff changeset
563 ((regno) != BASE_REGNUM ? 0.0 : 0.5)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
564
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
565 /* Register -> class mapping. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
566 extern const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER];
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
567 #define REGNO_REG_CLASS(REGNO) (regclass_map[REGNO])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
568
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
569 /* ADDR_REGS can be used as base or index register. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
570 #define INDEX_REG_CLASS ADDR_REGS
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
571 #define BASE_REG_CLASS ADDR_REGS
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
572
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
573 /* Check whether REGNO is a hard register of the suitable class
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
574 or a pseudo register currently allocated to one such. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
575 #define REGNO_OK_FOR_INDEX_P(REGNO) \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
576 (((REGNO) < FIRST_PSEUDO_REGISTER \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
577 && REGNO_REG_CLASS ((REGNO)) == ADDR_REGS) \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
578 || ADDR_REGNO_P (reg_renumber[REGNO]))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
579 #define REGNO_OK_FOR_BASE_P(REGNO) REGNO_OK_FOR_INDEX_P (REGNO)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
580
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
581
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
582 /* Stack layout and calling conventions. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
583
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
584 /* Our stack grows from higher to lower addresses. However, local variables
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
585 are accessed by positive offsets, and function arguments are stored at
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
586 increasing addresses. */
111
kono
parents: 67
diff changeset
587 #define STACK_GROWS_DOWNWARD 1
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
588 #define FRAME_GROWS_DOWNWARD 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
589 /* #undef ARGS_GROW_DOWNWARD */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
590
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
591 /* The basic stack layout looks like this: the stack pointer points
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
592 to the register save area for called functions. Above that area
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
593 is the location to place outgoing arguments. Above those follow
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
594 dynamic allocations (alloca), and finally the local variables. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
595
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
596 /* Offset from stack-pointer to first location of outgoing args. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
597 #define STACK_POINTER_OFFSET (TARGET_64BIT ? 160 : 96)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
598
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
599 /* Offset from the stack pointer register to an item dynamically
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
600 allocated on the stack, e.g., by `alloca'. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
601 #define STACK_DYNAMIC_OFFSET(FUNDECL) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
602 (STACK_POINTER_OFFSET + crtl->outgoing_args_size)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
603
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
604 /* Offset of first parameter from the argument pointer register value.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
605 We have a fake argument pointer register that points directly to
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
606 the argument area. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
607 #define FIRST_PARM_OFFSET(FNDECL) 0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
608
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
609 /* Defining this macro makes __builtin_frame_address(0) and
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
610 __builtin_return_address(0) work with -fomit-frame-pointer. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
611 #define INITIAL_FRAME_ADDRESS_RTX \
111
kono
parents: 67
diff changeset
612 (plus_constant (Pmode, arg_pointer_rtx, -STACK_POINTER_OFFSET))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
613
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
614 /* The return address of the current frame is retrieved
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
615 from the initial value of register RETURN_REGNUM.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
616 For frames farther back, we use the stack slot where
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
617 the corresponding RETURN_REGNUM register was saved. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
618 #define DYNAMIC_CHAIN_ADDRESS(FRAME) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
619 (TARGET_PACKED_STACK ? \
111
kono
parents: 67
diff changeset
620 plus_constant (Pmode, (FRAME), \
kono
parents: 67
diff changeset
621 STACK_POINTER_OFFSET - UNITS_PER_LONG) : (FRAME))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
622
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
623 /* For -mpacked-stack this adds 160 - 8 (96 - 4) to the output of
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
624 builtin_frame_address. Otherwise arg pointer -
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
625 STACK_POINTER_OFFSET would be returned for
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
626 __builtin_frame_address(0) what might result in an address pointing
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
627 somewhere into the middle of the local variables since the packed
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
628 stack layout generally does not need all the bytes in the register
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
629 save area. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
630 #define FRAME_ADDR_RTX(FRAME) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
631 DYNAMIC_CHAIN_ADDRESS ((FRAME))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
632
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
633 #define RETURN_ADDR_RTX(COUNT, FRAME) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
634 s390_return_addr_rtx ((COUNT), DYNAMIC_CHAIN_ADDRESS ((FRAME)))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
635
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
636 /* In 31-bit mode, we need to mask off the high bit of return addresses. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
637 #define MASK_RETURN_ADDR (TARGET_64BIT ? constm1_rtx : GEN_INT (0x7fffffff))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
638
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
639
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
640 /* Exception handling. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
641
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
642 /* Describe calling conventions for DWARF-2 exception handling. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
643 #define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, RETURN_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
644 #define INCOMING_FRAME_SP_OFFSET STACK_POINTER_OFFSET
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
645 #define DWARF_FRAME_RETURN_COLUMN 14
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
646
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
647 /* Describe how we implement __builtin_eh_return. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
648 #define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + 6 : INVALID_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
649 #define EH_RETURN_HANDLER_RTX gen_rtx_MEM (Pmode, return_address_pointer_rtx)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
650
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
651 /* Select a format to encode pointers in exception handling data. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
652 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
653 (flag_pic \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
654 ? ((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4 \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
655 : DW_EH_PE_absptr)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
656
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
657 /* Register save slot alignment. */
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
658 #define DWARF_CIE_DATA_ALIGNMENT (-UNITS_PER_LONG)
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
659
111
kono
parents: 67
diff changeset
660 /* Let the assembler generate debug line info. */
kono
parents: 67
diff changeset
661 #define DWARF2_ASM_LINE_DEBUG_INFO 1
kono
parents: 67
diff changeset
662
kono
parents: 67
diff changeset
663 /* Define the dwarf register mapping.
kono
parents: 67
diff changeset
664 v16-v31 -> 68-83
kono
parents: 67
diff changeset
665 rX -> X otherwise */
kono
parents: 67
diff changeset
666 #define DBX_REGISTER_NUMBER(regno) \
kono
parents: 67
diff changeset
667 (((regno) >= 38 && (regno) <= 53) ? (regno) + 30 : (regno))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
668
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
669 /* Frame registers. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
670
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
671 #define STACK_POINTER_REGNUM 15
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
672 #define FRAME_POINTER_REGNUM 34
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
673 #define HARD_FRAME_POINTER_REGNUM 11
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
674 #define ARG_POINTER_REGNUM 32
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
675 #define RETURN_ADDRESS_POINTER_REGNUM 35
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
676
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
677 /* The static chain must be call-clobbered, but not used for
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
678 function argument passing. As register 1 is clobbered by
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
679 the trampoline code, we only have one option. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
680 #define STATIC_CHAIN_REGNUM 0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
681
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
682 /* Number of hardware registers that go into the DWARF-2 unwind info.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
683 To avoid ABI incompatibility, this number must not change even as
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
684 'fake' hard registers are added or removed. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
685 #define DWARF_FRAME_REGISTERS 34
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
686
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
687
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
688 /* Frame pointer and argument pointer elimination. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
689
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
690 #define ELIMINABLE_REGS \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
691 {{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM }, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
692 { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM }, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
693 { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM }, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
694 { ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM }, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
695 { RETURN_ADDRESS_POINTER_REGNUM, STACK_POINTER_REGNUM }, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
696 { RETURN_ADDRESS_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM }, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
697 { BASE_REGNUM, BASE_REGNUM }}
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
698
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
699 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
700 (OFFSET) = s390_initial_elimination_offset ((FROM), (TO))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
701
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
702
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
703 /* Stack arguments. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
704
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
705 /* We need current_function_outgoing_args to be valid. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
706 #define ACCUMULATE_OUTGOING_ARGS 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
707
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
708
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
709 /* Register arguments. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
710
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
711 typedef struct s390_arg_structure
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
712 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
713 int gprs; /* gpr so far */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
714 int fprs; /* fpr so far */
111
kono
parents: 67
diff changeset
715 int vrs; /* vr so far */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
716 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
717 CUMULATIVE_ARGS;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
718
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
719 #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, NN, N_NAMED_ARGS) \
111
kono
parents: 67
diff changeset
720 ((CUM).gprs=0, (CUM).fprs=0, (CUM).vrs=0)
kono
parents: 67
diff changeset
721
kono
parents: 67
diff changeset
722 #define FIRST_VEC_ARG_REGNO 46
kono
parents: 67
diff changeset
723 #define LAST_VEC_ARG_REGNO 53
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
724
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
725 /* Arguments can be placed in general registers 2 to 6, or in floating
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
726 point registers 0 and 2 for 31 bit and fprs 0, 2, 4 and 6 for 64
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
727 bit. */
111
kono
parents: 67
diff changeset
728 #define FUNCTION_ARG_REGNO_P(N) \
kono
parents: 67
diff changeset
729 (((N) >=2 && (N) < 7) || (N) == 16 || (N) == 17 \
kono
parents: 67
diff changeset
730 || (TARGET_64BIT && ((N) == 18 || (N) == 19)) \
kono
parents: 67
diff changeset
731 || (TARGET_VX && ((N) >= FIRST_VEC_ARG_REGNO && (N) <= LAST_VEC_ARG_REGNO)))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
732
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
733
111
kono
parents: 67
diff changeset
734 /* Only gpr 2, fpr 0, and v24 are ever used as return registers. */
kono
parents: 67
diff changeset
735 #define FUNCTION_VALUE_REGNO_P(N) \
kono
parents: 67
diff changeset
736 ((N) == 2 || (N) == 16 \
kono
parents: 67
diff changeset
737 || (TARGET_VX && (N) == FIRST_VEC_ARG_REGNO))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
738
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
739
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
740 /* Function entry and exit. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
741
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
742 /* When returning from a function, the stack pointer does not matter. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
743 #define EXIT_IGNORE_STACK 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
744
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
745
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
746 /* Profiling. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
747
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
748 #define FUNCTION_PROFILER(FILE, LABELNO) \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
749 s390_function_profiler ((FILE), ((LABELNO)))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
750
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
751 #define PROFILE_BEFORE_PROLOGUE 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
752
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
753
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
754 /* Trampolines for nested functions. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
755
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
756 #define TRAMPOLINE_SIZE (TARGET_64BIT ? 32 : 16)
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
757 #define TRAMPOLINE_ALIGNMENT BITS_PER_WORD
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
758
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
759 /* Addressing modes, and classification of registers for them. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
760
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
761 /* Recognize any constant value that is a valid address. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
762 #define CONSTANT_ADDRESS_P(X) 0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
763
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
764 /* Maximum number of registers that can appear in a valid memory address. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
765 #define MAX_REGS_PER_ADDRESS 2
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
766
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
767 /* This definition replaces the formerly used 'm' constraint with a
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
768 different constraint letter in order to avoid changing semantics of
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
769 the 'm' constraint when accepting new address formats in
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
770 TARGET_LEGITIMATE_ADDRESS_P. The constraint letter defined here
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
771 must not be used in insn definitions or inline assemblies. */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
772 #define TARGET_MEM_CONSTRAINT 'e'
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
773
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
774 /* Try a machine-dependent way of reloading an illegitimate address
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
775 operand. If we find one, push the reload and jump to WIN. This
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
776 macro is used in only one place: `find_reloads_address' in reload.c. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
777 #define LEGITIMIZE_RELOAD_ADDRESS(AD, MODE, OPNUM, TYPE, IND, WIN) \
111
kono
parents: 67
diff changeset
778 do { \
kono
parents: 67
diff changeset
779 rtx new_rtx = legitimize_reload_address ((AD), (MODE), \
kono
parents: 67
diff changeset
780 (OPNUM), (int)(TYPE)); \
kono
parents: 67
diff changeset
781 if (new_rtx) \
kono
parents: 67
diff changeset
782 { \
kono
parents: 67
diff changeset
783 (AD) = new_rtx; \
kono
parents: 67
diff changeset
784 goto WIN; \
kono
parents: 67
diff changeset
785 } \
kono
parents: 67
diff changeset
786 } while (0)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
787
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
788 /* Helper macro for s390.c and s390.md to check for symbolic constants. */
111
kono
parents: 67
diff changeset
789 #define SYMBOLIC_CONST(X) \
kono
parents: 67
diff changeset
790 (GET_CODE (X) == SYMBOL_REF \
kono
parents: 67
diff changeset
791 || GET_CODE (X) == LABEL_REF \
kono
parents: 67
diff changeset
792 || (GET_CODE (X) == CONST && symbolic_reference_mentioned_p (X)))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
793
111
kono
parents: 67
diff changeset
794 #define TLS_SYMBOLIC_CONST(X) \
kono
parents: 67
diff changeset
795 ((GET_CODE (X) == SYMBOL_REF && tls_symbolic_operand (X)) \
kono
parents: 67
diff changeset
796 || (GET_CODE (X) == CONST && tls_symbolic_reference_mentioned_p (X)))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
797
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
798
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
799 /* Condition codes. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
800
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
801 /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
802 return the mode to be used for the comparison. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
803 #define SELECT_CC_MODE(OP, X, Y) s390_select_ccmode ((OP), (X), (Y))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
804
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
805 /* Relative costs of operations. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
806
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
807 /* A C expression for the cost of a branch instruction. A value of 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
808 is the default; other values are interpreted relative to that. */
111
kono
parents: 67
diff changeset
809 #define BRANCH_COST(speed_p, predictable_p) s390_branch_cost
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
810
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
811 /* Nonzero if access to memory by bytes is slow and undesirable. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
812 #define SLOW_BYTE_ACCESS 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
813
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
814 /* An integer expression for the size in bits of the largest integer machine
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
815 mode that should actually be used. We allow pairs of registers. */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
816 #define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (TARGET_64BIT ? TImode : DImode)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
817
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
818 /* The maximum number of bytes that a single instruction can move quickly
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
819 between memory and registers or between two memory locations. */
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
820 #define MOVE_MAX (TARGET_ZARCH ? 16 : 8)
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
821 #define MOVE_MAX_PIECES (TARGET_ZARCH ? 8 : 4)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
822 #define MAX_MOVE_MAX 16
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
823
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
824 /* Don't perform CSE on function addresses. */
111
kono
parents: 67
diff changeset
825 #define NO_FUNCTION_CSE 1
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
826
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
827 /* This value is used in tree-sra to decide whether it might benefical
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
828 to split a struct move into several word-size moves. For S/390
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
829 only small values make sense here since struct moves are relatively
111
kono
parents: 67
diff changeset
830 cheap thanks to mvc so the small default value chosen for archs
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
831 with memmove patterns should be ok. But this value is multiplied
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
832 in tree-sra with UNITS_PER_WORD to make a decision so we adjust it
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
833 here to compensate for that factor since mvc costs exactly the same
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
834 on 31 and 64 bit. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
835 #define MOVE_RATIO(speed) (TARGET_64BIT? 2 : 4)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
836
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
837
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
838 /* Sections. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
839
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
840 /* Output before read-only data. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
841 #define TEXT_SECTION_ASM_OP ".text"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
842
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
843 /* Output before writable (initialized) data. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
844 #define DATA_SECTION_ASM_OP ".data"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
845
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
846 /* Output before writable (uninitialized) data. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
847 #define BSS_SECTION_ASM_OP ".bss"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
848
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
849 /* S/390 constant pool breaks the devices in crtstuff.c to control section
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
850 in where code resides. We have to write it as asm code. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
851 #ifndef __s390x__
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
852 #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
853 asm (SECTION_OP "\n\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
854 bras\t%r2,1f\n\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
855 0: .long\t" USER_LABEL_PREFIX #FUNC " - 0b\n\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
856 1: l\t%r3,0(%r2)\n\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
857 bas\t%r14,0(%r3,%r2)\n\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
858 .previous");
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
859 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
860
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
861
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
862 /* Position independent code. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
863
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
864 #define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 12 : INVALID_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
865
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
866 #define LEGITIMATE_PIC_OPERAND_P(X) legitimate_pic_operand_p (X)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
867
111
kono
parents: 67
diff changeset
868 #ifndef TARGET_DEFAULT_PIC_DATA_IS_TEXT_RELATIVE
kono
parents: 67
diff changeset
869 #define TARGET_DEFAULT_PIC_DATA_IS_TEXT_RELATIVE 1
kono
parents: 67
diff changeset
870 #endif
kono
parents: 67
diff changeset
871
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
872
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
873 /* Assembler file format. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
874
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
875 /* Character to start a comment. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
876 #define ASM_COMMENT_START "#"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
877
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
878 /* Declare an uninitialized external linkage data object. */
111
kono
parents: 67
diff changeset
879 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
kono
parents: 67
diff changeset
880 asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
881
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
882 /* Globalizing directive for a label. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
883 #define GLOBAL_ASM_OP ".globl "
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
884
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
885 /* Advance the location counter to a multiple of 2**LOG bytes. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
886 #define ASM_OUTPUT_ALIGN(FILE, LOG) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
887 if ((LOG)) fprintf ((FILE), "\t.align\t%d\n", 1 << (LOG))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
888
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
889 /* Advance the location counter by SIZE bytes. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
890 #define ASM_OUTPUT_SKIP(FILE, SIZE) \
111
kono
parents: 67
diff changeset
891 fprintf ((FILE), "\t.set\t.,.+" HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
892
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
893 /* The LOCAL_LABEL_PREFIX variable is used by dbxelf.h. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
894 #define LOCAL_LABEL_PREFIX "."
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
895
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
896 #define LABEL_ALIGN(LABEL) \
111
kono
parents: 67
diff changeset
897 s390_label_align ((LABEL))
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
898
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
899 /* How to refer to registers in assembler output. This sequence is
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
900 indexed by compiler's hard-register-number (see above). */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
901 #define REGISTER_NAMES \
111
kono
parents: 67
diff changeset
902 { "%r0", "%r1", "%r2", "%r3", "%r4", "%r5", "%r6", "%r7", \
kono
parents: 67
diff changeset
903 "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", \
kono
parents: 67
diff changeset
904 "%f0", "%f2", "%f4", "%f6", "%f1", "%f3", "%f5", "%f7", \
kono
parents: 67
diff changeset
905 "%f8", "%f10", "%f12", "%f14", "%f9", "%f11", "%f13", "%f15", \
kono
parents: 67
diff changeset
906 "%ap", "%cc", "%fp", "%rp", "%a0", "%a1", \
kono
parents: 67
diff changeset
907 "%v16", "%v18", "%v20", "%v22", "%v17", "%v19", "%v21", "%v23", \
kono
parents: 67
diff changeset
908 "%v24", "%v26", "%v28", "%v30", "%v25", "%v27", "%v29", "%v31" \
kono
parents: 67
diff changeset
909 }
kono
parents: 67
diff changeset
910
kono
parents: 67
diff changeset
911 #define ADDITIONAL_REGISTER_NAMES \
kono
parents: 67
diff changeset
912 { { "v0", 16 }, { "v2", 17 }, { "v4", 18 }, { "v6", 19 }, \
kono
parents: 67
diff changeset
913 { "v1", 20 }, { "v3", 21 }, { "v5", 22 }, { "v7", 23 }, \
kono
parents: 67
diff changeset
914 { "v8", 24 }, { "v10", 25 }, { "v12", 26 }, { "v14", 27 }, \
kono
parents: 67
diff changeset
915 { "v9", 28 }, { "v11", 29 }, { "v13", 30 }, { "v15", 31 } };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
916
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
917 /* Print operand X (an rtx) in assembler syntax to file FILE. */
111
kono
parents: 67
diff changeset
918 #define PRINT_OPERAND(FILE, X, CODE) print_operand ((FILE), (X), (CODE))
kono
parents: 67
diff changeset
919 #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address ((FILE), (ADDR))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
920
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
921 /* Output an element of a case-vector that is absolute. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
922 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
923 do { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
924 char buf[32]; \
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
925 fputs (integer_asm_op (UNITS_PER_LONG, TRUE), (FILE)); \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
926 ASM_GENERATE_INTERNAL_LABEL (buf, "L", (VALUE)); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
927 assemble_name ((FILE), buf); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
928 fputc ('\n', (FILE)); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
929 } while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
930
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
931 /* Output an element of a case-vector that is relative. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
932 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
933 do { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
934 char buf[32]; \
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
935 fputs (integer_asm_op (UNITS_PER_LONG, TRUE), (FILE)); \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
936 ASM_GENERATE_INTERNAL_LABEL (buf, "L", (VALUE)); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
937 assemble_name ((FILE), buf); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
938 fputc ('-', (FILE)); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
939 ASM_GENERATE_INTERNAL_LABEL (buf, "L", (REL)); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
940 assemble_name ((FILE), buf); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
941 fputc ('\n', (FILE)); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
942 } while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
943
111
kono
parents: 67
diff changeset
944 /* Mark the return register as used by the epilogue so that we can
kono
parents: 67
diff changeset
945 use it in unadorned (return) and (simple_return) instructions. */
kono
parents: 67
diff changeset
946 #define EPILOGUE_USES(REGNO) ((REGNO) == RETURN_REGNUM)
kono
parents: 67
diff changeset
947
kono
parents: 67
diff changeset
948 #undef ASM_OUTPUT_FUNCTION_LABEL
kono
parents: 67
diff changeset
949 #define ASM_OUTPUT_FUNCTION_LABEL(FILE, NAME, DECL) \
kono
parents: 67
diff changeset
950 s390_asm_output_function_label ((FILE), (NAME), (DECL))
kono
parents: 67
diff changeset
951
kono
parents: 67
diff changeset
952 #if S390_USE_TARGET_ATTRIBUTE
kono
parents: 67
diff changeset
953 /* Hook to output .machine and .machinemode at start of function. */
kono
parents: 67
diff changeset
954 #undef ASM_OUTPUT_FUNCTION_PREFIX
kono
parents: 67
diff changeset
955 #define ASM_OUTPUT_FUNCTION_PREFIX s390_asm_output_function_prefix
kono
parents: 67
diff changeset
956
kono
parents: 67
diff changeset
957 /* Hook to output .machine and .machinemode at end of function. */
kono
parents: 67
diff changeset
958 #undef ASM_DECLARE_FUNCTION_SIZE
kono
parents: 67
diff changeset
959 #define ASM_DECLARE_FUNCTION_SIZE s390_asm_declare_function_size
kono
parents: 67
diff changeset
960 #endif
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
961
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
962 /* Miscellaneous parameters. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
963
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
964 /* Specify the machine mode that this machine uses for the index in the
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
965 tablejump instruction. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
966 #define CASE_VECTOR_MODE (TARGET_64BIT ? DImode : SImode)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
967
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
968 /* Specify the machine mode that pointers have.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
969 After generation of rtl, the compiler makes no further distinction
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
970 between pointers and any other objects of this machine mode. */
111
kono
parents: 67
diff changeset
971 #define Pmode (TARGET_64BIT ? DImode : SImode)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
972
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
973 /* This is -1 for "pointer mode" extend. See ptr_extend in s390.md. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
974 #define POINTERS_EXTEND_UNSIGNED -1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
975
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
976 /* A function address in a call instruction is a byte address (for
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
977 indexing purposes) so give the MEM rtx a byte's mode. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
978 #define FUNCTION_MODE QImode
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
979
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
980 /* Specify the value which is used when clz operand is zero. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
981 #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 64, 1)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
982
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
983 /* Machine-specific symbol_ref flags. */
111
kono
parents: 67
diff changeset
984 #define SYMBOL_FLAG_ALIGN_SHIFT SYMBOL_FLAG_MACH_DEP_SHIFT
kono
parents: 67
diff changeset
985 #define SYMBOL_FLAG_ALIGN_MASK \
kono
parents: 67
diff changeset
986 ((SYMBOL_FLAG_MACH_DEP << 0) | (SYMBOL_FLAG_MACH_DEP << 1))
kono
parents: 67
diff changeset
987
kono
parents: 67
diff changeset
988 #define SYMBOL_FLAG_SET_ALIGN(X, A) \
kono
parents: 67
diff changeset
989 (SYMBOL_REF_FLAGS (X) = (SYMBOL_REF_FLAGS (X) & ~SYMBOL_FLAG_ALIGN_MASK) \
kono
parents: 67
diff changeset
990 | (A << SYMBOL_FLAG_ALIGN_SHIFT))
kono
parents: 67
diff changeset
991
kono
parents: 67
diff changeset
992 #define SYMBOL_FLAG_GET_ALIGN(X) \
kono
parents: 67
diff changeset
993 ((SYMBOL_REF_FLAGS (X) & SYMBOL_FLAG_ALIGN_MASK) >> SYMBOL_FLAG_ALIGN_SHIFT)
kono
parents: 67
diff changeset
994
kono
parents: 67
diff changeset
995 /* Helpers to access symbol_ref flags. They are used in
kono
parents: 67
diff changeset
996 check_symref_alignment() and larl_operand to detect if the
kono
parents: 67
diff changeset
997 available alignment matches the required one. We do not use
kono
parents: 67
diff changeset
998 a positive check like _ALIGN2 because in that case we would have
kono
parents: 67
diff changeset
999 to annotate every symbol_ref. However, we only want to touch
kono
parents: 67
diff changeset
1000 the symbol_refs that can be misaligned and assume that the others
kono
parents: 67
diff changeset
1001 are correctly aligned. Hence, if a symbol_ref does not have
kono
parents: 67
diff changeset
1002 a _NOTALIGN flag it is supposed to be correctly aligned. */
kono
parents: 67
diff changeset
1003 #define SYMBOL_FLAG_SET_NOTALIGN2(X) SYMBOL_FLAG_SET_ALIGN((X), 1)
kono
parents: 67
diff changeset
1004 #define SYMBOL_FLAG_SET_NOTALIGN4(X) SYMBOL_FLAG_SET_ALIGN((X), 2)
kono
parents: 67
diff changeset
1005 #define SYMBOL_FLAG_SET_NOTALIGN8(X) SYMBOL_FLAG_SET_ALIGN((X), 3)
kono
parents: 67
diff changeset
1006
kono
parents: 67
diff changeset
1007 #define SYMBOL_FLAG_NOTALIGN2_P(X) (SYMBOL_FLAG_GET_ALIGN(X) == 1)
kono
parents: 67
diff changeset
1008 #define SYMBOL_FLAG_NOTALIGN4_P(X) (SYMBOL_FLAG_GET_ALIGN(X) == 2 \
kono
parents: 67
diff changeset
1009 || SYMBOL_FLAG_GET_ALIGN(X) == 1)
kono
parents: 67
diff changeset
1010 #define SYMBOL_FLAG_NOTALIGN8_P(X) (SYMBOL_FLAG_GET_ALIGN(X) == 3 \
kono
parents: 67
diff changeset
1011 || SYMBOL_FLAG_GET_ALIGN(X) == 2 \
kono
parents: 67
diff changeset
1012 || SYMBOL_FLAG_GET_ALIGN(X) == 1)
kono
parents: 67
diff changeset
1013
kono
parents: 67
diff changeset
1014 /* Check whether integer displacement is in range for a short displacement. */
kono
parents: 67
diff changeset
1015 #define SHORT_DISP_IN_RANGE(d) ((d) >= 0 && (d) <= 4095)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1016
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1017 /* Check whether integer displacement is in range. */
111
kono
parents: 67
diff changeset
1018 #define DISP_IN_RANGE(d) \
kono
parents: 67
diff changeset
1019 (TARGET_LONG_DISPLACEMENT \
kono
parents: 67
diff changeset
1020 ? ((d) >= -524288 && (d) <= 524287) \
kono
parents: 67
diff changeset
1021 : SHORT_DISP_IN_RANGE(d))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1022
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1023 /* Reads can reuse write prefetches, used by tree-ssa-prefetch-loops.c. */
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1024 #define READ_CAN_USE_WRITE_PREFETCH 1
111
kono
parents: 67
diff changeset
1025
kono
parents: 67
diff changeset
1026 extern const int processor_flags_table[];
kono
parents: 67
diff changeset
1027
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1028 struct s390_processor
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1029 {
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1030 /* The preferred name to be used in user visible output. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1031 const char *const name;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1032 /* CPU name as it should be passed to Binutils via .machine */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1033 const char *const binutils_name;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1034 const enum processor_type processor;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1035 const struct processor_costs *cost;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1036 int arch_level;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1037 };
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1038
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1039 extern const struct s390_processor processor_table[];
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1040
111
kono
parents: 67
diff changeset
1041 /* The truth element value for vector comparisons. Our instructions
kono
parents: 67
diff changeset
1042 always generate -1 in that case. */
kono
parents: 67
diff changeset
1043 #define VECTOR_STORE_FLAG_VALUE(MODE) CONSTM1_RTX (GET_MODE_INNER (MODE))
kono
parents: 67
diff changeset
1044
kono
parents: 67
diff changeset
1045 /* Target pragma. */
kono
parents: 67
diff changeset
1046
kono
parents: 67
diff changeset
1047 /* resolve_overloaded_builtin can not be defined the normal way since
kono
parents: 67
diff changeset
1048 it is defined in code which technically belongs to the
kono
parents: 67
diff changeset
1049 front-end. */
kono
parents: 67
diff changeset
1050 #define REGISTER_TARGET_PRAGMAS() \
kono
parents: 67
diff changeset
1051 do { \
kono
parents: 67
diff changeset
1052 s390_register_target_pragmas (); \
kono
parents: 67
diff changeset
1053 } while (0)
kono
parents: 67
diff changeset
1054
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1055 #ifndef USED_FOR_TARGET
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1056 /* The following structure is embedded in the machine
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1057 specific part of struct function. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1058
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1059 struct GTY (()) s390_frame_layout
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1060 {
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1061 /* Offset within stack frame. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1062 HOST_WIDE_INT gprs_offset;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1063 HOST_WIDE_INT f0_offset;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1064 HOST_WIDE_INT f4_offset;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1065 HOST_WIDE_INT f8_offset;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1066 HOST_WIDE_INT backchain_offset;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1067
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1068 /* Number of first and last gpr where slots in the register
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1069 save area are reserved for. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1070 int first_save_gpr_slot;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1071 int last_save_gpr_slot;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1072
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1073 /* Location (FP register number) where GPRs (r0-r15) should
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1074 be saved to.
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1075 0 - does not need to be saved at all
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1076 -1 - stack slot */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1077 #define SAVE_SLOT_NONE 0
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1078 #define SAVE_SLOT_STACK -1
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1079 signed char gpr_save_slots[16];
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1080
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1081 /* Number of first and last gpr to be saved, restored. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1082 int first_save_gpr;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1083 int first_restore_gpr;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1084 int last_save_gpr;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1085 int last_restore_gpr;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1086
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1087 /* Bits standing for floating point registers. Set, if the
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1088 respective register has to be saved. Starting with reg 16 (f0)
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1089 at the rightmost bit.
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1090 Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1091 fpr 15 13 11 9 14 12 10 8 7 5 3 1 6 4 2 0
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1092 reg 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1093 unsigned int fpr_bitmap;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1094
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1095 /* Number of floating point registers f8-f15 which must be saved. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1096 int high_fprs;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1097
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1098 /* Set if return address needs to be saved.
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1099 This flag is set by s390_return_addr_rtx if it could not use
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1100 the initial value of r14 and therefore depends on r14 saved
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1101 to the stack. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1102 bool save_return_addr_p;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1103
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1104 /* Size of stack frame. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1105 HOST_WIDE_INT frame_size;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1106 };
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1107
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1108
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1109 /* Define the structure for the machine field in struct function. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1110
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1111 struct GTY(()) machine_function
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1112 {
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1113 struct s390_frame_layout frame_layout;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1114
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1115 /* Literal pool base register. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1116 rtx base_reg;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1117
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1118 bool has_landing_pad_p;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1119
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1120 /* True if the current function may contain a tbegin clobbering
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1121 FPRs. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1122 bool tbegin_p;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1123
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1124 /* For -fsplit-stack support: A stack local which holds a pointer to
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1125 the stack arguments for a function with a variable number of
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1126 arguments. This is set at the start of the function and is used
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1127 to initialize the overflow_arg_area field of the va_list
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1128 structure. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1129 rtx split_stack_varargs_pointer;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1130
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1131 enum indirect_branch indirect_branch_jump;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1132 enum indirect_branch indirect_branch_call;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1133
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1134 enum indirect_branch function_return_mem;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1135 enum indirect_branch function_return_reg;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1136 };
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1137 #endif
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1138
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1139 #define TARGET_INDIRECT_BRANCH_NOBP_RET_OPTION \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1140 (cfun->machine->function_return_reg != indirect_branch_keep \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1141 || cfun->machine->function_return_mem != indirect_branch_keep)
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1142
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1143 #define TARGET_INDIRECT_BRANCH_NOBP_RET \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1144 ((cfun->machine->function_return_reg != indirect_branch_keep \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1145 && !s390_return_addr_from_memory ()) \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1146 || (cfun->machine->function_return_mem != indirect_branch_keep \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1147 && s390_return_addr_from_memory ()))
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1148
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1149 #define TARGET_INDIRECT_BRANCH_NOBP_JUMP \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1150 (cfun->machine->indirect_branch_jump != indirect_branch_keep)
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1151
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1152 #define TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1153 (cfun->machine->indirect_branch_jump == indirect_branch_thunk \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1154 || cfun->machine->indirect_branch_jump == indirect_branch_thunk_extern)
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1155
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1156 #define TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1157 (cfun->machine->indirect_branch_jump == indirect_branch_thunk_inline)
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1158
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1159 #define TARGET_INDIRECT_BRANCH_NOBP_CALL \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1160 (cfun->machine->indirect_branch_call != indirect_branch_keep)
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1161
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1162 #ifndef TARGET_DEFAULT_INDIRECT_BRANCH_TABLE
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1163 #define TARGET_DEFAULT_INDIRECT_BRANCH_TABLE 0
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1164 #endif
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1165
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1166 #define TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL "__s390_indirect_jump_r%d"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1167 #define TARGET_INDIRECT_BRANCH_THUNK_NAME_EX "__s390_indirect_jump_r%duse_r%d"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1168
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1169 #define TARGET_INDIRECT_BRANCH_TABLE s390_indirect_branch_table
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1170
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1171
111
kono
parents: 67
diff changeset
1172 #endif /* S390_H */