From 1f17971deec38c40028180bf6ddee1a2f0d76a61 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Fri, 30 Aug 1996 06:40:44 +0000 Subject: [PATCH] * gas/v850/hilo.s: New testfile. * gas/v850/basic.exp: Run hilo tests. --- gas/testsuite/ChangeLog | 7 +++++++ gas/testsuite/gas/v850/.Sanitize | 1 + gas/testsuite/gas/v850/basic.exp | 33 +++++++++++++++++++++++++++++++- gas/testsuite/gas/v850/hilo.s | 5 +++++ 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 gas/testsuite/gas/v850/hilo.s diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 183a8c6e476..2cde84d72e0 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -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 * gas/arm/arm7t.d: Explicitly force little-endian assembly. diff --git a/gas/testsuite/gas/v850/.Sanitize b/gas/testsuite/gas/v850/.Sanitize index 4d15c258324..17b7e661db4 100644 --- a/gas/testsuite/gas/v850/.Sanitize +++ b/gas/testsuite/gas/v850/.Sanitize @@ -30,6 +30,7 @@ basic.exp bit.s branch.s compare.s +hilo.s jumps.s logical.s mem.s diff --git a/gas/testsuite/gas/v850/basic.exp b/gas/testsuite/gas/v850/basic.exp index d2ff9839be1..9078f4bd6b5 100755 --- a/gas/testsuite/gas/v850/basic.exp +++ b/gas/testsuite/gas/v850/basic.exp @@ -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 index 00000000000..5067e56de52 --- /dev/null +++ b/gas/testsuite/gas/v850/hilo.s @@ -0,0 +1,5 @@ + + .text + movea lo(0xdeadbeef),r0,r1 + movhi hi(0xdeadbeef),r1,r1 + movhi hi0(0xdeadbeef),r1,r1 -- 2.30.2