Fix PR number in previous delta.
[platform/upstream/binutils.git] / gas / testsuite / gas / mn10300 / basic.exp
old mode 100755 (executable)
new mode 100644 (file)
index a306583..f84022d
@@ -1,8 +1,9 @@
-# Copyright (C) 1996 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2000, 2002, 2004, 2005, 2007
+# 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
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 # 
 # This program is distributed in the hope that it will be useful,
 # 
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 # Please email any bugs, comments, and/or additions to this file to:
-# DejaGnu@cygnus.com
+# dejagnu@gnu.org
 
 # Written by Cygnus Support.
 
@@ -499,6 +500,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
@@ -960,7 +995,6 @@ proc do_udf {} {
     if [expr $x==160] then { pass $testname } else { fail $testname }
 }
 
-# start-sanitize-cygnus
 proc do_am33_1 {} {
     set testname "am33.s: am33 tests part 1"
     set x 0
@@ -1419,6 +1453,30 @@ proc do_am33_5 {} {
            -re "^ +52 +FDFE7F\[^\n\]*\n"               { set x [expr $x+1] }
            -re "^ +\[0-9\]+ 0158 FEFA12FC\[^\n\]*\n"   { set x [expr $x+1] }
            -re "^ +53 +FDFE7F\[^\n\]*\n"               { set x [expr $x+1] }
+           -re "^ +\[0-9\]+ 015f FE8A20F0\[^\n\]*\n"   { set x [expr $x+1] }
+           -re "^ +54 +FFFFFF\[^\n\]*\n"               { set x [expr $x+1] }
+           -re "^ +\[0-9\]+ 0166 FE9A20F0\[^\n\]*\n"   { set x [expr $x+1] }
+           -re "^ +55 +FFFFFF\[^\n\]*\n"               { set x [expr $x+1] }
+           -re "^ +\[0-9\]+ 016d FEAA20F0\[^\n\]*\n"   { set x [expr $x+1] }
+           -re "^ +56 +FFFFFF\[^\n\]*\n"               { set x [expr $x+1] }
+           -re "^ +\[0-9\]+ 0174 FEBA20F0\[^\n\]*\n"   { set x [expr $x+1] }
+           -re "^ +57 +FFFFFF\[^\n\]*\n"               { set x [expr $x+1] }
+           -re "^ +\[0-9\]+ 017b FECA20F0\[^\n\]*\n"   { set x [expr $x+1] }
+           -re "^ +58 +FFFFFF\[^\n\]*\n"               { set x [expr $x+1] }
+           -re "^ +\[0-9\]+ 0182 FEDA20F0\[^\n\]*\n"   { set x [expr $x+1] }
+           -re "^ +59 +FFFFFF\[^\n\]*\n"               { set x [expr $x+1] }
+           -re "^ +\[0-9\]+ 0189 FE8A2000\[^\n\]*\n"   { set x [expr $x+1] }
+           -re "^ +60 +FCFFFF\[^\n\]*\n"               { set x [expr $x+1] }
+           -re "^ +\[0-9\]+ 0190 FE9A2000\[^\n\]*\n"   { set x [expr $x+1] }
+           -re "^ +61 +FCFFFF\[^\n\]*\n"               { set x [expr $x+1] }
+           -re "^ +\[0-9\]+ 0197 FEAA2000\[^\n\]*\n"   { set x [expr $x+1] }
+           -re "^ +62 +FCFFFF\[^\n\]*\n"               { set x [expr $x+1] }
+           -re "^ +\[0-9\]+ 019e FEBA2000\[^\n\]*\n"   { set x [expr $x+1] }
+           -re "^ +63 +FCFFFF\[^\n\]*\n"               { set x [expr $x+1] }
+           -re "^ +\[0-9\]+ 01a5 FECA2000\[^\n\]*\n"   { set x [expr $x+1] }
+           -re "^ +64 +FCFFFF\[^\n\]*\n"               { set x [expr $x+1] }
+           -re "^ +\[0-9\]+ 01ac FEDA2000\[^\n\]*\n"   { set x [expr $x+1] }
+           -re "^ +65 +FCFFFF\[^\n\]*\n"               { set x [expr $x+1] }
            -re "\[^\n\]*\n"                            { }
            timeout                             { perror "timeout\n"; break }
            eof                                 { break }
@@ -1430,7 +1488,7 @@ proc do_am33_5 {} {
     gas_finish
 
     # Did we find what we were looking for?  If not, flunk it.
-    if [expr $x==100] then { pass $testname } else { fail $testname }
+    if [expr $x==124] then { pass $testname } else { fail $testname }
 }
 
 proc do_am33_6 {} {
@@ -1711,8 +1769,6 @@ proc do_am33_8 {} {
     if [expr $x==67] then { pass $testname } else { fail $testname }
 }
 
-# end-sanitize-cygnus
-
 if [istarget mn10300*-*-*] then {
     # Test the basic instruction parser.
     do_add
@@ -1727,6 +1783,7 @@ if [istarget mn10300*-*-*] then {
     do_mov2
     do_mov3
     do_mov4
+    do_mov5
     do_movbu
     do_movhu
     do_movm
@@ -1735,7 +1792,6 @@ if [istarget mn10300*-*-*] then {
     do_shift
     do_sub
     do_udf
-# start-sanitize-cygnus
     do_am33_1
     do_am33_2
     do_am33_3
@@ -1744,5 +1800,11 @@ if [istarget mn10300*-*-*] then {
     do_am33_6
     do_am33_7
     do_am33_8
-# end-sanitize-cygnus
+
+    run_list_test "movpc" ""
+    run_list_test "pr997" "-a" 
+
+    run_dump_test "am33-2"
+    run_dump_test "relax"
+    run_dump_test "pr11973"
 }