Re: PR 51094 - fprint_w() in output_addr_const() reinstated

2012-07-12 Thread Andreas Schwab
Dimitrios Apostolou writes: > @@ -3849,6 +3850,32 @@ sprint_ul_rev (char *s, unsigned long va >return i; > } > > +/* Write a signed HOST_WIDE_INT as decimal to a file, fast. */ > + > +void > +fprint_w (FILE *f, HOST_WIDE_INT value) > +{ > + /* python says: len(str(2**64)) == 20 */ > + ch

Re: PR 51094 - fprint_w() in output_addr_const() reinstated

2012-07-11 Thread Mike Stump
On Jul 9, 2012, at 12:54 PM, Dimitrios Apostolou wrote: > Since output_addr_const() shows pretty hot in the compiler, I reinstated the > fprint_w() call in place of fprintf(). My review bits... First there is no guarantee that HOST_WIDE_INT_BITSIZE is 64 or less, so [20] is unsafe longer term.

Re: PR 51094 - fprint_w() in output_addr_const() reinstated

2012-07-11 Thread Hans-Peter Nilsson
On Mon, 9 Jul 2012, Dimitrios Apostolou wrote: > Since output_addr_const() shows pretty hot in the compiler, I reinstated the > fprint_w() call in place of fprintf(). > > This patch relies on two things: 2's complement representation for negative > int and that HOST_WIDE_INT is at least as large ty