Add copyright notices
[deliverable/binutils-gdb.git] / gas / testsuite / gas / h8300 / h8300.exp
index 013c55c8b55956d5f10ad5673d33ab25631e641e..10434b43debd88db6634e66d82c69d48d325f00c 100644 (file)
@@ -1,3 +1,20 @@
+# Copyright 2012
+# 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 3 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  
+
 #
 # Some H8/300 tests
 #
@@ -2070,6 +2087,13 @@ proc do_h8300s_multiple {} {
            -re " +\[0-9\]+ 000c 01106DF0\[^\n\]*\n"   { set x [expr $x+1] }
            -re " +\[0-9\]+ 0010 01206DF0\[^\n\]*\n"   { set x [expr $x+1] }
            -re " +\[0-9\]+ 0014 01306DF0\[^\n\]*\n"   { set x [expr $x+1] }
+            -re " +\[0-9\]+ 0018 01106D73\[^\n\]*\n"   { set x [expr $x+1] }
+            -re " +\[0-9\]+ 001c 01106DF2\[^\n\]*\n"   { set x [expr $x+1] }
+            -re " +\[0-9\]+ 0020 01106D75\[^\n\]*\n"   { set x [expr $x+1] }
+            -re " +\[0-9\]+ 0024 01206D76\[^\n\]*\n"   { set x [expr $x+1] }
+            -re " +\[0-9\]+ 0028 01106DF4\[^\n\]*\n"   { set x [expr $x+1] }
+            -re " +\[0-9\]+ 002c 01206DF4\[^\n\]*\n"   { set x [expr $x+1] }
+
            eof                                 { break }
        }
     }
