This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Re: Fix PR 13987 (compile time regression), try 2


Andrew Pinski wrote:

>* hard-reg-set.h (HARD_REG_ELT_TYPE): Define based on HOST_WIDEST_FAST_INT
>instead of HOST_WIDE_INT.
>(HARD_REG_SET_LONGS): Likewise.
>(UHOST_BITS_PER_WIDE_INT): Likewise.
>Change the checks for the fast cases to be based on
>HOST_BITS_PER_WIDES_FAST_INT instead of HOST_BITS_PER_WIDE_INT.

This breaks bootstrap on s390-ibm-linux, because hardregset_to_string
depends on the internal format of HARD_REG_SET, and hasn't been adapted
to reflect this change.

Fixed by the following patch.

Bootstrapped/regtested on s390-ibm-linux and s390x-ibm-linux,
applied to mainline as obvious.

Bye,
Ulrich


ChangeLog:

	* ra-colorize.c (hardregset_to_string): Adapt to HARD_REG_SET
	implementation changes.

Index: gcc/ra-colorize.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ra-colorize.c,v
retrieving revision 1.20
diff -c -p -r1.20 ra-colorize.c
*** gcc/ra-colorize.c	29 Jul 2004 14:49:22 -0000	1.20
--- gcc/ra-colorize.c	9 Sep 2004 17:12:39 -0000
*************** static char *
*** 1126,1140 ****
  hardregset_to_string (HARD_REG_SET s)
  {
    static char string[/*FIRST_PSEUDO_REGISTER + 30*/1024];
! #if FIRST_PSEUDO_REGISTER <= HOST_BITS_PER_WIDE_INT
!   sprintf (string, HOST_WIDE_INT_PRINT_HEX, s);
  #else
    char *c = string;
    int i,j;
    c += sprintf (c, "{ ");
    for (i = 0;i < HARD_REG_SET_LONGS; i++)
      {
!       for (j = 0; j < HOST_BITS_PER_WIDE_INT; j++)
  	  c += sprintf (c, "%s", ( 1 << j) & s[i] ? "1" : "0");
        c += sprintf (c, "%s", i ? ", " : "");
      }
--- 1126,1140 ----
  hardregset_to_string (HARD_REG_SET s)
  {
    static char string[/*FIRST_PSEUDO_REGISTER + 30*/1024];
! #if FIRST_PSEUDO_REGISTER <= HOST_BITS_PER_WIDEST_FAST_INT
!   sprintf (string, HOST_WIDE_INT_PRINT_HEX, (HOST_WIDE_INT) s);
  #else
    char *c = string;
    int i,j;
    c += sprintf (c, "{ ");
    for (i = 0;i < HARD_REG_SET_LONGS; i++)
      {
!       for (j = 0; j < HOST_BITS_PER_WIDEST_FAST_INT; j++)
  	  c += sprintf (c, "%s", ( 1 << j) & s[i] ? "1" : "0");
        c += sprintf (c, "%s", i ? ", " : "");
      }
-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]