diff options
author | Doug Evans <dje@google.com> | 1998-11-03 05:03:11 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 1998-11-03 05:03:11 +0000 |
commit | e35350e414be6f99792ae9550d60f54e0b651e3a (patch) | |
tree | 23e4b600a00cf3d36b110eda334729302831d989 /gas | |
parent | 7c678e9e63c0c50f4b6b59c5481d44d6eb4f356e (diff) | |
download | gdb-e35350e414be6f99792ae9550d60f54e0b651e3a.zip gdb-e35350e414be6f99792ae9550d60f54e0b651e3a.tar.gz gdb-e35350e414be6f99792ae9550d60f54e0b651e3a.tar.bz2 |
* gas/m32r/error.exp: New error testcase driver.
* gas/m32r/wrongsize.s: New testcase.
PR 18135.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/testsuite/ChangeLog | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/m32r/.Sanitize | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/m32r/error.exp | 13 | ||||
-rw-r--r-- | gas/testsuite/gas/m32r/wrongsize.s | 10 |
4 files changed, 27 insertions, 1 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 9205753..becb4e7 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -6,6 +6,9 @@ start-sanitize-m32rx * gas/m32r/fslotx.[sd]: New testcase. * gas/m32r/m32rx.exp: Run it. * gas/m32r/m32rx.[sd]: Update. + + * gas/m32r/error.exp: New error testcase driver. + * gas/m32r/wrongsize.s: New testcase. end-sanitize-m32rx start-sanitize-r5900 diff --git a/gas/testsuite/gas/m32r/.Sanitize b/gas/testsuite/gas/m32r/.Sanitize index 6f94c1c..d288a8c 100644 --- a/gas/testsuite/gas/m32r/.Sanitize +++ b/gas/testsuite/gas/m32r/.Sanitize @@ -15,7 +15,7 @@ Do-first: -m32rx_files="fslotx.s fslotx.d m32rx.s m32rx.d m32rx.exp" +m32rx_files="fslotx.s fslotx.d m32rx.s m32rx.d m32rx.exp error.exp wrongsize.s" if ( echo $* | grep keep\-m32rx > /dev/null ) ; then keep_these_too="${m32rx_files} ${keep_these_too}" else diff --git a/gas/testsuite/gas/m32r/error.exp b/gas/testsuite/gas/m32r/error.exp new file mode 100644 index 0000000..c24c919 --- /dev/null +++ b/gas/testsuite/gas/m32r/error.exp @@ -0,0 +1,13 @@ +# Test assembler warnings and errors. + +if [istarget m32r-*-*] { + + load_lib gas-dg.exp + + dg-init + + dg-runtest "$srcdir/$subdir/wrongsize.s" "" "" + + dg-finish + +} diff --git a/gas/testsuite/gas/m32r/wrongsize.s b/gas/testsuite/gas/m32r/wrongsize.s new file mode 100644 index 0000000..088f478 --- /dev/null +++ b/gas/testsuite/gas/m32r/wrongsize.s @@ -0,0 +1,10 @@ +; Test error messages in instances where an insn of a particular size +; is required. + +; { dg-do assemble { target m32r-*-* } } + +wrongsize: + cmpi r8,#10 -> ldi r0,#8 ; { dg-error "not a 16 bit instruction" } + ldi r0,#8 -> cmpi r8,#10 ; { dg-error "not a 16 bit instruction" } + cmpi r8,#10 || ldi r0,#8 ; { dg-error "not a 16 bit instruction" } + ldi r0,#8 || cmpi r8,#10 ; { dg-error "not a 16 bit instruction" } |