From: Jeff Law Date: Wed, 3 Nov 1993 06:12:15 +0000 (+0000) Subject: * gas/hppa/more.parse/{defbug.s, stdreg.s}: New tests. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9ac55becf6f032f4aca2d10b663f90c48fd22e9b;p=binutils-gdb.git * gas/hppa/more.parse/{defbug.s, stdreg.s}: New tests. * gas/hppa/more.parse/parse.exp: Run them. --- diff --git a/gas/testsuite/gas/hppa/more.parse/.Sanitize b/gas/testsuite/gas/hppa/more.parse/.Sanitize index a595b4a2c6f..77e6f5aecd6 100644 --- a/gas/testsuite/gas/hppa/more.parse/.Sanitize +++ b/gas/testsuite/gas/hppa/more.parse/.Sanitize @@ -31,6 +31,7 @@ align2.s block1.s block2.s calldatabug.s +defbug.s entrybug.s exportbug.s exprbug.s @@ -43,6 +44,7 @@ parse.exp procbug.s spacebug.s ssbug.s +stdreg.s stringer.s undefbug.s versionbug.s diff --git a/gas/testsuite/gas/hppa/more.parse/defbug.s b/gas/testsuite/gas/hppa/more.parse/defbug.s new file mode 100644 index 00000000000..064caf4d3df --- /dev/null +++ b/gas/testsuite/gas/hppa/more.parse/defbug.s @@ -0,0 +1,18 @@ + .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 + .import _seterrno + .export vfork ! .label vfork ! .proc! .callinfo no_calls! .entry ! .label __vfork ! mtsp %r0,%sr0! ldil L%0xc0000004,%r1! ble R%0xc0000004(%sr0,%r1)! ldi 66 ,%r22 ! b,n yyy! b,n __vfork ! b _seterrno! copy %r28,%r26! .label yyy + add,= %r0,%r29,%r0 + copy %r0,%r28 + bv,n (%r2) + .exit + .procend diff --git a/gas/testsuite/gas/hppa/more.parse/parse.exp b/gas/testsuite/gas/hppa/more.parse/parse.exp index 50eff96ddb9..d7de98bb3c9 100755 --- a/gas/testsuite/gas/hppa/more.parse/parse.exp +++ b/gas/testsuite/gas/hppa/more.parse/parse.exp @@ -189,5 +189,13 @@ if [istarget hppa*-*-*] then { # section is created... setup_xfail hppa*-*-osf* gas_test "ssbug.s" "" "" "Check for acceptance of non-default subspaces" + + # To be compatable with certain "features" of the HP compiler + # non-existant registers should default to %r0. + gas_test "defbug.s" "" "" "Missing register should default to %%r0" + + # Make sure GAS understands a reasonable set of standard predefined + # registers. eg %rp, %dp, %sp, etc. + gas_test "stdreg.s" "" "" "Test standard predefined registers" } diff --git a/gas/testsuite/gas/hppa/more.parse/stdreg.s b/gas/testsuite/gas/hppa/more.parse/stdreg.s new file mode 100644 index 00000000000..e42978e2414 --- /dev/null +++ b/gas/testsuite/gas/hppa/more.parse/stdreg.s @@ -0,0 +1,27 @@ + .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 + .export foo +foo: + .proc + .callinfo no_calls + .entry + ldi 15,%sp + ldi 15,%rp + ldi 15,%dp + ldi 15,%ret0 + ldi 15,%ret1 + ldi 15,%arg0 + ldi 15,%arg1 + ldi 15,%arg2 + ldi 15,%arg3 + .exit + .procend diff --git a/gas/testsuite/gas/hppa/parse/.Sanitize b/gas/testsuite/gas/hppa/parse/.Sanitize index a595b4a2c6f..77e6f5aecd6 100644 --- a/gas/testsuite/gas/hppa/parse/.Sanitize +++ b/gas/testsuite/gas/hppa/parse/.Sanitize @@ -31,6 +31,7 @@ align2.s block1.s block2.s calldatabug.s +defbug.s entrybug.s exportbug.s exprbug.s @@ -43,6 +44,7 @@ parse.exp procbug.s spacebug.s ssbug.s +stdreg.s stringer.s undefbug.s versionbug.s diff --git a/gas/testsuite/gas/hppa/parse/defbug.s b/gas/testsuite/gas/hppa/parse/defbug.s new file mode 100644 index 00000000000..064caf4d3df --- /dev/null +++ b/gas/testsuite/gas/hppa/parse/defbug.s @@ -0,0 +1,18 @@ + .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 + .import _seterrno + .export vfork ! .label vfork ! .proc! .callinfo no_calls! .entry ! .label __vfork ! mtsp %r0,%sr0! ldil L%0xc0000004,%r1! ble R%0xc0000004(%sr0,%r1)! ldi 66 ,%r22 ! b,n yyy! b,n __vfork ! b _seterrno! copy %r28,%r26! .label yyy + add,= %r0,%r29,%r0 + copy %r0,%r28 + bv,n (%r2) + .exit + .procend diff --git a/gas/testsuite/gas/hppa/parse/parse.exp b/gas/testsuite/gas/hppa/parse/parse.exp index 50eff96ddb9..d7de98bb3c9 100755 --- a/gas/testsuite/gas/hppa/parse/parse.exp +++ b/gas/testsuite/gas/hppa/parse/parse.exp @@ -189,5 +189,13 @@ if [istarget hppa*-*-*] then { # section is created... setup_xfail hppa*-*-osf* gas_test "ssbug.s" "" "" "Check for acceptance of non-default subspaces" + + # To be compatable with certain "features" of the HP compiler + # non-existant registers should default to %r0. + gas_test "defbug.s" "" "" "Missing register should default to %%r0" + + # Make sure GAS understands a reasonable set of standard predefined + # registers. eg %rp, %dp, %sp, etc. + gas_test "stdreg.s" "" "" "Test standard predefined registers" } diff --git a/gas/testsuite/gas/hppa/parse/stdreg.s b/gas/testsuite/gas/hppa/parse/stdreg.s new file mode 100644 index 00000000000..e42978e2414 --- /dev/null +++ b/gas/testsuite/gas/hppa/parse/stdreg.s @@ -0,0 +1,27 @@ + .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 + .export foo +foo: + .proc + .callinfo no_calls + .entry + ldi 15,%sp + ldi 15,%rp + ldi 15,%dp + ldi 15,%ret0 + ldi 15,%ret1 + ldi 15,%arg0 + ldi 15,%arg1 + ldi 15,%arg2 + ldi 15,%arg3 + .exit + .procend