@@ -2079,7 +2103,7 @@ proc do_h8300s_multiple {} {
     gas_finish
 
     # Did we find what we were looking for?  If not, flunk it.
-    if [expr $x == 6] then { pass $testname } else { fail $testname }
+    if [expr $x == 12] then { pass $testname } else { fail $testname }
 }
 
 proc do_h8300h_mov32bug {} {
@@ -2091,7 +2115,7 @@ proc do_h8300h_mov32bug {} {
 
        while 1 {
            expect {
-               -re "00000002\[^\n\]*32\[^\n\]*_a.0x0*88ca6c00\[^\n\]*\n"
+               -re "00000002\[^\n\]*32\[^\n\]*_a-0x77359400\[^\n\]*\n"
                                                { set x [expr $x+1] }
                timeout                         { perror "timeout\n; break }
                eof                             { break }
@@ -2107,16 +2131,75 @@ proc do_h8300h_mov32bug {} {
     if [expr $x == 1] then { pass $testname } else { fail $testname }
 }
 
+proc do_h8300hn_addressgen {} {
+    set testname "symaddgen.s: h8300hn symbol address generation"
+    set x 0
+
+    gas_start "symaddgen.s" "-al"
+
+    # Check each instruction bit pattern to verify it got
+    # assembled correctly.
+    while 1 {
+       expect {
+           -re " +\[0-9\]+ .* 01006DF6\[^\n\]*\n"   { set x [expr $x+1] }
+           -re " +\[0-9\]+ .* 0D76\[^\n\]*\n"       { set x [expr $x+1] }
+           -re " +\[0-9\]+ .* 790207D0\[^\n\]*\n"   { set x [expr $x+1] }
+           -re " +\[0-9\]+ .* 6B82F020\[^\n\]*\n"   { set x [expr $x+1] }
+           -re " +\[0-9\]+ .* 79022710\[^\n\]*\n"   { set x [expr $x+1] }
+           -re " +\[0-9\]+ .* 6B820000\[^\n\]*\n"   { set x [expr $x+1] }
+           -re " +\[0-9\]+ .* 01006D76\[^\n\]*\n"   { set x [expr $x+1] }
+           -re " +\[0-9\]+ .* 5470\[^\n\]*\n"       { set x [expr $x+1] }
+            
+           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 == 8] then { pass $testname } else { fail $testname }
+}
+
+proc do_h8300_addsubrxcheck {} {
+    set testname "addsubrxcheck.s: h8300 check rx generation for adds subs instructions"
+    set x 0
+
+    gas_start "addsubrxcheck.s" "-al"
+
+    # Check each instruction bit pattern to verify it got
+    # assembled correctly.
+    while 1 {
+       expect {
+           -re " +\[0-9\]+ .* 6DF6\[^\n\]*\n"       { set x [expr $x+1] }
+           -re " +\[0-9\]+ .* 0D76\[^\n\]*\n"       { set x [expr $x+1] }
+           -re " +\[0-9\]+ .* 1B87\[^\n\]*\n"       { set x [expr $x+1] }
+           -re " +\[0-9\]+ .* 6F62FFFE\[^\n\]*\n"   { set x [expr $x+1] }
+           -re " +\[0-9\]+ .* 1B82\[^\n\]*\n"       { set x [expr $x+1] }
+           -re " +\[0-9\]+ .* 6FE2FFFE\[^\n\]*\n"   { set x [expr $x+1] }
+           -re " +\[0-9\]+ .* 1922\[^\n\]*\n"       { set x [expr $x+1] }
+           -re " +\[0-9\]+ .* 0D20\[^\n\]*\n"       { set x [expr $x+1] }
+           -re " +\[0-9\]+ .* 0B87\[^\n\]*\n"       { set x [expr $x+1] }
+           -re " +\[0-9\]+ .* 6D76\[^\n\]*\n"       { set x [expr $x+1] }
+           -re " +\[0-9\]+ .* 5470\[^\n\]*\n"       { set x [expr $x+1] }
+
+           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 == 11] then { pass $testname } else { fail $testname }
+}
+
 if [istarget h8300*-*-*] then {
     # Test the basic h8300 instruction parser
     do_h8300_add_sub
     do_h8300_logical
-    do_h8300_cbranch
     do_h8300_bitops1
     do_h8300_bitops2
     do_h8300_bitops3
     do_h8300_bitops4
-    do_h8300_branch
     do_h8300_compare
     do_h8300_decimal
     do_h8300_incdec
@@ -2126,16 +2209,17 @@ if [istarget h8300*-*-*] then {
     do_h8300_movw
     do_h8300_pushpop
     do_h8300_rotate_shift
+    do_h8300hn_addressgen
+
+    do_h8300_addsubrxcheck
 
     # Now test the h8300h instruction parser
     do_h8300h_add_sub
     do_h8300h_logical
-    do_h8300h_cbranch
     do_h8300h_bitops1
     do_h8300h_bitops2
     do_h8300h_bitops3
     do_h8300h_bitops4
-    do_h8300h_branch
     do_h8300h_compare
     do_h8300h_decimal
     do_h8300h_incdec
@@ -2151,12 +2235,10 @@ if [istarget h8300*-*-*] then {
     # Now test the h8300s instruction parser
     do_h8300s_add_sub
     do_h8300s_logical
-    do_h8300s_cbranch
     do_h8300s_bitops1
     do_h8300s_bitops2
     do_h8300s_bitops3
     do_h8300s_bitops4
-    do_h8300s_branch
     do_h8300s_compare
     do_h8300s_decimal
     do_h8300s_incdec
@@ -2178,6 +2260,7 @@ if [istarget h8300*-*-*] then {
     set empic [expr [istarget *-*-ecoff*] || [istarget *-*-ultrix*] || [istarget *-*-irix\[1-4\]*] ]
     set aout [expr [istarget *-*-bsd*] || [istarget *-*-netbsd*]]
 
-    run_dump_test "ffxx1"
     gas_test "cmpsi2.s" "" "" "cmpsi2.s"
+
+    run_dump_test "pr3134"
 }
This page took 0.025581 seconds and 4 git commands to generate.