* gas/hppa/reloc/exitbug.s: New test.

* gas/hppa/reloc/reloc.exp: Run it.
This commit is contained in:
Jeff Law 1993-11-24 09:26:23 +00:00
parent 31a385d17a
commit 64f591aea9
4 changed files with 74 additions and 7 deletions

View File

@ -1,5 +1,14 @@
Wed Nov 24 01:25:03 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
* gas/hppa/reloc/exitbug.s: New test.
* gas/hppa/reloc/reloc.exp: Run it.
Sun Nov 21 22:11:10 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
* gas/hppa/reloc/reloc.exp: Minor fixes so that SOM & ELF can
share the same test code.
* gas/hppa/reloc/relocreduce.s: Likewise.
* gas/hppa/basic/fmem.s: Add quadword FP store instructions.
* gas/hppa/basic/basic.exp: Test quadword FP store instructions.

View File

@ -28,6 +28,7 @@ Things-to-keep:
blebug.s
blebug2.s
exitbug.s
labelopbug.s
plabelbug.s
reloc.exp

View File

@ -0,0 +1,19 @@
.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
.IMPORT $global$,DATA
.IMPORT $$dyncall,MILLICODE
; gcc_compiled.:
.SPACE $TEXT$
.SUBSPA $CODE$
.align 4
.EXPORT foo,CODE
.EXPORT foo,ENTRY,PRIV_LEV=3
foo:
.PROC
.CALLINFO FRAME=0
.PROCEND

View File

@ -31,7 +31,7 @@ proc do_ble_relocation_test {} {
# a PC-relative relocation for a BLE instruction.
while 1 {
expect {
-re "^00000004\[^\n\]*ABS_CALL_R17\[^\n\]*\n" { set x 1 }
-re "^00000004\[^\n\]*ABS_CALL\[^\n\]*\n" { set x 1 }
-re "\[^\n\]*\n" { }
timeout { error "timeout\n"; break }
eof { break }
@ -59,10 +59,10 @@ proc do_relocation_reduction_tests {} {
# Doing so makes generating parameter relocation stubs impossible.
while 1 {
expect {
-re "^00000000\[^\n\]*PLABEL\[^\n\]*foo\[^\n\]*\n"
-re "^00000004\[^\n\]*PLABEL\[^\n\]*foo\[^\n\]*\n"
{ set x [expr $x+1] }
-re "^00000014\[^\n\]*PCREL_CALL\[^\n\]*foo\[^\n\]*\n"
{ set x [expr $x+1] }
-re "^0000001c\[^\n\]*PCREL_CALL\[^\n\]*foo\[^\n\]*\n"
{ set x [4xpr $x+1] }
-re "\[^\n\]*\n" { }
timeout { error "timeout\n"; break }
eof { break }
@ -113,8 +113,10 @@ proc do_plabel_relocation_test {} {
# Check that we make PLABEL relocation entries when they're needed.
while 1 {
expect {
-re "^00000000\[^\n\]*PLABEL\[^\n\]*\n" { set x [expr $x+1] }
-re "^00000004\[^\n\]*PLABEL\[^\n\]*\n" { set x [expr $x+1] }
-re "^\[04\]0000000\[^\n\]*PLABEL\[^\n\]*\n"
{ set x [expr $x+1] }
-re "^\[04\]0000004\[^\n\]*PLABEL\[^\n\]*\n"
{ set x [expr $x+1] }
-re "\[^\n\]*\n" { }
timeout { error "timeout\n"; break }
eof { break }
@ -205,6 +207,39 @@ proc do_local_label_as_operand_test {} {
}
}
proc do_exit_relocation_test {} {
set testname "exitbug.s: Test for bogus R_EXIT relocation (part 2)"
set x 0
# Elf (osf) does not use ENTRY/EXIT relocations.
# I guess we could look at the unwind subspaces it builds...
if [istarget hppa*-*-osf*] then {
return;
}
if [gas_test_old "exitbug.s" "" "Test for bogus R_EXIT relocation (part 1)"] {
objdump_start_no_subdir "a.out" "-r"
# Note that a match here is really a FAILURE!
while 1 {
expect {
-re "^00000000\[^\n\]*R_EXIT\[^\n\]*\n"
{ set x [expr $x+1] }
-re "\[^\n\]*\n" { }
timeout { error "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.
objdump_finish
# Did we find what we were looking for? If not, flunk it.
if [expr $x==0] then { pass $testname } else { fail $testname }
}
}
if [istarget hppa*-*-*] then {
# Make sure we put the right relocation entry on a BLE instruction.
do_ble_relocation_test
@ -214,7 +249,6 @@ if [istarget hppa*-*-*] then {
do_relocation_reduction_tests
# Check that mode selectors on a ble instruction actually work.
setup_xfail hppa*-*-*
do_ble_mode_selector_test
# 1.36 simply didn't generate all the plabels it should have. Make
@ -229,4 +263,8 @@ if [istarget hppa*-*-*] then {
# easier on the optimizing linker. Until then just make sure the
# difference is computed correctly.
do_local_label_as_operand_test
# GAS2 incorrectly generated R_EXIT relocations when .exit directives
# were not in the source code.
do_exit_relocation_test
}