aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorDave Anglin <dave.anglin@nrc.ca>2010-12-27 02:05:14 +0000
committerDave Anglin <dave.anglin@nrc.ca>2010-12-27 02:05:14 +0000
commita64718d3b10db2e9c52e14df4e221b5f127edbff (patch)
tree8f46709e2b46767144d07316badadcbe122a1bd1 /gas/testsuite
parent53e6a1dd44e692b7ca258b325776a4cfd8af11f3 (diff)
downloadgdb-a64718d3b10db2e9c52e14df4e221b5f127edbff.zip
gdb-a64718d3b10db2e9c52e14df4e221b5f127edbff.tar.gz
gdb-a64718d3b10db2e9c52e14df4e221b5f127edbff.tar.bz2
PR gas/11395
* config/tc-hppa.c (pa_ip): Set doubleword carry/borrow bit when a doubleword completer or doubleword condition is found in an add/sub instruction. Reject match for 'A'/'S' only if there is no condition and d bit is not set. * gas/hppa/basic/add2.s: Add test for a simple doubleword carry instruction. * gas/hppa/basic/sub2.s: Add tests for simple word and doubleword borrow instructions. * gas/hppa/basic/basic.exp: Update regexps for above. * opcode/hppa.h: Clear "d" bit in "add" and "sub" patterns.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog9
-rw-r--r--gas/testsuite/gas/hppa/basic/add2.s3
-rw-r--r--gas/testsuite/gas/hppa/basic/basic.exp7
-rw-r--r--gas/testsuite/gas/hppa/basic/sub2.s6
4 files changed, 22 insertions, 3 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 0cf93d6..4c9dcd8 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2010-12-26 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR gas/11395
+ * gas/hppa/basic/add2.s: Add test for a simple doubleword carry
+ instruction.
+ * gas/hppa/basic/sub2.s: Add tests for simple word and doubleword
+ borrow instructions.
+ * gas/hppa/basic/basic.exp: Update regexps for above.
+
2010-12-18 Mingjie Xing <mingjie.xing@gmail.com>
* gas/mips/loongson-3a-2.s, gas/mips/loongson-3a-2.d,
diff --git a/gas/testsuite/gas/hppa/basic/add2.s b/gas/testsuite/gas/hppa/basic/add2.s
index c630a4c..0c62952 100644
--- a/gas/testsuite/gas/hppa/basic/add2.s
+++ b/gas/testsuite/gas/hppa/basic/add2.s
@@ -92,5 +92,6 @@
add,tsv,dc,*ev %r4,%r5,%r6
;; PR gas/11395: Check for the correct assembly
- ;; of an unconditional 32-bit add instruction.
+ ;; of unconditional 32-bit and 64-bit add instructions.
add %r1,%r1,%r1
+ add,dc %r1,%r1,%r1
diff --git a/gas/testsuite/gas/hppa/basic/basic.exp b/gas/testsuite/gas/hppa/basic/basic.exp
index f99ca7b..d5d6104 100644
--- a/gas/testsuite/gas/hppa/basic/basic.exp
+++ b/gas/testsuite/gas/hppa/basic/basic.exp
@@ -675,6 +675,7 @@ proc do_add2 {} {
-re "^ +\[0-9\]+ 0138 08A4DF26\[^\n\]*\n" { set x [expr $x+1] }
-re "^ +\[0-9\]+ 013c 08A4FF26\[^\n\]*\n" { set x [expr $x+1] }
-re "^ +\[0-9\]+ 0140 08210601\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0144 08210721\[^\n\]*\n" { set x [expr $x+1] }
-re "\[^\n\]*\n" { }
timeout { perror "timeout\n"; break }
eof { break }
@@ -686,7 +687,7 @@ proc do_add2 {} {
gas_finish
# Did we find what we were looking for? If not, flunk it.
- if [expr $x==81] then { pass $testname } else { fail $testname }
+ if [expr $x==82] then { pass $testname } else { fail $testname }
}
proc do_sh1add {} {
@@ -1582,6 +1583,8 @@ proc do_sub2 {} {
-re "^ +\[0-9\]+ 0174 08A4BCE6\[^\n\]*\n" { set x [expr $x+1] }
-re "^ +\[0-9\]+ 0178 08A4DCE6\[^\n\]*\n" { set x [expr $x+1] }
-re "^ +\[0-9\]+ 017c 08A4FCE6\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0180 08210401\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0184 08210521\[^\n\]*\n" { set x [expr $x+1] }
-re "\[^\n\]*\n" { }
timeout { perror "timeout\n"; break }
eof { break }
@@ -1593,7 +1596,7 @@ proc do_sub2 {} {
gas_finish
# Did we find what we were looking for? If not, flunk it.
- if [expr $x==96] then { pass $testname } else { fail $testname }
+ if [expr $x==98] then { pass $testname } else { fail $testname }
}
proc do_ds {} {
diff --git a/gas/testsuite/gas/hppa/basic/sub2.s b/gas/testsuite/gas/hppa/basic/sub2.s
index af0435e..0f4cdb1 100644
--- a/gas/testsuite/gas/hppa/basic/sub2.s
+++ b/gas/testsuite/gas/hppa/basic/sub2.s
@@ -107,3 +107,9 @@
sub,tsv,tc,*>> %r4,%r5,%r6
sub,tsv,tc,*nsv %r4,%r5,%r6
sub,tsv,tc,*ev %r4,%r5,%r6
+
+ ;; PR gas/11395: Check for the correct assembly
+ ;; of unconditional 32-bit and 64-bit sub instructions.
+ sub %r1,%r1,%r1
+ sub,db %r1,%r1,%r1
+