public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Jerry Quinn" <jquinn@nortelnetworks.com>
To: binutils@sourceware.cygnus.com
Subject: Patch: tests for pa20 fp instructions
Date: Fri, 30 Jul 1999 08:13:00 -0000	[thread overview]
Message-ID: <598.933347638.0@NO-ID-FOUND.mhonarc.org> (raw)

This patch adds gas tests for fmpyfadd, fmpynfadd, fneg, and fnegabs.

ChangeLog entry:

Fri Jul 30 11:11:49 EDT 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.

*** pa-prev/gas/testsuite/gas/hppa/basic/basic.exp	Fri Jul 30 09:56:26 1999
--- gas-src/gas/testsuite/gas/hppa/basic/basic.exp	Fri Jul 30 11:03:10 1999
***************
*** 1752,1757 ****
--- 1752,1804 ----
      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
diff -cN pa-prev/gas/testsuite/gas/hppa/basic/fp_comp2.s gas-src/gas/testsuite/gas/hppa/basic/fp_comp2.s
*** pa-prev/gas/testsuite/gas/hppa/basic/fp_comp2.s	Wed Dec 31 19:00:00 1969
--- gas-src/gas/testsuite/gas/hppa/basic/fp_comp2.s	Fri Jul 30 10:49:00 1999
***************
*** 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
+ 

             reply	other threads:[~1999-07-30  8:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-30  8:13 Jerry Quinn [this message]
1999-07-30  8:13 Jerry Quinn
     [not found] <199907301515.IAA16847@cygnus.com>
1999-08-27 23:21 ` Jeffrey A Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=598.933347638.0@NO-ID-FOUND.mhonarc.org \
    --to=jquinn@nortelnetworks.com \
    --cc=binutils@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).