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]

[RFC PATCH, i386]: Some cleanups involving fprintfs through the source


Hello!

Attached patch concatenates various string #defines with the rest of strings. So, instead of using

fprintf (some_file, "%s%s...\n", ASM_LONG, LPREFIX, ...)

we change this to

fprintf (some_file, ASM_LONG LPREFIX "...\n", ...)

or - where appropriate

fputs ( STRING1 STRING2 "...", some_file)

(taking care of %% to % change), or even

putc ('?', some_file).

This patch changes i386.c, but there are numerous other opportunities in *.h files.

2009-07-23 Uros Bizjak <ubizjak@gmail.com>

    * config/i386/i386.c: Use ASM_LONG instead of .long.  Concatenate
    ASM_LONG, LPREFIX, MCOUNT_NAME and PROFILE_COUNT_REGISTER strings
    with the rest of string where appropriate.  Use fputs or putc
    instead of fprintf where appropriate.

Patch was bootstrapped and regression tested on x86_64-pc-linux-gnu.

Any comments on this approach?

Thanks,
Uros.

Attachment: p.diff.txt
Description: Text document


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