This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: demand_empty_rest_of_line and ignore_rest_of_line
Hans-Peter Nilsson <hp@bitrange.com> writes:
> On Mon, 26 Apr 2004, Zack Weinberg wrote:
>> I'm talking about the 192 places in the GCC source code where "APP" or
>> "NO_APP" or other names related to emitting these strings in assembly
>> appear. If it were one, I'd not be complaining. Two or three even,
>> ok. 192, not cool.
>>
>> (number got by running "find . -type f | grep -v CVS | grep -v ChangeLog |
>> xargs egrep '(\<APP\>|\<NO_APP\>|APP_ON|APP_OFF|app_on|app_off)' | wc -l"
>> in a CVS checkout - yes, documentation deliberately included).
>
> Seems you're counting occurrences in individual target files as
> well.
Quite deliberately. I said I'd not be complaining if this crap
appeared in one place, and I meant one place. In the entire source
tree. Which is hyperbole; but I do think the impact on the sources
could be narrowed down quite a bit, along the following lines:
- completely decouple it from TARGET_ASM_FILE_START. GAS wants to see
it as the very first thing in the file, and it's supposed to be a
comment so no one else should care if it e.g. comes ahead of a
.file directive. So emit it from init_asm_output before
targetm.asm_out.file_start. Actually, fold all of
default_file_start into init_asm_output.
- eliminate ASM_APP_ON/OFF entirely; the words "NO_APP" and "APP"
should be invariant, the comment character should be
ASM_COMMENT_START (which ought to get target-hook-ized with a
sensible default, "#" looks good).
- think of a saner way to do what alpha.h is currently doing with
ASM_APP_ON/OFF.
- overhaul final_scan_insn so it's not such a horrible mess.
But I'd rather spend time thinking about how to make GAS faster so it
can all go away.
zw