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 type as long for all platforms > (will it always be?). > > Bootstrapped/tested on i386, regtested on x86_64 multilib, i386-pc-solaris2.10 > (thanks ro), i686-darwin9 (thanks iains). > > > 2012-07-09 Dimitrios Apostolou <ji...@gmx.net> > > * final.c, output.h (fprint_w): New function to write a > HOST_WIDE_INT to a file, fast. > * final.c (output_addr_const): Use fprint_w() instead of > fprintf(). > (sprint_ul_rev): New static function to write a > HOST_WIDE_INT to a string in reverse, fast.
(Non-inlined patch, so I can't quote the patch in pine.) Non-approver review: looks ok besides a few cases of comment formatting nits: punctuation at end and two spaces: ". */" You had it right in the first sentence. (The original wasn't right either.) Maybe also add a comment about how much faster than fprintf this is, besides the ", fast". brgds, H-P