* gasp/mri/*: New tests.
authorIan Lance Taylor <ian@airs.com>
Mon, 14 Aug 1995 20:06:03 +0000 (20:06 +0000)
committerIan Lance Taylor <ian@airs.com>
Mon, 14 Aug 1995 20:06:03 +0000 (20:06 +0000)
* gasp/gasp.exp: Run them.  Also, clean up the test names used in
pass and fail.

18 files changed:
gas/testsuite/ChangeLog
gas/testsuite/gasp/.Sanitize
gas/testsuite/gasp/gasp.exp
gas/testsuite/gasp/mri/.Sanitize [new file with mode: 0644]
gas/testsuite/gasp/mri/embed.asm [new file with mode: 0644]
gas/testsuite/gasp/mri/embed.out [new file with mode: 0644]
gas/testsuite/gasp/mri/exists.asm [new file with mode: 0644]
gas/testsuite/gasp/mri/exists.out [new file with mode: 0644]
gas/testsuite/gasp/mri/irp.asm [new file with mode: 0644]
gas/testsuite/gasp/mri/irp.out [new file with mode: 0644]
gas/testsuite/gasp/mri/irpc.asm [new file with mode: 0644]
gas/testsuite/gasp/mri/irpc.out [new file with mode: 0644]
gas/testsuite/gasp/mri/macro.asm [new file with mode: 0644]
gas/testsuite/gasp/mri/macro.out [new file with mode: 0644]
gas/testsuite/gasp/mri/narg.asm [new file with mode: 0644]
gas/testsuite/gasp/mri/narg.out [new file with mode: 0644]
gas/testsuite/gasp/mri/rept.asm [new file with mode: 0644]
gas/testsuite/gasp/mri/rept.out [new file with mode: 0644]

index 2f7b234..73d4d1b 100644 (file)
@@ -1,3 +1,9 @@
+Mon Aug 14 16:03:07 1995  Ian Lance Taylor  <ian@cygnus.com>
+
+       * 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)
 
index c736c9f..974c301 100644 (file)
@@ -61,6 +61,7 @@ macro.out
 mdouble.asm
 mdouble.err
 mdouble.out
+mri
 pl1.asm
 pl1.err
 pl1.out
index ec0672e..f64abec 100644 (file)
@@ -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 (file)
index 0000000..69f5781
--- /dev/null
@@ -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 (file)
index 0000000..f1b8f78
--- /dev/null
@@ -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 (file)
index 0000000..0235afc
--- /dev/null
@@ -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 (file)
index 0000000..87220c6
--- /dev/null
@@ -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 (file)
index 0000000..c31a5f0
--- /dev/null
@@ -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 (file)
index 0000000..cda21d9
--- /dev/null
@@ -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 (file)
index 0000000..1875a14
--- /dev/null
@@ -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 (file)
index 0000000..a51d687
--- /dev/null
@@ -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 (file)
index 0000000..9a2b581
--- /dev/null
@@ -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 (file)
index 0000000..b711bd0
--- /dev/null
@@ -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,<dc.l 2>,label,four
diff --git a/gas/testsuite/gasp/mri/macro.out b/gas/testsuite/gasp/mri/macro.out
new file mode 100644 (file)
index 0000000..1ee5e18
--- /dev/null
@@ -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,<dc.l 2>,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 (file)
index 0000000..114c940
--- /dev/null
@@ -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 (file)
index 0000000..c960d79
--- /dev/null
@@ -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 (file)
index 0000000..d563bb2
--- /dev/null
@@ -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 (file)
index 0000000..ce2f5fc
--- /dev/null
@@ -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