From: Richard Henderson Date: Sat, 4 Jun 2005 19:27:26 +0000 (-0700) Subject: re PR target/21888 (bootstrap failure with linker relaxation enabled) X-Git-Tag: releases/gcc-3.4.5~385 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09d6abdb4c74cc610a5834718d1b218187f829c7;p=thirdparty%2Fgcc.git re PR target/21888 (bootstrap failure with linker relaxation enabled) PR target/21888 * config/alpha/alpha.c (alpha_align_insns): Don't insert nops until we've passed initial ldgp. From-SVN: r100598 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4711afe5d618..c6ce7b86c71a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-06-04 Richard Henderson + + PR target/21888 + * config/alpha/alpha.c (alpha_align_insns): Don't insert nops + until we've passed initial ldgp. + 2005-06-01 Richard Henderson * configure.ac (HAVE_AS_JSRDIRECT_RELOCS): New. diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 4de6ac44ad24..f9aef999f12b 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -8829,7 +8829,7 @@ alpha_align_insns (unsigned int max_align, unsigned int align; /* OFS is the offset of the current insn in the insn group. */ int ofs; - int prev_in_use, in_use, len; + int prev_in_use, in_use, len, ldgp; rtx i, next; /* Let shorten branches care for assigning alignments to code labels. */ @@ -8847,6 +8847,8 @@ alpha_align_insns (unsigned int max_align, if (GET_CODE (i) == NOTE) i = next_nonnote_insn (i); + ldgp = alpha_function_needs_gp ? 8 : 0; + while (i) { next = (*next_group) (i, &in_use, &len); @@ -8903,6 +8905,10 @@ alpha_align_insns (unsigned int max_align, } } + /* We may not insert padding inside the initial ldgp sequence. */ + else if (ldgp > 0) + ldgp -= len; + /* If the group won't fit in the same INT16 as the previous, we need to add padding to keep the group together. Rather than simply leaving the insn filling to the assembler, we