]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix a sparc PIC problem
authorBernd Schmidt <bernds@redhat.co.uk>
Fri, 29 Dec 2000 16:02:01 +0000 (16:02 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Fri, 29 Dec 2000 16:02:01 +0000 (16:02 +0000)
From-SVN: r38539

gcc/ChangeLog
gcc/config/sparc/sparc.c

index 58b900f20db0e2352c3a30cf58278dcd6c325d81..c990d82b9b6ed163b48abe8f90900e1609ba7d34 100644 (file)
@@ -3,6 +3,9 @@
        * combine.c (cant_combine_insn_p): Only restrict hard register
        combinations for SMALL_REGISTER_CLASSES machines.
 
+       * config/sparc/sparc.c (pic_address_needs_scratch): LABEL_REFs are
+       not valid pic operands.
+
 2000-12-22  Bernd Schmidt  <bernds@redhat.co.uk>
 
        * calls.c (emit_call_1): Fall back to call_pop/call_value_pop if no
index 45862a77bc730f655027d0e3d088c7406580527c..6d2d44ff8298a86e173154c0fcc8526c68d35437 100644 (file)
@@ -2429,6 +2429,9 @@ int
 pic_address_needs_scratch (x)
      rtx x;
 {
+  if (GET_CODE (x) == LABEL_REF)
+    return 1;
+
   /* An address which is a symbolic plus a non SMALL_INT needs a temp reg.  */
   if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == PLUS
       && GET_CODE (XEXP (XEXP (x, 0), 0)) == SYMBOL_REF