summaryrefslogtreecommitdiff
path: root/gas/testsuite/gas/mn10300
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2004-01-16 03:16:07 +0000
committerAlexandre Oliva <aoliva@redhat.com>2004-01-16 03:16:07 +0000
commitcadf8c417205c1df9f18d20ffdc7cc8924609b98 (patch)
tree12d9c730a8e2010870ebc95add4029b09b5986a4 /gas/testsuite/gas/mn10300
parent49fe99abbc97b660bacae50791ce380b9737bbd5 (diff)
downloadbinutils-redhat-cadf8c417205c1df9f18d20ffdc7cc8924609b98.tar.gz
* gas/mn10300/mov5.s: New.
* gas/mn10300/basic.exp (do_mov5): New.
Diffstat (limited to 'gas/testsuite/gas/mn10300')
-rw-r--r--gas/testsuite/gas/mn10300/basic.exp37
-rw-r--r--gas/testsuite/gas/mn10300/mov5.s7
2 files changed, 43 insertions, 1 deletions
diff --git a/gas/testsuite/gas/mn10300/basic.exp b/gas/testsuite/gas/mn10300/basic.exp
index 519cb92df8..46c23d480f 100644
--- a/gas/testsuite/gas/mn10300/basic.exp
+++ b/gas/testsuite/gas/mn10300/basic.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1996, 2000, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2000, 2002, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -499,6 +499,40 @@ proc do_mov4 {} {
if [expr $x==16] then { pass $testname } else { fail $testname }
}
+proc do_mov5 {} {
+ set testname "mov5.s: mov5 tests"
+ set x 0
+
+ gas_start "mov5.s" "-al"
+
+ # Instead of having a variable for each match string just increment the
+ # total number of matches seen. That's simpler when testing large numbers
+ # of instructions (as these tests to).
+ while 1 {
+ expect {
+ -re "^ +\[0-9\]+ 0000 FBF80008\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0004 FDF80000\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +4 +0100\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 000a FDF800FF\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +5 +FF7F\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0010 FEF80080\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +6 +FFFFFF\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0017 FEF80000\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +7 +0080FF\[^\n\]*\n" { set x [expr $x+1] }
+ -re "\[^\n\]*\n" { }
+ timeout { perror "timeout\n"; break }
+ eof { break }
+ }
+ }
+
+ # This was intended to do any cleanup necessary. It kinda looks like it
+ # isn't needed, but just in case, please keep it in for now.
+ gas_finish
+
+ # Did we find what we were looking for? If not, flunk it.
+ if [expr $x==9] then { pass $testname } else { fail $testname }
+}
+
proc do_movbu {} {
set testname "movbu.s: movbu tests"
set x 0
@@ -1762,6 +1796,7 @@ if [istarget mn10300*-*-*] then {
do_mov2
do_mov3
do_mov4
+ do_mov5
do_movbu
do_movhu
do_movm
diff --git a/gas/testsuite/gas/mn10300/mov5.s b/gas/testsuite/gas/mn10300/mov5.s
new file mode 100644
index 0000000000..c3551ff69e
--- /dev/null
+++ b/gas/testsuite/gas/mn10300/mov5.s
@@ -0,0 +1,7 @@
+ .am33
+ .text
+ mov 8,sp
+ mov 256,sp
+ mov +((1<<23)-1),sp
+ mov -128,sp
+ mov +((-1)<<23),sp