aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1999-08-28 06:44:31 +0000
committerJeff Law <law@redhat.com>1999-08-28 06:44:31 +0000
commitbe3f1865fb9f1d0ea9fa4250f176b87af53517f7 (patch)
treebb5b8a5b605842c8720c9ad2d203563955d4383f /gas
parenta97685e9019395395592d12c5e81e22807d620a7 (diff)
downloadgdb-be3f1865fb9f1d0ea9fa4250f176b87af53517f7.zip
gdb-be3f1865fb9f1d0ea9fa4250f176b87af53517f7.tar.gz
gdb-be3f1865fb9f1d0ea9fa4250f176b87af53517f7.tar.bz2
* gas/hppa/basic/basic.exp (do_branch2,do_media): New.
* gas/hppa/basic/branch2.s: New. * gas/hppa/basic/media.s: New.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog8
-rw-r--r--gas/testsuite/gas/hppa/basic/basic.exp84
-rw-r--r--gas/testsuite/gas/hppa/basic/branch2.s41
-rw-r--r--gas/testsuite/gas/hppa/basic/media.s25
4 files changed, 156 insertions, 2 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 40b9f87..1a59b24 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,7 +1,11 @@
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.
+ * gas/hppa/basic/basic.exp (do_branch2,do_media): New.
+ * gas/hppa/basic/branch2.s: New.
+ * gas/hppa/basic/media.s: New.
+
+ * gas/hppa/basic/basic.exp (do_fp_comp2): New.
+ * gas/hppa/basic/fp_comp2.s: New.
1999-08-20 Alan Modra <alan@spri.levels.unisa.edu.au>
diff --git a/gas/testsuite/gas/hppa/basic/basic.exp b/gas/testsuite/gas/hppa/basic/basic.exp
index 993201a..c191670 100644
--- a/gas/testsuite/gas/hppa/basic/basic.exp
+++ b/gas/testsuite/gas/hppa/basic/basic.exp
@@ -359,6 +359,52 @@ proc do_branch {} {
if [expr $x==183] then { pass $testname } else { fail $testname }
}
+proc do_branch2 {} {
+ set testname "branch2.s: branch tests"
+ set x 0
+
+ gas_start "branch2.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 C0045FF5\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0004 C004DFED\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0008 C0045FE7\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 000c C004DFDF\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0010 C0047FD5\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0014 C004FFCD\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0018 C0047FC7\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 001c C004FFBF\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0020 C4A47FB5\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0024 C4A4FFAD\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0028 C4A47FA7\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 002c C4A4FF9F\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0030 E8004005\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0034 E800400D\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0038 E8004F9D\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 003c E8004001\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0040 E8044001\[^\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==17] then { pass $testname } else { fail $testname }
+}
+
proc do_add {} {
set testname "add.s: add tests"
set x 0
@@ -2025,6 +2071,42 @@ proc do_fp_fcmp {} {
if [expr $x==96] then { pass $testname } else { fail $testname }
}
+proc do_media {} {
+ set testname "media.s: purge tests"
+ set x 0
+
+ gas_start "media.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 096702CC\[^\n]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0004 0967074C\[^\n]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0008 0967078C\[^\n]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 000c 096707CC\[^\n]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0010 0967054C\[^\n]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0014 0967058C\[^\n]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0014 096705CC\[^\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_special {} {
set testname "special.s: special tests"
set x 0
@@ -2309,4 +2391,6 @@ if [istarget hppa*-*-*] then {
# PA2.0 tests
do_fp_comp2
+ do_branch2
+ do_media
}
diff --git a/gas/testsuite/gas/hppa/basic/branch2.s b/gas/testsuite/gas/hppa/basic/branch2.s
new file mode 100644
index 0000000..ba865a7
--- /dev/null
+++ b/gas/testsuite/gas/hppa/basic/branch2.s
@@ -0,0 +1,41 @@
+ .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
+; More branching instructions than you ever knew what to do with.
+; PA 2.0 versions and new syntax.
+
+;
+; 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.
+
+bb_tests:
+ bb,< %r4,%sar,bb_tests
+ bb,>= %r4,%sar,bb_tests
+ bb,<,n %r4,%cr11,bb_tests
+ bb,>=,n %r4,%cr11,bb_tests
+ bb,*< %r4,%sar,bb_tests
+ bb,*>= %r4,%sar,bb_tests
+ bb,*<,n %r4,%cr11,bb_tests
+ bb,*>=,n %r4,%cr11,bb_tests
+ bb,*< %r4,5,bb_tests
+ bb,*>= %r4,5,bb_tests
+ bb,*<,n %r4,5,bb_tests
+ bb,*>=,n %r4,5,bb_tests
+
+branch_stack:
+ clrbts
+ popbts 1
+ popbts 499
+ pushnom
+ pushbts %r4
+
diff --git a/gas/testsuite/gas/hppa/basic/media.s b/gas/testsuite/gas/hppa/basic/media.s
new file mode 100644
index 0000000..debcb57
--- /dev/null
+++ b/gas/testsuite/gas/hppa/basic/media.s
@@ -0,0 +1,25 @@
+ .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
+; PA2.0 multimedia (halfword) 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.
+
+ havg %r7,%r11,%r12
+ hshladd %r7,1,%r11,%r12
+ hshladd %r7,2,%r11,%r12
+ hshladd %r7,3,%r11,%r12
+ hshradd %r7,1,%r11,%r12
+ hshradd %r7,2,%r11,%r12
+ hshradd %r7,3,%r11,%r12