From: Ian Lance Taylor Date: Mon, 14 Aug 1995 20:06:03 +0000 (+0000) Subject: * gasp/mri/*: New tests. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b2e0bd6315d63008b6d037362ba16ddc7b8ed65d;p=binutils-gdb.git * gasp/mri/*: New tests. * gasp/gasp.exp: Run them. Also, clean up the test names used in pass and fail. --- diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 2f7b23474f4..73d4d1ba7f0 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +Mon Aug 14 16:03:07 1995 Ian Lance Taylor + + * gasp/mri/*: New tests. + * gasp/gasp.exp: Run them. Also, clean up the test names used in + pass and fail. + start-sanitize-sh3e Sun Aug 13 00:39:24 1995 Jeff Law (law@snake.cs.utah.edu) diff --git a/gas/testsuite/gasp/.Sanitize b/gas/testsuite/gasp/.Sanitize index c736c9fb987..974c3013797 100644 --- a/gas/testsuite/gasp/.Sanitize +++ b/gas/testsuite/gasp/.Sanitize @@ -61,6 +61,7 @@ macro.out mdouble.asm mdouble.err mdouble.out +mri pl1.asm pl1.err pl1.out diff --git a/gas/testsuite/gasp/gasp.exp b/gas/testsuite/gasp/gasp.exp index ec0672e9cf3..f64abec1c1b 100644 --- a/gas/testsuite/gasp/gasp.exp +++ b/gas/testsuite/gasp/gasp.exp @@ -1,17 +1,16 @@ +# Test gasp. - -proc gasp_test { testname } { +proc gasp_test { filename testname opt } { global GASP global srcdir - - send_log "$srcdir/lib/run $GASP -s $testname.asm -o gasp.out \n" - catch "exec $srcdir/lib/run $GASP -I$srcdir/gasp -s $testname.asm -o gasp.out" errs - catch "exec diff gasp.out $testname.out" diffs + + send_log "$srcdir/lib/run $GASP -I$srcdir/gasp -s $opt $filename.asm -o gasp.out\n" + catch "exec $srcdir/lib/run $GASP -I$srcdir/gasp -s $opt $filename.asm -o gasp.out" errs + catch "exec diff gasp.out $filename.out" diffs if ![string match "" $diffs] { send_log "$diffs\n" verbose $diffs fail $testname - send_log "exec cat gasp.out" return 0 } else { pass $testname @@ -19,13 +18,17 @@ proc gasp_test { testname } { } -set testname "GASP" - foreach src [ lsort [ glob $srcdir/gasp/*.asm ] ] { regsub -all ".asm" $src "" t - gasp_test $t + regsub "^.*/(\[^/\]*)$" $t "gasp \\1" testname + gasp_test $t $testname "" } +foreach src [ lsort [ glob $srcdir/gasp/mri/*.asm ] ] { + regsub -all ".asm" $src "" t + regsub "^.*/(\[^/\]*)$" $t "gasp MRI \\1" testname + gasp_test $t $testname "-M" +} # FIXME: this is here cause of a bug in DejaGnu 1.1.1. When it is no longer # in use, then this can be removed. diff --git a/gas/testsuite/gasp/mri/.Sanitize b/gas/testsuite/gasp/mri/.Sanitize new file mode 100644 index 00000000000..69f578181e5 --- /dev/null +++ b/gas/testsuite/gasp/mri/.Sanitize @@ -0,0 +1,47 @@ +# Sanitize.in for devo/gas/testsuite/gasp/mri. +# + +# Each directory to survive it's way into a release will need a file +# like this one called "./.Sanitize". All keyword lines must exist, +# and must exist in the order specified by this file. Each directory +# in the tree will be processed, top down, in the following order. + +# Hash started lines like this one are comments and will be deleted +# before anything else is done. Blank lines will also be squashed +# out. + +# The lines between the "Do-first:" line and the "Things-to-keep:" +# line are executed as a /bin/sh shell script before anything else is +# done in this + +Do-first: + + +# All files listed between the "Things-to-keep:" line and the +# "Files-to-sed:" line will be kept. All other files will be removed. +# Directories listed in this section will have their own Sanitize +# called. Directories not listed will be removed in their entirety +# with rm -rf. + +Things-to-keep: + +embed.asm +embed.out +exists.asm +exists.out +irp.asm +irp.out +irpc.asm +irpc.out +macro.asm +macro.out +narg.asm +narg.out +rept.asm +rept.out + +Things-to-lose: + +Do-last: + +# End of file. diff --git a/gas/testsuite/gasp/mri/embed.asm b/gas/testsuite/gasp/mri/embed.asm new file mode 100644 index 00000000000..f1b8f78bf84 --- /dev/null +++ b/gas/testsuite/gasp/mri/embed.asm @@ -0,0 +1,5 @@ +embed macro label +addr&&label dc.l label + endm + + embed foo diff --git a/gas/testsuite/gasp/mri/embed.out b/gas/testsuite/gasp/mri/embed.out new file mode 100644 index 00000000000..0235afcfbe8 --- /dev/null +++ b/gas/testsuite/gasp/mri/embed.out @@ -0,0 +1,9 @@ +!embed macro label +!addr&&label dc.l label +! endm +! + +! embed foo +!addrfoo dc.l foo +addrfoo: dc.l foo +! \ No newline at end of file diff --git a/gas/testsuite/gasp/mri/exists.asm b/gas/testsuite/gasp/mri/exists.asm new file mode 100644 index 00000000000..87220c624e9 --- /dev/null +++ b/gas/testsuite/gasp/mri/exists.asm @@ -0,0 +1,10 @@ +exists macro arg1,arg2 + ifne ==arg2 + move arg1,arg2 + elsec + push arg1 + endc + endm + + exists foo,bar + exists foo diff --git a/gas/testsuite/gasp/mri/exists.out b/gas/testsuite/gasp/mri/exists.out new file mode 100644 index 00000000000..c31a5f06828 --- /dev/null +++ b/gas/testsuite/gasp/mri/exists.out @@ -0,0 +1,24 @@ +!exists macro arg1,arg2 +! ifne ==arg2 +! move arg1,arg2 +! elsec +! push arg1 +! endc +! endm +! + +! exists foo,bar +! ifne -1 +! move foo,bar + move foo,bar +! elsec +! push foo +! endc +! exists foo +! ifne 0 +! move foo, +! elsec +! push foo + push foo +! endc +! \ No newline at end of file diff --git a/gas/testsuite/gasp/mri/irp.asm b/gas/testsuite/gasp/mri/irp.asm new file mode 100644 index 00000000000..cda21d9ed3b --- /dev/null +++ b/gas/testsuite/gasp/mri/irp.asm @@ -0,0 +1,4 @@ + irp param,arg1,arg2,arg3 + dc.l param + endr + end quit diff --git a/gas/testsuite/gasp/mri/irp.out b/gas/testsuite/gasp/mri/irp.out new file mode 100644 index 00000000000..1875a1463d5 --- /dev/null +++ b/gas/testsuite/gasp/mri/irp.out @@ -0,0 +1,8 @@ +! irp param,arg1,arg2,arg3 +! dc.l param +! endr + dc.l arg1 + dc.l arg2 + dc.l arg3 +! end quit + end quit diff --git a/gas/testsuite/gasp/mri/irpc.asm b/gas/testsuite/gasp/mri/irpc.asm new file mode 100644 index 00000000000..a51d6878919 --- /dev/null +++ b/gas/testsuite/gasp/mri/irpc.asm @@ -0,0 +1,3 @@ + irpc dummy,1234 + dc.l dummy + endr diff --git a/gas/testsuite/gasp/mri/irpc.out b/gas/testsuite/gasp/mri/irpc.out new file mode 100644 index 00000000000..9a2b58179dc --- /dev/null +++ b/gas/testsuite/gasp/mri/irpc.out @@ -0,0 +1,8 @@ +! irpc dummy,1234 +! dc.l dummy +! endr + dc.l 1 + dc.l 2 + dc.l 3 + dc.l 4 +! \ No newline at end of file diff --git a/gas/testsuite/gasp/mri/macro.asm b/gas/testsuite/gasp/mri/macro.asm new file mode 100644 index 00000000000..b711bd0b412 --- /dev/null +++ b/gas/testsuite/gasp/mri/macro.asm @@ -0,0 +1,8 @@ +get macro arg1,arg2,arg3 + dc.l arg1 + arg2 +arg3 dc.l \4 + move.\0 d0,d1 + endm + + get.b 1,,label,four diff --git a/gas/testsuite/gasp/mri/macro.out b/gas/testsuite/gasp/mri/macro.out new file mode 100644 index 00000000000..1ee5e18e1d7 --- /dev/null +++ b/gas/testsuite/gasp/mri/macro.out @@ -0,0 +1,18 @@ +!get macro arg1,arg2,arg3 +! dc.l arg1 +! arg2 +!arg3 dc.l \4 +! move.\0 d0,d1 +! endm +! + +! get.b 1,,label,four +! dc.l 1 + dc.l 1 +! dc.l 2 + dc.l 2 +!label dc.l four +label: dc.l four +! move.b d0,d1 + move.b d0,d1 +! \ No newline at end of file diff --git a/gas/testsuite/gasp/mri/narg.asm b/gas/testsuite/gasp/mri/narg.asm new file mode 100644 index 00000000000..114c94032e9 --- /dev/null +++ b/gas/testsuite/gasp/mri/narg.asm @@ -0,0 +1,9 @@ +loop macro arg1,arg2,arg3 + dc.l NARG + ifne NARG + dc.l arg1 + loop arg2,arg3 + endc + endm + + loop 1,2,3 diff --git a/gas/testsuite/gasp/mri/narg.out b/gas/testsuite/gasp/mri/narg.out new file mode 100644 index 00000000000..c960d798019 --- /dev/null +++ b/gas/testsuite/gasp/mri/narg.out @@ -0,0 +1,38 @@ +!loop macro arg1,arg2,arg3 +! dc.l NARG +! ifne NARG +! dc.l arg1 +! loop arg2,arg3 +! endc +! endm +! + +! loop 1,2,3 +! dc.l 3 + dc.l 3 +! ifne 3 +! dc.l 1 + dc.l 1 +! loop 2,3 +! dc.l 2 + dc.l 2 +! ifne 2 +! dc.l 2 + dc.l 2 +! loop 3, +! dc.l 1 + dc.l 1 +! ifne 1 +! dc.l 3 + dc.l 3 +! loop , +! dc.l 0 + dc.l 0 +! ifne 0 +! dc.l +! loop , +! endc +! endc +! endc +! endc +! \ No newline at end of file diff --git a/gas/testsuite/gasp/mri/rept.asm b/gas/testsuite/gasp/mri/rept.asm new file mode 100644 index 00000000000..d563bb217a7 --- /dev/null +++ b/gas/testsuite/gasp/mri/rept.asm @@ -0,0 +1,3 @@ + rept 3 + dc.l 1 + endr diff --git a/gas/testsuite/gasp/mri/rept.out b/gas/testsuite/gasp/mri/rept.out new file mode 100644 index 00000000000..ce2f5fcde7f --- /dev/null +++ b/gas/testsuite/gasp/mri/rept.out @@ -0,0 +1,16 @@ +! rept 3 +! dc.l 1 +! endr +! dc.l 1 + dc.l 1 +! REPT 2 +! dc.l 1 +! ENDR +! dc.l 1 + dc.l 1 +! REPT 1 +! dc.l 1 +! ENDR +! dc.l 1 + dc.l 1 +! \ No newline at end of file