From 5c1e36e18ca9126927feab7bf131737578bed2dd Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 12 Feb 2002 11:09:41 +0000 Subject: [PATCH] * gas/hppa/reloc/reloc.exp (labelopbug.s): Change test to suit hppa_fix_adjustable change. --- gas/testsuite/ChangeLog | 5 +++ gas/testsuite/gas/hppa/reloc/reloc.exp | 43 +++++++++++++++++++------- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index df5f10881cd..dc3f40e4dcf 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2002-02-12 John David Anglin + + * gas/hppa/reloc/reloc.exp (labelopbug.s): Change test to suit + hppa_fix_adjustable change. + 2002-02-09 Richard Henderson * gas/alpha/elf-reloc-5.s, gas/alpha/elf-reloc-5.d: New. diff --git a/gas/testsuite/gas/hppa/reloc/reloc.exp b/gas/testsuite/gas/hppa/reloc/reloc.exp index 889e318c7d4..c38024fb121 100644 --- a/gas/testsuite/gas/hppa/reloc/reloc.exp +++ b/gas/testsuite/gas/hppa/reloc/reloc.exp @@ -296,18 +296,37 @@ proc do_local_label_as_operand_test {} { if [gas_test_old "labelopbug.s" "" "Local label as operand (part 1)"] { objdump_start_no_subdir "a.out" "-r" - # Check to make sure we handle difference of local lables as an operand - # to a non-branching instruction correctly. - while 1 { - expect { - -re "^0+2c\[^\n\]*0x0+24\[^\n\]*\n" - { set x [expr $x+1] } - -re "^0+30\[^\n\]*0x0+24\[^\n\]*\n" - { set x [expr $x+1] } - -re "\[^\n\]*\n" { } - timeout { perror "timeout\n"; break } - eof { break } - } + # Check to make sure we handle difference of local labels as an operand + # to a non-branching instruction correctly. On hppa elf targets, the + # R_PARISC_DIR21 and R_PARISC_DIR14R relocations are done with LR and + # RR selectors, respectively. As a result, we can't reduce these to + # section offsets without risking incorrect rounding. So, we just + # check to see if the label hasn't been reduced. + if {[istarget hppa*64*-*-*] + || [istarget hppa*-*-*elf*] || [istarget hppa*-*-linux*]} then { + while 1 { + expect { + -re "^0+2c\[^\n\]*L.0002\[^\n\]*\n" + { set x [expr $x+1] } + -re "^0+30\[^\n\]*L.0002\[^\n\]*\n" + { set x [expr $x+1] } + -re "\[^\n\]*\n" { } + timeout { perror "timeout\n"; break } + eof { break } + } + } + } else { + while 1 { + expect { + -re "^0+2c\[^\n\]*0x0+24\[^\n\]*\n" + { set x [expr $x+1] } + -re "^0+30\[^\n\]*0x0+24\[^\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 -- 2.30.2