From f5cf5e17bfbdc3a7224fbbfcfa27de640bad836d Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 15 Aug 1995 19:44:20 +0000 Subject: [PATCH] * 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. --- gas/testsuite/ChangeLog | 8 ++++++++ gas/testsuite/gas/mri/.Sanitize | 8 ++++++++ gas/testsuite/gas/mri/for.d | 29 +++++++++++++++++++++++++++++ gas/testsuite/gas/mri/for.s | 21 +++++++++++++++++++++ gas/testsuite/gas/mri/if.d | 25 +++++++++++++++++++++++++ gas/testsuite/gas/mri/if.s | 17 +++++++++++++++++ gas/testsuite/gas/mri/repeat.d | 15 +++++++++++++++ gas/testsuite/gas/mri/repeat.s | 13 +++++++++++++ gas/testsuite/gas/mri/while.d | 17 +++++++++++++++++ gas/testsuite/gas/mri/while.s | 13 +++++++++++++ 10 files changed, 166 insertions(+) create mode 100644 gas/testsuite/gas/mri/for.d create mode 100644 gas/testsuite/gas/mri/for.s create mode 100644 gas/testsuite/gas/mri/if.d create mode 100644 gas/testsuite/gas/mri/if.s create mode 100644 gas/testsuite/gas/mri/repeat.d create mode 100644 gas/testsuite/gas/mri/repeat.s create mode 100644 gas/testsuite/gas/mri/while.d create mode 100644 gas/testsuite/gas/mri/while.s diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index be707d594a4..a823f60bf48 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,11 @@ +Tue Aug 15 15:42:33 1995 Ian Lance Taylor + + * 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 * gas/mri/expr.d: Permit leading zeroes, in case we're using a diff --git a/gas/testsuite/gas/mri/.Sanitize b/gas/testsuite/gas/mri/.Sanitize index 19e47f912eb..c22b178201e 100644 --- a/gas/testsuite/gas/mri/.Sanitize +++ b/gas/testsuite/gas/mri/.Sanitize @@ -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 index 00000000000..6b5946c7cd1 --- /dev/null +++ b/gas/testsuite/gas/mri/for.d @@ -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 clrw %d1 +0+002 movew #1,%d0 +0+006 cmpiw #10,%d0 +0+00a blts 0+016 +0+00c addw %d0,%d1 +0+00e bvcs 0+012 +0+010 bras 0+016 +0+012 addqw #2,%d0 +0+014 bras 0+006 +0+016 clrw %d1 +0+018 movew #10,%d0 +0+01c cmpiw #1,%d0 +0+020 bgts 0+030 +0+022 cmpiw #100,%d1 +0+026 bgts 0+02a +0+028 bras 0+02c +0+02a addw %d0,%d1 +0+02c subqw #1,%d0 +0+02e bras 0+01c +0+030 nop diff --git a/gas/testsuite/gas/mri/for.s b/gas/testsuite/gas/mri/for.s new file mode 100644 index 00000000000..f65a398190e --- /dev/null +++ b/gas/testsuite/gas/mri/for.s @@ -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 then + break + endi + endf + + clr d1 + for d0 = #10 downto #1 do + if d1 #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 index 00000000000..0ec44f3503d --- /dev/null +++ b/gas/testsuite/gas/mri/if.d @@ -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 cmpw %d1,%d0 +0+002 bles 0+014 +0+004 cmpw %d2,%d0 +0+006 bles 0+014 +0+008 cmpw %d1,%d2 +0+00a bles 0+010 +0+00c movew %d1,%d3 +0+00e bras 0+012 +0+010 movew %d2,%d3 +0+012 bras 0+01e +0+014 cmpw %d0,%d1 +0+016 bgts 0+01c +0+018 cmpw %d0,%d2 +0+01a bles 0+01e +0+01c movew %d0,%d3 +0+01e nop diff --git a/gas/testsuite/gas/mri/if.s b/gas/testsuite/gas/mri/if.s new file mode 100644 index 00000000000..2646be8ab12 --- /dev/null +++ b/gas/testsuite/gas/mri/if.s @@ -0,0 +1,17 @@ +; Test MRI structured if pseudo-op. + + xdef foo +foo + if d1 d0 and d2 d0 then + if d1 d2 then + move d1,d3 + else + move d2,d3 + endi + else + if d0 d1 or d0 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 index 00000000000..7c8eca616fb --- /dev/null +++ b/gas/testsuite/gas/mri/repeat.d @@ -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 bccs 0+000 +0+002 clrw %d1 +0+004 addqw #1,%d1 +0+006 cmpiw #10,%d1 +0+00a bgts 0+004 +0+00c nop diff --git a/gas/testsuite/gas/mri/repeat.s b/gas/testsuite/gas/mri/repeat.s new file mode 100644 index 00000000000..8905e1c8cce --- /dev/null +++ b/gas/testsuite/gas/mri/repeat.s @@ -0,0 +1,13 @@ +; Test MRI structured repeat pseudo-op. + + xdef foo +foo + repeat + until + + clr d1 + repeat + add #1,d1 + until d1 #10 + + nop diff --git a/gas/testsuite/gas/mri/while.d b/gas/testsuite/gas/mri/while.d new file mode 100644 index 00000000000..fae14f161b5 --- /dev/null +++ b/gas/testsuite/gas/mri/while.d @@ -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 bccs 0+004 +0+002 bras 0+000 +0+004 clrw %d1 +0+006 cmpiw #10,%d1 +0+00a blts 0+010 +0+00c addqw #1,%d1 +0+00e bras 0+006 +0+010 nop diff --git a/gas/testsuite/gas/mri/while.s b/gas/testsuite/gas/mri/while.s new file mode 100644 index 00000000000..2236a50d3c1 --- /dev/null +++ b/gas/testsuite/gas/mri/while.s @@ -0,0 +1,13 @@ +; Test MRI structured while pseudo-op. + + xdef foo +foo + while do + endw + + clr d1 + while d1 #10 do + add #1,d1 + endw + + nop -- 2.30.2