* gas/mri/for.d, gas/mri/for.s: New test.
authorIan Lance Taylor <ian@airs.com>
Tue, 15 Aug 1995 19:44:20 +0000 (19:44 +0000)
committerIan Lance Taylor <ian@airs.com>
Tue, 15 Aug 1995 19:44:20 +0000 (19:44 +0000)
* gas/mri/if.d, gas/mri/if.s: New test.
* gas/mri/repeat.d, gas/mri/repeat.s: New test.
* gas/mri/while.d, gas/mri/while.s: New test.
* gas/mri/mri.exp: Run the new tests.

gas/testsuite/ChangeLog
gas/testsuite/gas/mri/.Sanitize
gas/testsuite/gas/mri/for.d [new file with mode: 0644]
gas/testsuite/gas/mri/for.s [new file with mode: 0644]
gas/testsuite/gas/mri/if.d [new file with mode: 0644]
gas/testsuite/gas/mri/if.s [new file with mode: 0644]
gas/testsuite/gas/mri/repeat.d [new file with mode: 0644]
gas/testsuite/gas/mri/repeat.s [new file with mode: 0644]
gas/testsuite/gas/mri/while.d [new file with mode: 0644]
gas/testsuite/gas/mri/while.s [new file with mode: 0644]

index be707d5..a823f60 100644 (file)
@@ -1,3 +1,11 @@
+Tue Aug 15 15:42:33 1995  Ian Lance Taylor  <ian@cygnus.com>
+
+       * gas/mri/for.d, gas/mri/for.s: New test.
+       * gas/mri/if.d, gas/mri/if.s: New test.
+       * gas/mri/repeat.d, gas/mri/repeat.s: New test.
+       * gas/mri/while.d, gas/mri/while.s: New test.
+       * gas/mri/mri.exp: Run the new tests.
+
 Mon Aug 14 16:03:07 1995  Ian Lance Taylor  <ian@cygnus.com>
 
        * gas/mri/expr.d: Permit leading zeroes, in case we're using a
index 19e47f9..c22b178 100644 (file)
@@ -36,9 +36,17 @@ expr.d
 expr.s
 float.d
 float.s
+for.d
+for.s
+if.d
+if.s
 label.d
 label.s
 mri.exp
+repeat.d
+repeat.s
+while.d
+while.s
 
 Things-to-lose:
 
