config revision 12027
16157Snate@binkert.org#! /bin/sh
26157Snate@binkert.org
36157Snate@binkert.org# set -x
46157Snate@binkert.org
56157Snate@binkert.org: ${LN_S:="ln -s"}
66157Snate@binkert.org
76157Snate@binkert.org# rm -f Makefile Makefile.md README.md qtmd.h qtmdb.s qtmdc.c qtmds.s configuration
86157Snate@binkert.orgrm -f qtmdc.c qtmds.s configuration
96157Snate@binkert.org
106157Snate@binkert.orgcase $1 in
116157Snate@binkert.org	axp*)
126157Snate@binkert.org		: "DEC AXP"
136157Snate@binkert.org		case $1 in
146157Snate@binkert.org			axp-osf1*)
156157Snate@binkert.org				: "Compile using /bin/cc under OSF 1.x."
166157Snate@binkert.org#				${LN_S} md/axp.1.Makefile Makefile.md
176157Snate@binkert.org				;;
186157Snate@binkert.org			axp-osf2*)
196157Snate@binkert.org				: "Compile using /bin/cc under OSF 2.x."
206157Snate@binkert.org#				${LN_S} md/axp.1.Makefile Makefile.md
216157Snate@binkert.org				;;
226157Snate@binkert.org			*)
236157Snate@binkert.org				: "Compile using GNU CC."
246157Snate@binkert.org#				${LN_S} md/axp.Makefile Makefile.md
256157Snate@binkert.org				;;
266157Snate@binkert.org		esac
276157Snate@binkert.org
286157Snate@binkert.org#		${LN_S} md/axp.h qtmd.h
296157Snate@binkert.org		${LN_S} md/axp.c qtmdc.c
306157Snate@binkert.org		${LN_S} md/axp.s qtmds.s
316157Snate@binkert.org#		${LN_S} md/axp_b.s qtmdb.s
326157Snate@binkert.org#		${LN_S} md/axp.README README.md
336157Snate@binkert.org		iter_init=1000000000
346157Snate@binkert.org		iter_runone=10000000
356157Snate@binkert.org		iter_blockint=10000000
366157Snate@binkert.org		iter_blockfloat=10000000
376157Snate@binkert.org		iter_vainit0=10000000
386157Snate@binkert.org		iter_vainit2=10000000
396157Snate@binkert.org		iter_vainit4=10000000
4010133Sandreas.hansson@arm.com		iter_vainit8=10000000
4110133Sandreas.hansson@arm.com		iter_vastart0=10000000
4210133Sandreas.hansson@arm.com		iter_vastart2=10000000
4310133Sandreas.hansson@arm.com		iter_vastart4=10000000
4410133Sandreas.hansson@arm.com		iter_vastart8=10000000
4510133Sandreas.hansson@arm.com		iter_bench_call_reg=10000000
4610133Sandreas.hansson@arm.com		iter_bench_call_imm=10000000
4710133Sandreas.hansson@arm.com		iter_bench_add=100000000
4810133Sandreas.hansson@arm.com		iter_bench_load=100000000
4910133Sandreas.hansson@arm.com		;;
5010133Sandreas.hansson@arm.com
5110133Sandreas.hansson@arm.com       hppa*)
5210133Sandreas.hansson@arm.com		: "HP's PA-RISC 1.1 processors."
5310133Sandreas.hansson@arm.com
5410133Sandreas.hansson@arm.com		case $1 in
5510133Sandreas.hansson@arm.com			hppa-cnx-spp*)
5610133Sandreas.hansson@arm.com				: "Convex SPP (PA-RISC 1.1 processors)."
5710133Sandreas.hansson@arm.com#				${LN_S} md/hppa-cnx.Makefile Makefile.md
5810133Sandreas.hansson@arm.com				;;
5910133Sandreas.hansson@arm.com			*)
6010133Sandreas.hansson@arm.com#				${LN_S} md/hppa.Makefile Makefile.md
6110133Sandreas.hansson@arm.com				;;
628492Snilay@cs.wisc.edu		esac
636168Snate@binkert.org
646168Snate@binkert.org#		${LN_S} md/hppa.h qtmd.h
656157Snate@binkert.org#		${LN_S} md/null.c qtmdc.c
666157Snate@binkert.org		${LN_S} md/hppa.s qtmds.s
676157Snate@binkert.org#		${LN_S} md/hppa_b.s qtmdb.s
686157Snate@binkert.org		iter_init=10000000
696157Snate@binkert.org		iter_runone=1000000
706157Snate@binkert.org		iter_blockint=1000000
716157Snate@binkert.org		iter_blockfloat=1000000
726157Snate@binkert.org		iter_vainit0=1000000
736157Snate@binkert.org		iter_vainit2=1000000
746157Snate@binkert.org		iter_vainit4=1000000
756157Snate@binkert.org		iter_vainit8=1000000
766157Snate@binkert.org		iter_vastart0=1000000
776157Snate@binkert.org		iter_vastart2=1000000
786157Snate@binkert.org		iter_vastart4=1000000
796157Snate@binkert.org		iter_vastart8=1000000
806157Snate@binkert.org		iter_bench_call_reg=10000000
816157Snate@binkert.org		iter_bench_call_imm=10000000
826157Snate@binkert.org		iter_bench_add=100000000
836157Snate@binkert.org		iter_bench_load=100000000
846157Snate@binkert.org		;;
856157Snate@binkert.org
866157Snate@binkert.org	x86_64*)
876157Snate@binkert.org		case $1 in
886157Snate@binkert.org			iX86-ss*)
896157Snate@binkert.org				: "Assembler comments '//'"
906157Snate@binkert.org				sed 's/\/\*/\/\//' < md/i386_64.s > qtmds.s
916157Snate@binkert.org				;;
926157Snate@binkert.org				
936157Snate@binkert.org			*)
946157Snate@binkert.org				${LN_S} md/iX86_64.s qtmds.s
956157Snate@binkert.org				;;
966157Snate@binkert.org		esac
976157Snate@binkert.org		: "Intel X386 64-bit and compatibles"
986157Snate@binkert.org#		${LN_S} md/null.c qtmdc.c
996157Snate@binkert.org		iter_init=10000000
1006157Snate@binkert.org		iter_runone=1000000
1016157Snate@binkert.org		iter_blockint=1000000
1026157Snate@binkert.org		iter_blockfloat=1000000
1036157Snate@binkert.org		iter_vainit0=1000000
1046157Snate@binkert.org		iter_vainit2=1000000
1056157Snate@binkert.org		iter_vainit4=1000000
1066157Snate@binkert.org		iter_vainit8=1000000
1076157Snate@binkert.org		iter_vastart0=1000000
1088483Sgblack@eecs.umich.edu		iter_vastart2=1000000
1098483Sgblack@eecs.umich.edu		iter_vastart4=1000000
1106157Snate@binkert.org		iter_vastart8=1000000
1116882SBrad.Beckmann@amd.com		iter_bench_call_reg=1000000
1126286Snate@binkert.org		iter_bench_call_imm=1000000
1136286Snate@binkert.org		iter_bench_add=100000000
1148092Snilay@cs.wisc.edu		iter_bench_load=10000000
1156286Snate@binkert.org		;;
1166286Snate@binkert.org
1176157Snate@binkert.org    iX86*)
11811208Sjoseph.gross@amd.com        case $1 in
1196157Snate@binkert.org            iX86-ss*)
12011210SBrad.Beckmann@amd.com                : "Assembler comments '//'"
12110301Snilay@cs.wisc.edu                sed 's/\/\*/\/\//' < md/i386.s > qtmds.s
1226157Snate@binkert.org#               sed 's/\/\*/\/\//' < md/i386_b.s > qtmdb.s
1236157Snate@binkert.org                ;;
12411122Snilay@cs.wisc.edu                
12510301Snilay@cs.wisc.edu            *)
1269363Snilay@cs.wisc.edu                ${LN_S} md/i386.s qtmds.s
12710301Snilay@cs.wisc.edu#               ${LN_S} md/i386_b.s qtmdb.s
1286286Snate@binkert.org                ;;
12910301Snilay@cs.wisc.edu        esac
13010301Snilay@cs.wisc.edu        : "Intel 80386 and compatibles (not '286...)"
13110301Snilay@cs.wisc.edu#       ${LN_S} md/default.Makefile Makefile.md
13210301Snilay@cs.wisc.edu#       ${LN_S} md/i386.h qtmd.h
1336157Snate@binkert.org#       ${LN_S} md/null.c qtmdc.c
13410301Snilay@cs.wisc.edu#       ${LN_S} md/i386.README README.md
13510301Snilay@cs.wisc.edu        iter_init=10000000
136        iter_runone=1000000
137        iter_blockint=1000000
138        iter_blockfloat=1000000
139        iter_vainit0=1000000
140        iter_vainit2=1000000
141        iter_vainit4=1000000
142        iter_vainit8=1000000
143        iter_vastart0=1000000
144        iter_vastart2=1000000
145        iter_vastart4=1000000
146        iter_vastart8=1000000
147        iter_bench_call_reg=1000000
148        iter_bench_call_imm=1000000
149        iter_bench_add=100000000
150        iter_bench_load=10000000
151        ;;
152
153
154	m68k)
155		: "Motorola 68000 family -- incomplete!"
156#		${LN_S} md/default.Makefile Makefile.md
157#		${LN_S} md/m68k.h qtmd.h
158#		${LN_S} md/null.c qtmdc.c
159		${LN_S} md/m68k.s qtmds.s
160#		${LN_S} md/m68k_b.s qtmdb.s
161#		${LN_S} md/null.README README.md
162		;;
163
164	m88k)
165		: "Motorola 88000 family"
166#		${LN_S} md/m88k.Makefile Makefile.md
167#		${LN_S} md/m88k.h qtmd.h
168		${LN_S} md/m88k.c qtmdc.c
169		${LN_S} md/m88k.s qtmds.s
170#		${LN_S} md/m88k_b.s qtmdb.s
171#		${LN_S} md/null.README README.md
172		iter_init=1000000
173		iter_runone=100000
174		iter_blockint=100000
175		iter_blockfloat=100000
176		iter_vainit0=100000
177		iter_vainit2=100000
178		iter_vainit4=100000
179		iter_vainit8=100000
180		iter_vastart0=100000
181		iter_vastart2=100000
182		iter_vastart4=100000
183		iter_vastart8=100000
184		iter_bench_call_reg=100000000
185		iter_bench_call_imm=100000000
186		iter_bench_add=1000000000
187		iter_bench_load=100000000
188		;;
189
190	mips*)
191		: "MIPS R2000 and R3000."
192
193		case $1 in
194			mips-irix5*)
195				: "Silicon Graphics Irix with dynamic linking"
196				: "Use mips for irix4."
197				${LN_S} md/mips-irix5.s qtmds.s
198				;;
199			*)
200				${LN_S} md/mips.s qtmds.s
201				;;
202		esac
203
204#		${LN_S} md/default.Makefile Makefile.md
205#		${LN_S} md/mips.h qtmd.h
206#		${LN_S} md/null.c qtmdc.c
207#		${LN_S} md/mips_b.s qtmdb.s
208#		${LN_S} md/null.README README.md
209		iter_init=10000000
210		iter_runone=10000000
211		iter_blockint=10000000
212		iter_blockfloat=10000000
213		iter_vainit0=1000000
214		iter_vainit2=1000000
215		iter_vainit4=1000000
216		iter_vainit8=1000000
217		iter_vastart0=1000000
218		iter_vastart2=1000000
219		iter_vastart4=1000000
220		iter_vastart8=1000000
221		iter_bench_call_reg=100000000
222		iter_bench_call_imm=100000000
223		iter_bench_add=1000000000
224		iter_bench_load=100000000
225		;;
226
227	sparc*)
228		: "SPARC processors"
229		case $1 in
230			sparc-os2*)
231				sed 's/_qt_/qt_/' md/sparc.s > qtmds.s
232#				sed 's/_b_/b_/' md/sparc_b.s > qtmdb.s
233#				${LN_S} md/solaris.README README.md
234				;;
235			*)
236				${LN_S} md/sparc.s qtmds.s
237#				${LN_S} md/sparc_b.s qtmdb.s
238#				${LN_S} md/null.README README.md
239				;;
240		esac
241
242 		${LN_S} md/default.Makefile Makefile.md
243#		${LN_S} md/sparc.h qtmd.h
244#		${LN_S} md/null.c qtmdc.c
245		iter_init=10000000
246		iter_runone=1000000
247		iter_blockint=1000000
248		iter_blockfloat=1000000
249		iter_vainit0=1000000
250		iter_vainit2=1000000
251		iter_vainit4=1000000
252		iter_vainit8=1000000
253		iter_vastart0=1000000
254		iter_vastart2=1000000
255		iter_vastart4=1000000
256		iter_vastart8=1000000
257		iter_bench_call_reg=10000000
258		iter_bench_call_imm=10000000
259		iter_bench_add=100000000
260		iter_bench_load=100000000
261		;;
262
263	vax*)
264		: "DEC VAX processors."
265#		${LN_S} md/default.Makefile Makefile.md
266#		${LN_S} md/vax.h qtmd.h
267#		${LN_S} md/null.c qtmdc.c
268		${LN_S} md/vax.s qtmds.s
269#		${LN_S} md/vax_b.s qtmdb.s
270#		${LN_S} md/null.README README.md
271		iter_init=1000000
272		iter_runone=100000
273		iter_blockint=100000
274		iter_blockfloat=100000
275		iter_vainit0=100000
276		iter_vainit2=100000
277		iter_vainit4=100000
278		iter_vainit8=100000
279		iter_vastart0=100000
280		iter_vastart2=100000
281		iter_vastart4=100000
282		iter_vastart8=100000
283		iter_bench_call_reg=10000000
284		iter_bench_call_imm=10000000
285		iter_bench_add=10000000
286		iter_bench_load=1000000
287		;;
288
289	ksr1)
290		: "Kendall Square Research model KSR-1."
291		: "Varargs is not currently supported."
292#		${LN_S} md/ksr1.Makefile Makefile.md
293#		${LN_S} md/ksr1.h qtmd.h
294#		${LN_S} md/null.c qtmdc.c
295		${LN_S} md/ksr1.s qtmds.s
296#		${LN_S} md/ksr1_b.s qtmdb.s
297#		${LN_S} md/null.README README.md
298		iter_init=1000000
299		iter_runone=100000
300		iter_blockint=100000
301		iter_blockfloat=100000
302		iter_vainit0=100000
303		iter_vainit2=100000
304		iter_vainit4=100000
305		iter_vainit8=100000
306		iter_vastart0=100000
307		iter_vastart2=100000
308		iter_vastart4=100000
309		iter_vastart8=100000
310		iter_bench_call_reg=10000000
311		iter_bench_call_imm=10000000
312		iter_bench_add=10000000
313		iter_bench_load=1000000
314		;;
315
316    powerpc*)
317        : "PowerPC IBM/Motorola processors."
318
319        case $1 in
320			powerpc-apple-macosx*)
321				: "PowerPC using Mach Application Binary Interface"
322                : "NOTICE: Darwin assembler syntax is used:"
323                : "  (i.e. registers are named rx not %rx)"
324                ${LN_S} md/default.Makefile Makefile.md
325#               ${LN_S} md/powerpc_mach.h qtmd.h
326                ${LN_S} md/powerpc_mach.s qtmds.s
327                ;;
328            powerpc-linux*)
329                : "PowerPC using System V Application Binary Interface"
330                : "  (e.g. LinuxPPC)"
331                : "Use powerpc-darwin for MacOS X and other systems based on Mac
332h ABI"
333#               ${LN_S} md/powerpc_sys5.h qtmd.h
334                ${LN_S} md/powerpc_sys5.s qtmds.s
335                ;;
336            *)
337                echo "Unknown configuration"
338                echo "See md/powerpc.README for documentation"
339                echo "Use powerpc-darwin for MacOS X and other systems based on
340Mach ABI"
341                echo "Use powerpc-linux for Linux and other systems based on Sys
342tem V ABI"
343                exit 1
344                ;;
345
346        esac
347
348        ${LN_S} md/powerpc.c qtmdc.c
349        ${LN_S} md/powerpc.README README.md
350        ;;
351
352
353	pthreads*)
354		: Posix thread support rather than Quick threads.
355#		${LN_S} md/hppa.h qtmd.h
356#		${LN_S} md/null.c qtmdc.c
357#		${LN_S} md/null.s qtmds.s
358#		${LN_S} md/hppa_b.s qtmdb.s
359#		cp md/pthreads.Makefile Makefile
360		exit 0
361		;;
362
363	clean)
364		: Deconfigure
365		exit 0
366		;;
367
368	*)
369		echo "Unknown configuration"
370		exit 1
371		;;
372esac
373
374# cat Makefile.md Makefile.base > Makefile
375
376echo set config_machine=$1 >> configuration
377echo set config_init=$iter_init >> configuration
378echo set config_runone=$iter_runone >> configuration
379echo set config_blockint=$iter_blockint >> configuration
380echo set config_blockfloat=$iter_blockfloat >> configuration
381echo set config_vainit0=$iter_vainit0 >> configuration
382echo set config_vainit2=$iter_vainit2 >> configuration
383echo set config_vainit4=$iter_vainit4 >> configuration
384echo set config_vainit8=$iter_vainit8 >> configuration
385echo set config_vastart0=$iter_vastart0 >> configuration
386echo set config_vastart2=$iter_vastart2 >> configuration
387echo set config_vastart4=$iter_vastart4 >> configuration
388echo set config_vastart8=$iter_vastart8 >> configuration
389echo set config_bcall_reg=$iter_bench_call_reg >> configuration
390echo set config_bcall_imm=$iter_bench_call_imm >> configuration
391echo set config_b_add=$iter_bench_add >> configuration
392echo set config_b_load=$iter_bench_load >> configuration
393