gdb: new AndesTech NDS32 port
[deliverable/binutils-gdb.git] / gdb / features / Makefile
CommitLineData
618f726f 1# Copyright (C) 2007-2016 Free Software Foundation, Inc.
fb1e4ffc
DJ
2
3# This file is part of GDB.
4
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
dcf7800b 7# the Free Software Foundation; either version 3 of the License, or
fb1e4ffc
DJ
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
dcf7800b 16# along with this program. If not, see <http://www.gnu.org/licenses/>.
fb1e4ffc
DJ
17
18
19# This file requires GNU make!
20
21# This Makefile updates files in ../regformats from their XML master
22# copies. Because this relies on xsltproc, it is not normally run
23# during the build process; it should be run by hand when one of the
24# affected XML files is changed, and the results should be kept in the
25# GDB repository.
26
81adfced 27# It can also update the C files in the features directory from their
db74e4ba
PA
28# XML master copies. This relies on a GDB linked with expat and that
29# is configured to include support for the architecture, so the files
30# are kept in the GDB repository.
31#
32# By default we'll generate all C files, and you must point make at a
33# GDB that has been configured with --enable-targets=all:
34#
35# make GDB=/path/to/gdb cfiles
36#
37# To regenerate all C files from scratch:
38#
39# make GDB=/path/to/gdb clean-cfiles cfiles
40#
41# To generate specific C files, you can override the XMLTOC make
42# variable:
43#
81adfced
DJ
44# make GDB=/path/to/gdb XMLTOC="xml files" cfiles
45
6ac1c082 46WHICH = aarch64 \
07b287a0 47 arm-with-iwmmxt arm-with-vfpv2 arm-with-vfpv3 arm-with-neon \
46763423 48 i386/i386 i386/i386-linux \
3a13a53b 49 i386/i386-mmx i386/i386-mmx-linux \
46763423 50 i386/amd64 i386/amd64-linux \
98adf0f3 51 i386/i386-avx i386/i386-avx-linux \
ccc42043 52 i386/i386-mpx i386/i386-mpx-linux \
2b863f51 53 i386/i386-avx-mpx i386/i386-avx-mpx-linux \
01f9f808 54 i386/i386-avx512 i386/i386-avx512-linux \
98adf0f3 55 i386/amd64-avx i386/amd64-avx-linux \
ccc42043 56 i386/amd64-mpx i386/amd64-mpx-linux \
2b863f51 57 i386/amd64-avx-mpx i386/amd64-avx-mpx-linux \
01f9f808 58 i386/amd64-avx512 i386/amd64-avx512-linux \
9a82b8ff
L
59 i386/x32 i386/x32-linux \
60 i386/x32-avx i386/x32-avx-linux \
01f9f808 61 i386/x32-avx512 i386/x32-avx512-linux \
1faeff08 62 mips-linux mips-dsp-linux \
164224e9 63 microblaze-with-stack-protect \
1faeff08 64 mips64-linux mips64-dsp-linux \
a1217d97 65 nios2-linux \
0482b03b 66 rs6000/powerpc-32 \
7284e1be 67 rs6000/powerpc-32l rs6000/powerpc-altivec32l rs6000/powerpc-e500l \
604c2f83 68 rs6000/powerpc-64l rs6000/powerpc-altivec64l rs6000/powerpc-vsx32l \
7803799a 69 rs6000/powerpc-vsx64l rs6000/powerpc-cell32l rs6000/powerpc-cell64l \
224bbe49 70 s390-linux32 s390-linux64 s390x-linux64 \
c642a434
UW
71 s390-linux32v1 s390-linux64v1 s390x-linux64v1 \
72 s390-linux32v2 s390-linux64v2 s390x-linux64v2 \
446899e4
AA
73 s390-te-linux64 s390x-te-linux64 s390-vx-linux64 s390x-vx-linux64 \
74 s390-tevx-linux64 s390x-tevx-linux64 \
224bbe49
YQ
75 tic6x-c64xp tic6x-c64x tic6x-c62x \
76 tic6x-c64xp-linux tic6x-c64x-linux tic6x-c62x-linux
fb1e4ffc
DJ
77
78# Record which registers should be sent to GDB by default after stop.
07b287a0 79aarch64-expedite = x29,sp,pc
58d6951d 80arm-expedite = r11,sp,pc
46763423
L
81i386/i386-expedite = ebp,esp,eip
82i386/i386-linux-expedite = ebp,esp,eip
83i386/amd64-expedite = rbp,rsp,rip
84i386/amd64-linux-expedite = rbp,rsp,rip
98adf0f3
L
85i386/i386-avx-expedite = ebp,esp,eip
86i386/i386-avx-linux-expedite = ebp,esp,eip
ccc42043 87i386/i386-mpx-expedite = ebp,esp,eip
2b863f51 88i386/i386-avx-mpx-expedite = ebp,esp,eip
ccc42043 89i386/i386-mpx-linux-expedite = ebp,esp,eip
2b863f51 90i386/i386-avx-mpx-linux-expedite = ebp,esp,eip
01f9f808
MS
91i386/i386-avx512-expedite = ebp,esp,eip
92i386/i386-avx512-linux-expedite = ebp,esp,eip
3a13a53b
L
93i386/i386-mmx-expedite = ebp,esp,eip
94i386/i386-mmx-linux-expedite = ebp,esp,eip
98adf0f3
L
95i386/amd64-avx-expedite = rbp,rsp,rip
96i386/amd64-avx-linux-expedite = rbp,rsp,rip
ccc42043 97i386/amd64-mpx-expedite = rbp,rsp,rip
2b863f51 98i386/amd64-avx-mpx-expedite = rbp,rsp,rip
ccc42043 99i386/amd64-mpx-linux-expedite = rbp,rsp,rip
2b863f51 100i386/amd64-avx-mpx-linux-expedite = rbp,rsp,rip
01f9f808
MS
101i386/amd64-avx512-expedite = rbp,rsp,rip
102i386/amd64-avx512-linux-expedite = rbp,rsp,rip
9a82b8ff
L
103i386/x32-expedite = rbp,rsp,rip
104i386/x32-linux-expedite = rbp,rsp,rip
105i386/x32-avx-expedite = rbp,rsp,rip
106i386/x32-avx-linux-expedite = rbp,rsp,rip
01f9f808
MS
107i386/x32-avx512-expedite = rbp,rsp,rip
108i386/x32-avx512-linux-expedite = rbp,rsp,rip
58d6951d 109mips-expedite = r29,pc
1faeff08 110mips-dsp-expedite = r29,pc
58d6951d 111mips64-expedite = r29,pc
1faeff08 112mips64-dsp-expedite = r29,pc
449aa9df 113microblaze-expedite = r1,rpc
a1217d97 114nios2-linux-expedite = sp,pc
58d6951d 115powerpc-expedite = r1,pc
f4d9bade
UW
116rs6000/powerpc-cell32l-expedite = r1,pc,r0,orig_r3,r4
117rs6000/powerpc-cell64l-expedite = r1,pc,r0,orig_r3,r4
7803799a 118s390-linux32-expedite = r14,r15,pswa
c642a434
UW
119s390-linux32v1-expedite = r14,r15,pswa
120s390-linux32v2-expedite = r14,r15,pswa
7803799a 121s390-linux64-expedite = r14l,r15l,pswa
c642a434
UW
122s390-linux64v1-expedite = r14l,r15l,pswa
123s390-linux64v2-expedite = r14l,r15l,pswa
d5552aab 124s390-te-linux64-expedite = r14l,r15l,pswa
446899e4
AA
125s390-vx-linux64-expedite = r14l,r15l,pswa
126s390-tevx-linux64-expedite = r14l,r15l,pswa
7803799a 127s390x-linux64-expedite = r14,r15,pswa
c642a434
UW
128s390x-linux64v1-expedite = r14,r15,pswa
129s390x-linux64v2-expedite = r14,r15,pswa
4ac33720 130s390x-te-linux64-expedite = r14,r15,pswa
446899e4
AA
131s390x-vx-linux64-expedite = r14,r15,pswa
132s390x-tevx-linux64-expedite = r14,r15,pswa
224bbe49
YQ
133tic6x-c64xp-expedite = A15,PC
134tic6x-c64x-expedite = A15,PC
135tic6x-c62x-expedite = A15,PC
136tic6x-c64xp-linux-expedite = A15,PC
137tic6x-c64x-linux-expedite = A15,PC
138tic6x-c62x-linux-expedite = A15,PC
604c2f83 139
fb1e4ffc
DJ
140
141XSLTPROC = xsltproc
142outdir = ../regformats
143OUTPUTS = $(patsubst %,$(outdir)/%.dat,$(WHICH))
144
db74e4ba
PA
145# The set of xml files we'll generate .c files for GDB from. By
146# default we'll build all .c files, which requires an
147# --enable-targets=all GDB. You can override this by passing XMLTOC
148# to make on the command line.
149XMLTOC = \
150 aarch64.xml \
151 arm-with-iwmmxt.xml \
152 arm-with-m-fpa-layout.xml \
153 arm-with-m-vfp-d16.xml \
154 arm-with-m.xml \
155 arm-with-neon.xml \
156 arm-with-vfpv2.xml \
157 arm-with-vfpv3.xml \
158 i386/amd64-avx-linux.xml \
159 i386/amd64-avx.xml \
160 i386/amd64-avx512-linux.xml \
161 i386/amd64-avx512.xml \
162 i386/amd64-linux.xml \
163 i386/amd64-mpx-linux.xml \
164 i386/amd64-mpx.xml \
2b863f51
WT
165 i386/amd64-avx-mpx-linux.xml \
166 i386/amd64-avx-mpx.xml \
db74e4ba
PA
167 i386/amd64.xml \
168 i386/i386-avx-linux.xml \
169 i386/i386-avx.xml \
170 i386/i386-avx512-linux.xml \
171 i386/i386-avx512.xml \
172 i386/i386-linux.xml \
173 i386/i386-mmx-linux.xml \
174 i386/i386-mmx.xml \
175 i386/i386-mpx-linux.xml \
176 i386/i386-mpx.xml \
2b863f51
WT
177 i386/i386-avx-mpx-linux.xml \
178 i386/i386-avx-mpx.xml \
db74e4ba
PA
179 i386/i386.xml \
180 i386/x32-avx-linux.xml \
181 i386/x32-avx.xml \
182 i386/x32-avx512-linux.xml \
183 i386/x32-avx512.xml \
184 i386/x32-linux.xml \
185 i386/x32.xml \
186 microblaze-with-stack-protect.xml \
187 microblaze.xml \
188 mips-dsp-linux.xml \
189 mips-linux.xml \
190 mips64-dsp-linux.xml \
191 mips64-linux.xml \
a28d8e50 192 nds32.xml \
db74e4ba
PA
193 nios2-linux.xml \
194 nios2.xml \
195 rs6000/powerpc-32.xml \
196 rs6000/powerpc-32l.xml \
197 rs6000/powerpc-403.xml \
198 rs6000/powerpc-403gc.xml \
199 rs6000/powerpc-405.xml \
200 rs6000/powerpc-505.xml \
201 rs6000/powerpc-601.xml \
202 rs6000/powerpc-602.xml \
203 rs6000/powerpc-603.xml \
204 rs6000/powerpc-604.xml \
205 rs6000/powerpc-64.xml \
206 rs6000/powerpc-64l.xml \
207 rs6000/powerpc-7400.xml \
208 rs6000/powerpc-750.xml \
209 rs6000/powerpc-860.xml \
210 rs6000/powerpc-altivec32.xml \
211 rs6000/powerpc-altivec32l.xml \
212 rs6000/powerpc-altivec64.xml \
213 rs6000/powerpc-altivec64l.xml \
214 rs6000/powerpc-cell32l.xml \
215 rs6000/powerpc-cell64l.xml \
216 rs6000/powerpc-e500.xml \
217 rs6000/powerpc-e500l.xml \
218 rs6000/powerpc-isa205-32l.xml \
219 rs6000/powerpc-isa205-64l.xml \
220 rs6000/powerpc-isa205-altivec32l.xml \
221 rs6000/powerpc-isa205-altivec64l.xml \
222 rs6000/powerpc-isa205-vsx32l.xml \
223 rs6000/powerpc-isa205-vsx64l.xml \
224 rs6000/powerpc-vsx32.xml \
225 rs6000/powerpc-vsx32l.xml \
226 rs6000/powerpc-vsx64.xml \
227 rs6000/powerpc-vsx64l.xml \
228 rs6000/rs6000.xml \
229 s390-linux32.xml \
230 s390-linux32v1.xml \
231 s390-linux32v2.xml \
232 s390-linux64.xml \
233 s390-linux64v1.xml \
234 s390-linux64v2.xml \
235 s390-te-linux64.xml \
236 s390x-linux64.xml \
237 s390x-linux64v1.xml \
238 s390x-linux64v2.xml \
239 s390x-te-linux64.xml \
240 tic6x-c62x-linux.xml \
241 tic6x-c62x.xml \
242 tic6x-c64x-linux.xml \
243 tic6x-c64x.xml \
244 tic6x-c64xp-linux.xml \
245 tic6x-c64xp.xml
246
81adfced
DJ
247CFILES = $(patsubst %.xml,%.c,$(XMLTOC))
248GDB = false
249
fb1e4ffc
DJ
250all: $(OUTPUTS)
251
252$(outdir)/%.dat: %.xml number-regs.xsl sort-regs.xsl gdbserver-regs.xsl
5fdeec1d
PA
253 echo "# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro:" > $(outdir)/$*.tmp
254 echo "# Generated from: $<" >> $(outdir)/$*.tmp
30ed0a8f 255 echo "name:`echo $(notdir $*) | sed 's/-/_/g'`" >> $(outdir)/$*.tmp
221c031f 256 echo "xmltarget:$(<F)" >> $(outdir)/$*.tmp
f4d9bade
UW
257 echo "expedite:$(if $($*-expedite),$($*-expedite),$($(firstword $(subst -, ,$(notdir $*)))-expedite))" \
258 >> $(outdir)/$*.tmp
30ed0a8f 259 $(XSLTPROC) --path "$(PWD)" --xinclude number-regs.xsl $< | \
fb1e4ffc
DJ
260 $(XSLTPROC) sort-regs.xsl - | \
261 $(XSLTPROC) gdbserver-regs.xsl - >> $(outdir)/$*.tmp
262 sh ../../move-if-change $(outdir)/$*.tmp $(outdir)/$*.dat
263
81adfced
DJ
264cfiles: $(CFILES)
265%.c: %.xml
266 $(GDB) -nx -q -batch \
267 -ex "set tdesc filename $<" -ex 'maint print c-tdesc' > $@.tmp
268 sh ../../move-if-change $@.tmp $@
269
fb1e4ffc
DJ
270# Other dependencies.
271$(outdir)/arm-with-iwmmxt.dat: arm-core.xml xscale-iwmmxt.xml
46763423
L
272$(outdir)/i386/i386.dat: i386/32bit-core.xml i386/32bit-sse.xml
273$(outdir)/i386/i386-linux.dat: i386/32bit-core.xml i386/32bit-sse.xml \
274 i386/32bit-linux.xml
275$(outdir)/i386/amd64.dat: i386/64bit-core.xml i386/64bit-sse.xml
276$(outdir)/i386/amd64-linux.dat: i386/64bit-core.xml i386/64bit-sse.xml \
277 i386/64bit-linux.xml
98adf0f3
L
278$(outdir)/i386/i386-avx.dat: i386/32bit-core.xml i386/32bit-avx.xml
279$(outdir)/i386/i386-avx-linux.dat: i386/32bit-core.xml i386/32bit-avx.xml \
280 i386/32bit-linux.xml
ccc42043
WT
281$(outdir)/i386/i386-mpx.dat: i386/32bit-core.xml i386/32bit-avx.xml \
282 i386/32bit-mpx.xml
283$(outdir)/i386/i386-mpx-linux.dat: i386/32bit-core.xml i386/32bit-avx.xml \
284 i386/32bit-linux.xml i386/32bit-mpx.xml
2b863f51
WT
285$(outdir)/i386/i386-mpx-linux.dat: i386/32bit-core.xml \
286 i386/32bit-linux.xml i386/32bit-mpx.xml
287$(outdir)/i386/i386-avx-mpx-linux.dat: i386/32bit-core.xml \
288 i386/32bit-linux.xml i386/32bit-mpx.xml
01f9f808
MS
289$(outdir)/i386/i386-avx512.dat: i386/32bit-core.xml i386/32bit-avx.xml \
290 i386/32bit-mpx.xml i386/32bit-avx512.xml
291$(outdir)/i386/i386-avx512-linux.dat: i386/32bit-core.xml i386/32bit-avx.xml \
292 i386/32bit-linux.xml i386/32bit-mpx.xml i386/32bit-avx512.xml
3a13a53b
L
293$(outdir)/i386/i386-mmx.dat: i386/32bit-core.xml
294$(outdir)/i386/i386-mmx-linux.dat: i386/32bit-core.xml i386/32bit-linux.xml
98adf0f3
L
295$(outdir)/i386/amd64-avx.dat: i386/64bit-core.xml i386/64bit-avx.xml
296$(outdir)/i386/amd64-avx-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
297 i386/64bit-linux.xml
ccc42043
WT
298$(outdir)/i386/amd64-mpx-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
299 i386/64bit-linux.xml i386/64bit-mpx.xml
2b863f51
WT
300$(outdir)/i386/amd64-avx-mpx-linux.dat: i386/64bit-core.xml \
301 i386/64bit-linux.xml i386/64bit-mpx.xml
ccc42043
WT
302$(outdir)/i386/amd64-mpx.dat: i386/64bit-core.xml i386/64bit-avx.xml \
303 i386/64bit-mpx.xml
2b863f51
WT
304$(outdir)/i386/amd64-avx-mpx.dat: i386/64bit-core.xml \
305 i386/64bit-mpx.xml
01f9f808
MS
306$(outdir)/i386/amd64-avx512.dat: i386/64bit-core.xml i386/64bit-avx.xml \
307 i386/64bit-mpx.xml i386/64bit-avx512.xml
308$(outdir)/i386/amd64-avx512-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
309 i386/64bit-mpx.xml i386/64bit-avx512.xml \
310 i386/64bit-linux.xml
9a82b8ff
L
311$(outdir)/i386/x32.dat: i386/x32-core.xml i386/64bit-sse.xml
312$(outdir)/i386/x32-linux.dat: i386/x32-core.xml i386/64bit-sse.xml \
313 i386/64bit-linux.xml
314$(outdir)/i386/x32-avx.dat: i386/x32-core.xml i386/64bit-avx.xml
315$(outdir)/i386/x32-avx-linux.dat: i386/x32-core.xml i386/64bit-avx.xml \
316 i386/64bit-linux.xml
01f9f808
MS
317$(outdir)/i386/x32-avx512.dat: i386/x32-core.xml i386/64bit-avx.xml \
318 i386/64bit-mpx.xml i386/64bit-avx512.xml
319$(outdir)/i386/x32-avx512-linux.dat: i386/x32-core.xml i386/64bit-avx.xml \
320 i386/64bit-mpx.xml i386/64bit-avx512.xml i386/64bit-linux.xml
acc9fe45 321
db74e4ba
PA
322# 'all' doesn't build the C files, so don't delete them in 'clean'
323# either.
324clean-cfiles:
325 rm -f $(CFILES)
326
acc9fe45
PA
327clean:
328 rm -f $(OUTPUTS)
This page took 0.880358 seconds and 4 git commands to generate.