diff --git a/gas/testsuite/gas/mri/for.d b/gas/testsuite/gas/mri/for.d
new file mode 100644 (file)
index 0000000..6b5946c
--- /dev/null
@@ -0,0 +1,29 @@
+#objdump: -d
+#name: MRI structured for
+#as: -M
+
+# Test MRI structured for pseudo-op.
+
+.*:     file format .*
+
+Disassembly of section .text:
+0+000 <foo> clrw %d1
+0+002 <foo\+2> movew #1,%d0
+0+006 <foo\+6> cmpiw #10,%d0
+0+00a <foo\+a> blts 0+016 <foo\+16>
+0+00c <foo\+c> addw %d0,%d1
+0+00e <foo\+e> bvcs 0+012 <foo\+12>
+0+010 <foo\+10> bras 0+016 <foo\+16>
+0+012 <foo\+12> addqw #2,%d0
+0+014 <foo\+14> bras 0+006 <foo\+6>
+0+016 <foo\+16> clrw %d1
+0+018 <foo\+18> movew #10,%d0
+0+01c <foo\+1c> cmpiw #1,%d0
+0+020 <foo\+20> bgts 0+030 <foo\+30>
+0+022 <foo\+22> cmpiw #100,%d1
+0+026 <foo\+26> bgts 0+02a <foo\+2a>
+0+028 <foo\+28> bras 0+02c <foo\+2c>
+0+02a <foo\+2a> addw %d0,%d1
+0+02c <foo\+2c> subqw #1,%d0
+0+02e <foo\+2e> bras 0+01c <foo\+1c>
+0+030 <foo\+30> nop
diff --git a/gas/testsuite/gas/mri/for.s b/gas/testsuite/gas/mri/for.s
new file mode 100644 (file)
index 0000000..f65a398
--- /dev/null
@@ -0,0 +1,21 @@
+; Test MRI structured for pseudo-op.
+
+       xdef    foo
+foo
+       clr d1
+       for d0 = #1 to #10 by #2 do
+         add d0,d1
+         if <vs> then
+           break
+         endi
+       endf
+
+       clr d1
+       for d0 = #10 downto #1 do
+         if d1 <ge> #100 then
+           next
+         endi
+         add d0,d1
+       endf
+
+       nop
diff --git a/gas/testsuite/gas/mri/if.d b/gas/testsuite/gas/mri/if.d
new file mode 100644 (file)
index 0000000..0ec44f3
--- /dev/null
@@ -0,0 +1,25 @@
+#objdump: -d
+#name: MRI structured if
+#as: -M
+
+# Test MRI structured if pseudo-op.
+
+.*:     file format .*
+
+Disassembly of section .text:
+0+000 <foo> cmpw %d1,%d0
+0+002 <foo\+2> bles 0+014 <foo\+14>
+0+004 <foo\+4> cmpw %d2,%d0
+0+006 <foo\+6> bles 0+014 <foo\+14>
+0+008 <foo\+8> cmpw %d1,%d2
+0+00a <foo\+a> bles 0+010 <foo\+10>
+0+00c <foo\+c> movew %d1,%d3
+0+00e <foo\+e> bras 0+012 <foo\+12>
+0+010 <foo\+10> movew %d2,%d3
+0+012 <foo\+12> bras 0+01e <foo\+1e>
+0+014 <foo\+14> cmpw %d0,%d1
+0+016 <foo\+16> bgts 0+01c <foo\+1c>
+0+018 <foo\+18> cmpw %d0,%d2
+0+01a <foo\+1a> bles 0+01e <foo\+1e>
+0+01c <foo\+1c> movew %d0,%d3
+0+01e <foo\+1e> nop
diff --git a/gas/testsuite/gas/mri/if.s b/gas/testsuite/gas/mri/if.s
new file mode 100644 (file)
index 0000000..2646be8
--- /dev/null
@@ -0,0 +1,17 @@
+; Test MRI structured if pseudo-op.
+
+       xdef    foo
+foo
+       if d1 <gt> d0 and d2 <gt> d0 then
+         if d1 <gt> d2 then
+           move d1,d3
+         else
+           move d2,d3
+         endi
+       else
+         if d0 <gt> d1 or d0 <gt> d2 then
+           move d0,d3
+         endi
+       endi
+
+       nop
diff --git a/gas/testsuite/gas/mri/repeat.d b/gas/testsuite/gas/mri/repeat.d
new file mode 100644 (file)
index 0000000..7c8eca6
--- /dev/null
@@ -0,0 +1,15 @@
+#objdump: -d
+#name: MRI structured repeat
+#as: -M
+
+# Test MRI structured repeat pseudo-op.
+
+.*:     file format .*
+
+Disassembly of section .text:
+0+000 <foo> bccs 0+000 <foo>
+0+002 <foo\+2> clrw %d1
+0+004 <foo\+4> addqw #1,%d1
+0+006 <foo\+6> cmpiw #10,%d1
+0+00a <foo\+a> bgts 0+004 <foo\+4>
+0+00c <foo\+c> nop
diff --git a/gas/testsuite/gas/mri/repeat.s b/gas/testsuite/gas/mri/repeat.s
new file mode 100644 (file)
index 0000000..8905e1c
--- /dev/null
@@ -0,0 +1,13 @@
+; Test MRI structured repeat pseudo-op.
+
+       xdef    foo
+foo
+       repeat
+       until   <cs>
+
+       clr d1
+       repeat
+         add #1,d1
+       until d1 <ge> #10
+
+       nop
diff --git a/gas/testsuite/gas/mri/while.d b/gas/testsuite/gas/mri/while.d
new file mode 100644 (file)
index 0000000..fae14f1
--- /dev/null
@@ -0,0 +1,17 @@
+#objdump: -d
+#name: MRI structured while
+#as: -M
+
+# Test MRI structure while pseudo-op.
+
+.*:     file format .*
+
+Disassembly of section .text:
+0+000 <foo> bccs 0+004 <foo\+4>
+0+002 <foo\+2> bras 0+000 <foo>
+0+004 <foo\+4> clrw %d1
+0+006 <foo\+6> cmpiw #10,%d1
+0+00a <foo\+a> blts 0+010 <foo\+10>
+0+00c <foo\+c> addqw #1,%d1
+0+00e <foo\+e> bras 0+006 <foo\+6>
+0+010 <foo\+10> nop
diff --git a/gas/testsuite/gas/mri/while.s b/gas/testsuite/gas/mri/while.s
new file mode 100644 (file)
index 0000000..2236a50
--- /dev/null
@@ -0,0 +1,13 @@
+; Test MRI structured while pseudo-op.
+
+       xdef    foo
+foo
+       while <cs> do
+       endw
+
+       clr d1
+       while d1 <le> #10 do
+         add #1,d1
+       endw
+
+       nop