* gas/hppa/reloc/reloc.exp (labelopbug.s): Change test to suit
authorAlan Modra <amodra@gmail.com>
Tue, 12 Feb 2002 11:09:41 +0000 (11:09 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 12 Feb 2002 11:09:41 +0000 (11:09 +0000)
hppa_fix_adjustable change.

gas/testsuite/ChangeLog
gas/testsuite/gas/hppa/reloc/reloc.exp

index df5f10881cd9321361b70c6204eced31ebe75980..dc3f40e4dcf4f6b0dc6bda37271b5222b3d101e6 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-12  John David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+       * gas/hppa/reloc/reloc.exp (labelopbug.s): Change test to suit
+       hppa_fix_adjustable change.
+
 2002-02-09  Richard Henderson  <rth@redhat.com>
 
        * gas/alpha/elf-reloc-5.s, gas/alpha/elf-reloc-5.d: New.
index 889e318c7d4bf73a156b527e35bd54155beb8a39..c38024fb121aae9bd34ddc7ca4c053488ba370c9 100644 (file)
@@ -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