diff options
-rw-r--r-- | gas/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/hppa/basic/basic.exp | 50 | ||||
-rw-r--r-- | gas/testsuite/gas/hppa/basic/fp_comp2.s | 39 |
3 files changed, 94 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index aa5b761..40b9f87 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +Sat Aug 28 00:16:12 1999 Jerry Quinn <jquinn@nortelnetworks.com> + + * gas/testsuite/gas/hppa/basic/basic.exp (do_fp_comp2): New. + * gas/testsuite/gas/hppa/basic/fp_comp2.s: New. + 1999-08-20 Alan Modra <alan@spri.levels.unisa.edu.au> * gas/i386/general.s, gas/i386/general.l: Add .code16gcc diff --git a/gas/testsuite/gas/hppa/basic/basic.exp b/gas/testsuite/gas/hppa/basic/basic.exp index a9ba5ea..993201a 100644 --- a/gas/testsuite/gas/hppa/basic/basic.exp +++ b/gas/testsuite/gas/hppa/basic/basic.exp @@ -1752,6 +1752,53 @@ proc do_fp_comp {} { if [expr $x==55] then { pass $testname } else { fail $testname } } +proc do_fp_comp2 {} { + set testname "fp_comp2.s: fp_comp2 tests" + set x 0 + + gas_start "fp_comp2.s" "-al" + + # Check the assembled instruction against a table built by the HP assembler + # Any differences should be checked by hand -- with the number of problems + # I've seen in the HP assembler I don't completely trust it. + # + # 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 B8AA638E\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0004 B8AA6A0E\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0008 BA5B2595\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 000c BA5B2C15\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0010 B8AA63AE\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0014 B8AA6A2E\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0018 BA5B25B5\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 001c BA5B2C35\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0020 38A0C04A\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0024 30A0C80A\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0028 30A0D80A\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 002c 3A80C098\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0030 3280C818\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0034 38A0E04A\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0038 30A0E80A\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 003c 30A0F80A\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0040 3A80E098\[^\n\]*\n" { set x [expr $x+1] } + -re "^ +\[0-9\]+ 0044 3280E818\[^\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==18] then { pass $testname } else { fail $testname } +} + proc do_fp_conv {} { set testname "fp_conv.s: fp_conv tests" set x 0 @@ -2259,4 +2306,7 @@ if [istarget hppa*-*-*] then { # Test that we correctly assemble some FP memory tests which # L/R register selects. (Regression test for a bug Tege found). do_fmem_LR_tests + + # PA2.0 tests + do_fp_comp2 } diff --git a/gas/testsuite/gas/hppa/basic/fp_comp2.s b/gas/testsuite/gas/hppa/basic/fp_comp2.s new file mode 100644 index 0000000..648ddc1 --- /dev/null +++ b/gas/testsuite/gas/hppa/basic/fp_comp2.s @@ -0,0 +1,39 @@ + .LEVEL 2.0 + .SPACE $PRIVATE$ + .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31 + .SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82 + .SPACE $TEXT$ + .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44 + .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY + + .SPACE $TEXT$ + .SUBSPA $CODE$ + + .align 4 +; Basic immediate instruction tests. +; +; We could/should test some of the corner cases for register and +; immediate fields. We should also check the assorted field +; selectors to make sure they're handled correctly. + fmpyfadd,sgl %fr5R,%fr10L,%fr13R,%fr14L + fmpyfadd,dbl %fr5,%fr10,%fr13,%fr14 + fmpyfadd,sgl %fr18R,%fr27L,%fr6R,%fr21L + fmpyfadd,dbl %fr18,%fr27,%fr6,%fr21 + + fmpynfadd,sgl %fr5R,%fr10L,%fr13R,%fr14L + fmpynfadd,dbl %fr5,%fr10,%fr13,%fr14 + fmpynfadd,sgl %fr18R,%fr27L,%fr6R,%fr21L + fmpynfadd,dbl %fr18,%fr27,%fr6,%fr21 + + fneg,sgl %fr5,%fr10R + fneg,dbl %fr5,%fr10 + fneg,quad %fr5,%fr10 + fneg,sgl %fr20R,%fr24L + fneg,dbl %fr20,%fr24 + + fnegabs,sgl %fr5,%fr10R + fnegabs,dbl %fr5,%fr10 + fnegabs,quad %fr5,%fr10 + fnegabs,sgl %fr20R,%fr24L + fnegabs,dbl %fr20,%fr24 + |