* 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.
This commit is contained in:
Ian Lance Taylor 1995-08-15 19:44:20 +00:00
parent c842dd375d
commit f5cf5e17bf
10 changed files with 166 additions and 0 deletions

View 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

View 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:

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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