From: Bernd Schmidt Date: Fri, 29 Dec 2000 16:02:01 +0000 (+0000) Subject: Fix a sparc PIC problem X-Git-Tag: prereleases/gcc-2.95.3-test1~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ca1f135bd6f5c45699ac841146343f1924e4b7a;p=thirdparty%2Fgcc.git Fix a sparc PIC problem From-SVN: r38539 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 58b900f20db0..c990d82b9b6e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 * calls.c (emit_call_1): Fall back to call_pop/call_value_pop if no diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 45862a77bc73..6d2d44ff8298 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -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