diff options
Diffstat (limited to 'gdb/testsuite/gdb.disasm/hppa.exp')
-rw-r--r-- | gdb/testsuite/gdb.disasm/hppa.exp | 348 |
1 files changed, 181 insertions, 167 deletions
diff --git a/gdb/testsuite/gdb.disasm/hppa.exp b/gdb/testsuite/gdb.disasm/hppa.exp index e2b7ef7..190bed4 100644 --- a/gdb/testsuite/gdb.disasm/hppa.exp +++ b/gdb/testsuite/gdb.disasm/hppa.exp @@ -1,3 +1,4 @@ + # Copyright (C) 1992 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -12,7 +13,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # Please email any bugs, comments, and/or additions to this file to: # bug-gdb@prep.ai.mit.edu @@ -23,20 +24,36 @@ if $tracelevel then { strace $tracelevel } +if ![istarget "hppa*-*-*"] { + verbose "Tests ignored for all but hppa based targets." + return +} + +global exec_output set prms_id 0 set bug_id 0 -set binfile "hppa" -set srcfile $binfile.s +set testfile "hppa" +set srcfile ${srcdir}/${subdir}/${testfile}.s +set binfile ${objdir}/${subdir}/${testfile} +if { [gdb_compile "${srcfile}" "${binfile}" executable ""] != "" } { + if [ regexp "Opcode not defined - DIAG" $exec_output] { + warning "HP assembler in use--skipping disasm tests" + return + } else { + perror "Couldn't compile ${srcfile}" + return -1 + } +} proc all_integer_memory_tests { } { global prompt global hex global decimal - send "x/8i integer_memory_tests\n" + send_gdb "x/8i integer_memory_tests\n" expect { - -re ".* + -re " .*ldw 0\\(sr0,r4\\),r26.* .*ldh 0\\(sr0,r4\\),r26.* .*ldb 0\\(sr0,r4\\),r26.* @@ -50,9 +67,9 @@ proc all_integer_memory_tests { } { timeout { fail "(timeout) integer memory_tests" } } - send "x/20i integer_indexing_load\n" + send_gdb "x/20i integer_indexing_load\n" expect { - -re ".* + -re " .*ldwx r5\\(sr0,r4\\),r26.* .*ldwx,s r5\\(sr0,r4\\),r26.* .*ldwx,m r5\\(sr0,r4\\),r26.* @@ -78,9 +95,9 @@ proc all_integer_memory_tests { } { timeout { fail "(timeout) integer_indexing" } } - send "x/15i integer_load_short_memory\n" + send_gdb "x/15i integer_load_short_memory\n" expect { - -re ".* + -re " .*ldws 0\\(sr0,r4\\),r26.* .*ldws,mb 0\\(sr0,r4\\),r26.* .*ldws,ma 0\\(sr0,r4\\),r26.* @@ -102,9 +119,9 @@ proc all_integer_memory_tests { } { } - send "x/17i integer_store_short_memory\n" + send_gdb "x/17i integer_store_short_memory\n" expect { - -re ".* + -re " .*stws r26,0\\(sr0,r4\\).* .*stws,mb r26,0\\(sr0,r4\\).* .*stws,ma r26,0\\(sr0,r4\\).* @@ -133,9 +150,9 @@ proc all_immediate_tests { } { global hex global decimal - send "x/3i immediate_tests\n" + send_gdb "x/3i immediate_tests\n" expect { - -re ".* + -re " .*ldo 5\\(r26\\),r26.* .*ldil -21524800,r26.* .*addil -21524800,r5.* @@ -150,9 +167,9 @@ proc all_branch_tests { } { global hex global decimal - send "x/10i branch_tests_1\n" + send_gdb "x/10i branch_tests_1\n" expect { - -re ".* + -re " .*bl.*,rp.* .*bl,n.*,rp.* .*b.* @@ -168,9 +185,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) branch_tests_1" } } - send "x/6i branch_tests_2\n" + send_gdb "x/6i branch_tests_2\n" expect { - -re ".* + -re " .*bv r0\\(rp\\).* .*bv,n r0\\(rp\\).* .*be 1234\\(sr1,rp\\).* @@ -183,9 +200,9 @@ proc all_branch_tests { } { } - send "x/8i movb_tests\n" + send_gdb "x/8i movb_tests\n" expect { - -re ".* + -re " .*movb r4,r26,.* <movb_tests>.* .*movb,= r4,r26,.* <movb_tests>.* .*movb,< r4,r26,.* <movb_tests>.* @@ -199,9 +216,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) movb_tests " } } - send "x/8i movb_nullified_tests\n" + send_gdb "x/8i movb_nullified_tests\n" expect { - -re ".* + -re " .*movb,n.*r4,r26,.* <movb_tests>.* .*movb,=,n.*r4,r26,.* <movb_tests>.* .*movb,<,n.*r4,r26,.* <movb_tests>.* @@ -215,9 +232,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) movb_nullified_tests " } } - send "x/8i movib_tests\n" + send_gdb "x/8i movib_tests\n" expect { - -re ".* + -re " .*movib 5,r26,.* <movib_tests>.* .*movib,= 5,r26,.* <movib_tests>.* .*movib,< 5,r26,.* <movib_tests>.* @@ -231,9 +248,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) movib_tests " } } - send "x/8i movib_nullified_tests\n" + send_gdb "x/8i movib_nullified_tests\n" expect { - -re ".* + -re " .*movib,n.*5,r26,.* <movib_tests>.* .*movib,=,n.*5,r26,.* <movib_tests>.* .*movib,<,n.*5,r26,.* <movib_tests>.* @@ -247,9 +264,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) movib_nullified_tests " } } - send "x/8i comb_tests_1\n" + send_gdb "x/8i comb_tests_1\n" expect { - -re ".* + -re " .*comb r0,r4,.* <comb_tests_1>.* .*comb,= r0,r4,.* <comb_tests_1>.* .*comb,< r0,r4,.* <comb_tests_1>.* @@ -263,9 +280,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) comb_tests_1" } } - send "x/8i comb_tests_2\n" + send_gdb "x/8i comb_tests_2\n" expect { - -re ".* + -re " .*combf r0,r4,.* <comb_tests_2>.* .*combf,= r0,r4,.* <comb_tests_2>.* .*combf,< r0,r4,.* <comb_tests_2>.* @@ -279,9 +296,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) comb_tests_2" } } - send "x/8i comb_nullified_tests_1\n" + send_gdb "x/8i comb_nullified_tests_1\n" expect { - -re ".* + -re " .*comb,n r0,r4,.* <comb_tests_1>.* .*comb,=,n r0,r4,.* <comb_tests_1>.* .*comb,<,n r0,r4,.* <comb_tests_1>.* @@ -295,9 +312,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) comb_nullified_tests_1" } } - send "x/8i comb_nullified_tests_2\n" + send_gdb "x/8i comb_nullified_tests_2\n" expect { - -re ".* + -re " .*combf,n r0,r4,.* <comb_tests_2>.* .*combf,=,n r0,r4,.* <comb_tests_2>.* .*combf,<,n r0,r4,.* <comb_tests_2>.* @@ -311,9 +328,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) comb_nullified_tests_2" } } - send "x/8i comib_tests_1\n" + send_gdb "x/8i comib_tests_1\n" expect { - -re ".* + -re " .*comib 0,r4,.* <comib_tests_1>.* .*comib,= 0,r4,.* <comib_tests_1>.* .*comib,< 0,r4,.* <comib_tests_1>.* @@ -327,9 +344,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) comib_tests_1" } } - send "x/8i comib_tests_2\n" + send_gdb "x/8i comib_tests_2\n" expect { - -re ".* + -re " .*comibf 0,r4,.* <comib_tests_2>.* .*comibf,= 0,r4,.* <comib_tests_2>.* .*comibf,< 0,r4,.* <comib_tests_2>.* @@ -343,9 +360,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) comib_tests_2" } } - send "x/8i comib_nullified_tests_1\n" + send_gdb "x/8i comib_nullified_tests_1\n" expect { - -re ".* + -re " .*comib,n 0,r4,.* <comib_tests_1>.* .*comib,=,n 0,r4,.* <comib_tests_1>.* .*comib,<,n 0,r4,.* <comib_tests_1>.* @@ -359,9 +376,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) comib_nullified_tests_1" } } - send "x/8i comib_nullified_tests_2\n" + send_gdb "x/8i comib_nullified_tests_2\n" expect { - -re ".* + -re " .*comibf,n 0,r4,.* <comib_tests_2>.* .*comibf,=,n 0,r4,.* <comib_tests_2>.* .*comibf,<,n 0,r4,.* <comib_tests_2>.* @@ -375,9 +392,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) comib_nullified_tests_2" } } - send "x/8i addb_tests_1\n" + send_gdb "x/8i addb_tests_1\n" expect { - -re ".* + -re " .*addb r1,r4,.* <addb_tests_1>.* .*addb,= r1,r4,.* <addb_tests_1>.* .*addb,< r1,r4,.* <addb_tests_1>.* @@ -391,9 +408,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) addb_tests_1" } } - send "x/8i addb_tests_2\n" + send_gdb "x/8i addb_tests_2\n" expect { - -re ".* + -re " .*addbf r1,r4,.* <addb_tests_2>.* .*addbf,= r1,r4,.* <addb_tests_2>.* .*addbf,< r1,r4,.* <addb_tests_2>.* @@ -407,9 +424,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) addb_tests_2" } } - send "x/8i addb_nullified_tests_1\n" + send_gdb "x/8i addb_nullified_tests_1\n" expect { - -re ".* + -re " .*addb,n r1,r4,.* <addb_tests_1>.* .*addb,=,n r1,r4,.* <addb_tests_1>.* .*addb,<,n r1,r4,.* <addb_tests_1>.* @@ -423,9 +440,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) addb_nullified_tests_1" } } - send "x/8i addb_nullified_tests_2\n" + send_gdb "x/8i addb_nullified_tests_2\n" expect { - -re ".* + -re " .*addbf,n r1,r4,.* <addb_tests_2>.* .*addbf,=,n r1,r4,.* <addb_tests_2>.* .*addbf,<,n r1,r4,.* <addb_tests_2>.* @@ -439,9 +456,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) addb_nullified_tests_2" } } - send "x/8i addib_tests_1\n" + send_gdb "x/8i addib_tests_1\n" expect { - -re ".* + -re " .*addib -1,r4,.* <addib_tests_1>.* .*addib,= -1,r4,.* <addib_tests_1>.* .*addib,< -1,r4,.* <addib_tests_1>.* @@ -455,9 +472,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) addib_tests_1" } } - send "x/8i addib_tests_2\n" + send_gdb "x/8i addib_tests_2\n" expect { - -re ".* + -re " .*addibf -1,r4,.* <addib_tests_2>.* .*addibf,= -1,r4,.* <addib_tests_2>.* .*addibf,< -1,r4,.* <addib_tests_2>.* @@ -471,9 +488,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) addib_tests_2" } } - send "x/8i addib_nullified_tests_1\n" + send_gdb "x/8i addib_nullified_tests_1\n" expect { - -re ".* + -re " .*addib,n -1,r4,.* <addib_tests_1>.* .*addib,=,n -1,r4,.* <addib_tests_1>.* .*addib,<,n -1,r4,.* <addib_tests_1>.* @@ -487,9 +504,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) addb_nullified_tests_1" } } - send "x/8i addib_nullified_tests_2\n" + send_gdb "x/8i addib_nullified_tests_2\n" expect { - -re ".* + -re " .*addibf,n -1,r4,.* <addib_tests_2>.* .*addibf,=,n -1,r4,.* <addib_tests_2>.* .*addibf,<,n -1,r4,.* <addib_tests_2>.* @@ -503,9 +520,9 @@ proc all_branch_tests { } { timeout { fail "(timeout) addb_nullified_tests_2" } } - send "x/8i bb_tests\n" + send_gdb "x/8i bb_tests\n" expect { - -re ".* + -re " .*bvb,< r4,.* <bb_tests>.* .*bvb,>= r4,.* <bb_tests>.* .*bvb,<,n r4,.* <bb_tests>.* @@ -531,9 +548,9 @@ proc all_integer_computational_tests { } { {sh3add} {sh3addl} {sh3addo} ] foreach i $add_insns { - send "x/16i $i"; send "_tests\n" + send_gdb "x/16i $i"; send_gdb "_tests\n" expect { - -re ".* + -re " .*$i r4,r5,r6.* .*$i,= r4,r5,r6.* .*$i,< r4,r5,r6.* @@ -560,9 +577,9 @@ proc all_integer_computational_tests { } { {ds} {comclr} ] foreach i $sub_insns { - send "x/16i $i"; send "_tests\n" + send_gdb "x/16i $i"; send_gdb "_tests\n" expect { - -re ".* + -re " .*$i r4,r5,r6.* .*$i,= r4,r5,r6.* .*$i,< r4,r5,r6.* @@ -588,9 +605,9 @@ proc all_integer_computational_tests { } { set logical_insns [list {or} {xor} {and} {andcm} ] foreach i $logical_insns { - send "x/10i $i"; send "_tests\n" + send_gdb "x/10i $i"; send_gdb "_tests\n" expect { - -re ".* + -re " .*$i r4,r5,r6.* .*$i,= r4,r5,r6.* .*$i,< r4,r5,r6.* @@ -610,9 +627,9 @@ proc all_integer_computational_tests { } { set unit_insns1 [list {uxor} {uaddcm} {uaddcmt} ] foreach i $unit_insns1 { - send "x/12i $i"; send "_tests\n" + send_gdb "x/12i $i"; send_gdb "_tests\n" expect { - -re ".* + -re " .*$i r4,r5,r6.* .*$i,sbz r4,r5,r6.* .*$i,shz r4,r5,r6.* @@ -634,9 +651,9 @@ proc all_integer_computational_tests { } { set unit_insns2 [list {dcor} {idcor} ] foreach i $unit_insns2 { - send "x/12i $i"; send "_tests\n" + send_gdb "x/12i $i"; send_gdb "_tests\n" expect { - -re ".* + -re " .*$i r4,r5.* .*$i,sbz r4,r5.* .*$i,shz r4,r5.* @@ -658,9 +675,9 @@ proc all_integer_computational_tests { } { set addi_insns [list {addi} {addio} {addit} {addito} ] foreach i $addi_insns { - send "x/16i $i"; send "_tests\n" + send_gdb "x/16i $i"; send_gdb "_tests\n" expect { - -re ".* + -re " .*$i 7b,r5,r6.* .*$i,= 7b,r5,r6.* .*$i,< 7b,r5,r6.* @@ -686,9 +703,9 @@ proc all_integer_computational_tests { } { set subi_insns [list {subi} {subio} {comiclr} ] foreach i $subi_insns { - send "x/16i $i"; send "_tests\n" + send_gdb "x/16i $i"; send_gdb "_tests\n" expect { - -re ".* + -re " .*$i 7b,r5,r6.* .*$i,= 7b,r5,r6.* .*$i,< 7b,r5,r6.* @@ -711,9 +728,9 @@ proc all_integer_computational_tests { } { } } - send "x/8i vshd_tests\n" + send_gdb "x/8i vshd_tests\n" expect { - -re ".* + -re " .*vshd r4,r5,r6.* .*vshd,= r4,r5,r6.* .*vshd,< r4,r5,r6.* @@ -727,9 +744,9 @@ proc all_integer_computational_tests { } { timeout { fail "(timeout) "vshd tests" } } - send "x/8i shd_tests\n" + send_gdb "x/8i shd_tests\n" expect { - -re ".* + -re " .*shd r4,r5,5,r6.* .*shd,= r4,r5,5,r6.* .*shd,< r4,r5,5,r6.* @@ -746,9 +763,9 @@ proc all_integer_computational_tests { } { set extract_insns1 [list {extru} {extrs} {zdep} {dep} ] foreach i $extract_insns1 { - send "x/8i $i"; send "_tests\n" + send_gdb "x/8i $i"; send_gdb "_tests\n" expect { - -re ".* + -re " .*$i r4,5,10,r6.* .*$i,= r4,5,10,r6.* .*$i,< r4,5,10,r6.* @@ -766,9 +783,9 @@ proc all_integer_computational_tests { } { set extract_insns2 [list {vextru} {vextrs} {zvdep} {vdep} ] foreach i $extract_insns2 { - send "x/8i $i"; send "_tests\n" + send_gdb "x/8i $i"; send_gdb "_tests\n" expect { - -re ".* + -re " .*$i r4,5,r6.* .*$i,= r4,5,r6.* .*$i,< r4,5,r6.* @@ -786,9 +803,9 @@ proc all_integer_computational_tests { } { set extract_insns3 [list {vdepi} {zvdepi} ] foreach i $extract_insns3 { - send "x/8i $i"; send "_tests\n" + send_gdb "x/8i $i"; send_gdb "_tests\n" expect { - -re ".* + -re " .*$i -1,5,r6.* .*$i,= -1,5,r6.* .*$i,< -1,5,r6.* @@ -806,9 +823,9 @@ proc all_integer_computational_tests { } { set extract_insns4 [list {depi} {zdepi} ] foreach i $extract_insns4 { - send "x/8i $i"; send "_tests\n" + send_gdb "x/8i $i"; send_gdb "_tests\n" expect { - -re ".* + -re " .*$i -1,4,10,r6.* .*$i,= -1,4,10,r6.* .*$i,< -1,4,10,r6.* @@ -829,9 +846,9 @@ proc all_system_control_tests { } { global hex global decimal - send "x/13i system_control_tests\n" + send_gdb "x/14i system_control_tests\n" expect { - -re ".* + -re " .*break 5,c.* .*rfi.* .*rfir.* @@ -844,15 +861,16 @@ proc all_system_control_tests { } { .*mfsp sr0,r4.* .*mfctl ccr,r4.* .*sync.* +.*syncdma.* .*diag 4d2.* .*$prompt $" { pass "system_constrol_tests" } -re "$prompt $" { fail "system_control_tests" } timeout { file "(timeout) system_control_tests" } } - send "x/4i probe_tests\n" + send_gdb "x/4i probe_tests\n" expect { - -re ".* + -re " .*prober \\(sr0,r5\\),r6,r7.* .*proberi \\(sr0,r5\\),1,r7.* .*probew \\(sr0,r5\\),r6,r7.* @@ -862,21 +880,23 @@ proc all_system_control_tests { } { timeout { file "(timeout) probe_tests" } } - send "x/4i lpa_tests\n" + # lci uses the same bit pattern as lha, so accept lha. + send_gdb "x/5i lpa_tests\n" expect { - -re ".* + -re " .*lpa r4\\(sr0,r5\\),r6.* .*lpa,m r4\\(sr0,r5\\),r6.* .*lha r4\\(sr0,r5\\),r6.* .*lha,m r4\\(sr0,r5\\),r6.* +.*lha r4\\(sr0,r5\\),r6.* .*$prompt $" { pass "lpa_tests" } -re "$prompt $" { fail "lpa_tests" } timeout { file "(timeout) lpa_tests" } } - send "x/18i purge_tests\n" + send_gdb "x/18i purge_tests\n" expect { - -re ".* + -re " .*pdtlb r4\\(sr0,r5\\).* .*pdtlb,m r4\\(sr0,r5\\).* .*pitlb r4\\(sr0,r5\\).* @@ -900,9 +920,9 @@ proc all_system_control_tests { } { timeout { file "(timeout) purge_tests" } } - send "x/4i insert_tests\n" + send_gdb "x/4i insert_tests\n" expect { - -re ".* + -re " .*idtlba r4,\\(sr0,r5\\).* .*iitlba r4,\\(sr0,r5\\).* .*idtlbp r4,\\(sr0,r5\\).* @@ -919,9 +939,9 @@ proc all_fpu_memory_tests { } { global hex global decimal - send "x/20i fpu_memory_indexing_tests\n" + send_gdb "x/20i fpu_memory_indexing_tests\n" expect { - -re ".* + -re " .*fldwx r4\\(sr0,r5\\),fr6.* .*fldwx,s r4\\(sr0,r5\\),fr6.* .*fldwx,m r4\\(sr0,r5\\),fr6.* @@ -947,9 +967,9 @@ proc all_fpu_memory_tests { } { timeout { file "(timeout) fpu_memory_indexing_tests" } } - send "x/15i fpu_short_memory_tests\n" + send_gdb "x/15i fpu_short_memory_tests\n" expect { - -re ".* + -re " .*fldws 0\\(sr0,r5\\),fr6.* .*fldws,mb 0\\(sr0,r5\\),fr6.* .*fldws,ma 0\\(sr0,r5\\),fr6.* @@ -977,9 +997,9 @@ proc all_fpu_computational_tests { } { global hex global decimal - send "x/1i fpu_misc_tests\n" + send_gdb "x/1i fpu_misc_tests\n" expect { - -re ".* + -re " .*ftest.* .*$prompt $" { pass "fpu_misc_tests" } -re "$prompt $" { fail "fpu_misc_tests" } @@ -989,9 +1009,9 @@ proc all_fpu_computational_tests { } { set fpu_two_op_insns [list {fcpy} {fabs} {fsqrt} {frnd} ] foreach i $fpu_two_op_insns { - send "x/5i $i"; send "_tests\n" + send_gdb "x/5i $i"; send_gdb "_tests\n" expect { - -re ".* + -re " .*$i,sgl fr5,fr10.* .*$i,dbl fr5,fr10.* .*$i,quad fr5,fr10.* @@ -1006,9 +1026,9 @@ proc all_fpu_computational_tests { } { set fpu_conversions [list {fcnvff} {fcnvxf} {fcnvfx} {fcnvfxt} ] foreach i $fpu_conversions { - send "x/18i $i"; send "_tests\n" + send_gdb "x/18i $i"; send_gdb "_tests\n" expect { - -re ".* + -re " .*$i,sgl,sgl fr5,fr10.* .*$i,sgl,dbl fr5,fr10.* .*$i,sgl,quad fr5,fr10.* @@ -1036,9 +1056,9 @@ proc all_fpu_computational_tests { } { set fpu_three_op_insns [list {fadd} {fsub} {fmpy} {fdiv} {frem} ] foreach i $fpu_three_op_insns { - send "x/6i $i"; send "_tests\n" + send_gdb "x/6i $i"; send_gdb "_tests\n" expect { - -re ".* + -re " .*$i,sgl fr4,fr8,fr12.* .*$i,dbl fr4,fr8,fr12.* .*$i,quad fr4,fr8,fr12.* @@ -1051,9 +1071,9 @@ proc all_fpu_computational_tests { } { } } - send "x/4i fmpy_addsub_tests\n" + send_gdb "x/4i fmpy_addsub_tests\n" expect { - -re ".* + -re " .*fmpyadd,sgl fr16,fr17,fr18,fr19,fr20.* .*fmpyadd,dbl fr16,fr17,fr18,fr19,fr20.* .*fmpysub,sgl fr16,fr17,fr18,fr19,fr20.* @@ -1063,9 +1083,9 @@ proc all_fpu_computational_tests { } { timeout { fail "(timeout) fmpy_addsub_tests" } } - send "x/i xmpyu_tests\n" + send_gdb "x/i xmpyu_tests\n" expect { - -re ".* + -re " .*xmpyu fr4,fr5,fr6.* .*$prompt $" {pass "xmpyu_tests" } -re "$prompt $" {fail "xmpyu_tests" } @@ -1082,9 +1102,9 @@ proc all_fpu_comparison_tests { } { set fpu_comparison_formats [list {sgl} {dbl} {quad} ] foreach i $fpu_comparison_formats { - send "x/8i fcmp_$i"; send "_tests_1\n" + send_gdb "x/8i fcmp_$i"; send_gdb "_tests_1\n" expect { - -re ".* + -re " .*fcmp,$i,false\\? fr4,fr5.* .*fcmp,$i,false fr4,fr5.* .*fcmp,$i,\\? fr4,fr5.* @@ -1098,9 +1118,9 @@ proc all_fpu_comparison_tests { } { timeout { fail "(timeout) fcmp_$i tests (part1) " } } - send "x/8i fcmp_$i"; send "_tests_2\n" + send_gdb "x/8i fcmp_$i"; send_gdb "_tests_2\n" expect { - -re ".* + -re " .*fcmp,$i,!\\?>= fr4,fr5.* .*fcmp,$i,< fr4,fr5.* .*fcmp,$i,\\?< fr4,fr5.* @@ -1114,9 +1134,9 @@ proc all_fpu_comparison_tests { } { timeout { fail "(timeout) fcmp_$i tests (part2) " } } - send "x/8i fcmp_$i"; send "_tests_3\n" + send_gdb "x/8i fcmp_$i"; send_gdb "_tests_3\n" expect { - -re ".* + -re " .*fcmp,$i,!\\?<= fr4,fr5.* .*fcmp,$i,> fr4,fr5.* .*fcmp,$i,\\?> fr4,fr5.* @@ -1130,9 +1150,9 @@ proc all_fpu_comparison_tests { } { timeout { fail "(timeout) fcmp_$i tests (part3) " } } - send "x/16i fcmp_$i"; send "_tests_4\n" + send_gdb "x/8i fcmp_$i"; send_gdb "_tests_4\n" expect { - -re ".* + -re " .*fcmp,$i,!\\?= fr4,fr5.* .*fcmp,$i,<> fr4,fr5.* .*fcmp,$i,!= fr4,fr5.* @@ -1153,9 +1173,9 @@ proc all_special_tests { } { global hex global decimal - send "x/4i special_tests\n" + send_gdb "x/4i special_tests\n" expect { - -re ".* + -re " .*gfw r4\\(sr0,r5\\).* .*gfw,m r4\\(sr0,r5\\).* .*gfr r4\\(sr0,r5\\).* @@ -1172,9 +1192,9 @@ proc all_sfu_tests { } { global hex global decimal - send "x/16i sfu_tests\n" + send_gdb "x/16i sfu_tests\n" expect { - -re ".* + -re " .*spop0,4,5.* .*spop0,4,73.* .*spop0,4,5,n.* @@ -1202,9 +1222,9 @@ proc all_copr_tests { } { global hex global decimal - send "x/4i copr_tests\n" + send_gdb "x/4i copr_tests\n" expect { - -re ".* + -re " .*copr,4,5.* .*copr,4,73.* .*copr,4,5,n.* @@ -1220,9 +1240,9 @@ proc all_copr_mem_tests { } { global hex global decimal - send "x/8i copr_indexing_load\n" + send_gdb "x/8i copr_indexing_load\n" expect { - -re ".* + -re " .*cldwx,4 r5\\(sr0,r4\\),r26.* .*cldwx,4,s r5\\(sr0,r4\\),r26.* .*cldwx,4,m r5\\(sr0,r4\\),r26.* @@ -1236,9 +1256,9 @@ proc all_copr_mem_tests { } { timeout { fail "(timeout) copr indexed load tests " } } - send "x/8i copr_indexing_store\n" + send_gdb "x/8i copr_indexing_store\n" expect { - -re ".* + -re " .*cstwx,4 r26,r5\\(sr0,r4\\).* .*cstwx,4,s r26,r5\\(sr0,r4\\).* .*cstwx,4,m r26,r5\\(sr0,r4\\).* @@ -1252,9 +1272,9 @@ proc all_copr_mem_tests { } { timeout { fail "(timeout) copr indexed load tests " } } - send "x/12i copr_short_memory\n" + send_gdb "x/12i copr_short_memory\n" expect { - -re ".* + -re " .*cldws,4 0\\(sr0,r4\\),r26.* .*cldws,4,mb 0\\(sr0,r4\\),r26.* .*cldws,4,ma 0\\(sr0,r4\\),r26.* @@ -1278,9 +1298,9 @@ proc fmemLRbug_tests { } { global hex global decimal - send "x/12i fmemLRbug_tests_1\n" + send_gdb "x/12i fmemLRbug_tests_1\n" expect { - -re ".* + -re " .*fstws fr6R,0\\(sr0,r26\\).* .*fstws fr6,4\\(sr0,r26\\).* .*fstws fr6,8\\(sr0,r26\\).* @@ -1298,9 +1318,9 @@ proc fmemLRbug_tests { } { timeout { fail "(timeout) fmem LR register selector tests (part1)" } } - send "x/12i fmemLRbug_tests_2\n" + send_gdb "x/12i fmemLRbug_tests_2\n" expect { - -re ".* + -re " .*fstws fr6R,0\\(sr0,r26\\).* .*fstws fr6,4\\(sr0,r26\\).* .*fstws fr6,8\\(sr0,r26\\).* @@ -1318,9 +1338,9 @@ proc fmemLRbug_tests { } { timeout { fail "(timeout) fmem LR register selector tests (part2)" } } - send "x/12i fmemLRbug_tests_3\n" + send_gdb "x/12i fmemLRbug_tests_3\n" expect { - -re ".* + -re " .*fstwx fr6R,r25\\(sr0,r26\\).* .*fstwx fr6,r25\\(sr0,r26\\).* .*fstwx fr6,r25\\(sr0,r26\\).* @@ -1338,9 +1358,9 @@ proc fmemLRbug_tests { } { timeout { fail "(timeout) fmem LR register selector tests (part3)" } } - send "x/12i fmemLRbug_tests_4\n" + send_gdb "x/12i fmemLRbug_tests_4\n" expect { - -re ".* + -re " .*fstwx fr6R,r25\\(sr0,r26\\).* .*fstwx fr6,r25\\(sr0,r26\\).* .*fstwx fr6,r25\\(sr0,r26\\).* @@ -1359,31 +1379,25 @@ proc fmemLRbug_tests { } { } } -if ![file exists $objdir/$subdir/$binfile] then { - if $all_flag then { - warning "$objdir/$subdir/$binfile does not exist; tests suppressed" - } -} else { - # Start with a fresh gdb. - - gdb_exit - gdb_start - gdb_reinitialize_dir $srcdir/$subdir - gdb_load $objdir/$subdir/$binfile - - all_integer_memory_tests - all_immediate_tests - all_branch_tests - all_integer_computational_tests - all_system_control_tests - all_fpu_memory_tests - all_fpu_computational_tests - all_fpu_comparison_tests - all_special_tests - all_sfu_tests - all_copr_tests - all_copr_mem_tests - - # Regression test for a bug Tege found. - fmemLRbug_tests -} +# Start with a fresh gdb. + +gdb_exit +gdb_start +gdb_reinitialize_dir $srcdir/$subdir +gdb_load $binfile + +all_integer_memory_tests +all_immediate_tests +all_branch_tests +all_integer_computational_tests +all_system_control_tests +all_fpu_memory_tests +all_fpu_computational_tests +all_fpu_comparison_tests +all_special_tests +all_sfu_tests +all_copr_tests +all_copr_mem_tests + +# Regression test for a bug Tege found. +fmemLRbug_tests |