]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* gas/v850/hilo.s: New testfile.
authorJeff Law <law@redhat.com>
Fri, 30 Aug 1996 06:40:44 +0000 (06:40 +0000)
committerJeff Law <law@redhat.com>
Fri, 30 Aug 1996 06:40:44 +0000 (06:40 +0000)
        * gas/v850/basic.exp: Run hilo tests.

gas/testsuite/ChangeLog
gas/testsuite/gas/v850/.Sanitize
gas/testsuite/gas/v850/basic.exp
gas/testsuite/gas/v850/hilo.s [new file with mode: 0644]

index 183a8c6e4762e1eab2094f222f57806257b9e9d3..2cde84d72e0d3bca406b32f460f5fc9b03329e0b 100644 (file)
@@ -1,3 +1,10 @@
+start-sanitize-v850
+Fri Aug 30 00:37:55 1996  Jeffrey A Law  (law@cygnus.com)
+
+       * gas/v850/hilo.s: New testfile.
+       * gas/v850/basic.exp: Run hilo tests.
+
+end-sanitize-v850
 Thu Aug 29 11:32:23 1996  James G. Smith  <jsmith@cygnus.co.uk>
 
        * gas/arm/arm7t.d: Explicitly force little-endian assembly.
index 4d15c258324ccdba01fe8642c198f224fd3f478d..17b7e661db42c35ce715f79b580c762fdbf6dfe8 100644 (file)
@@ -30,6 +30,7 @@ basic.exp
 bit.s
 branch.s
 compare.s
+hilo.s
 jumps.s
 logical.s
 mem.s
index d2ff9839be1cb698c1ff46f4eaaa59563cce9cb8..9078f4bd6b5836e8a464f4f41be74cbdc1c3a92a 100755 (executable)
@@ -261,7 +261,7 @@ proc do_mem {} {
            -re "^ +\[0-9\]+ 0000 05370500\[^\n\]*\n"   { set x [expr $x+1] }
            -re "^ +\[0-9\]+ 0004 25370400\[^\n\]*\n"   { set x [expr $x+1] }
            -re "^ +\[0-9\]+ 0008 25370500\[^\n\]*\n"   { set x [expr $x+1] }
-           -re "^ +\[0-9\]+ 000c\[^\n\]*\n"    { set x [expr $x+1] }
+           -re "^ +\[0-9\]+ 000c 4033\[^\n\]*\n"       { set x [expr $x+1] }
            -re "^ +\[0-9\]+ 000e\[^\n\]*\n"    { set x [expr $x+1] }
            -re "^ +\[0-9\]+ 0010\[^\n\]*\n"    { set x [expr $x+1] }
            -re "^ +\[0-9\]+ 0012 462F0500\[^\n\]*\n"   { set x [expr $x+1] }
@@ -353,6 +353,34 @@ proc do_move {} {
     if [expr $x==4] then { pass $testname } else { fail $testname }
 }
 
+proc do_hilo {} {
+    set testname "hilo.s: hilo tests"
+    set x 0
+
+    gas_start "hilo.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 200EEFBE\[^\n\]*\n"   { set x [expr $x+1] }
+           -re "^ +\[0-9\]+ 0004 410EAEDE\[^\n\]*\n"   { set x [expr $x+1] }
+           -re "^ +\[0-9\]+ 0008 410EADDE\[^\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==3] then { pass $testname } else { fail $testname }
+}
+
 if [istarget v850*-*-*] then {
     # Test the basic instruction parser.
     do_arith
@@ -364,4 +392,7 @@ if [istarget v850*-*-*] then {
     do_mem
     do_misc
     do_move
+
+    # Make sure we handle lo() hi() and hi0() correctly.
+    do_hilo
 }
diff --git a/gas/testsuite/gas/v850/hilo.s b/gas/testsuite/gas/v850/hilo.s
new file mode 100644 (file)
index 0000000..5067e56
--- /dev/null
@@ -0,0 +1,5 @@
+
+       .text
+       movea lo(0xdeadbeef),r0,r1
+       movhi hi(0xdeadbeef),r1,r1
+       movhi hi0(0xdeadbeef),r1,r1