This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

Re: some ideas to gnu as


Hi Miro,

Thanks for the feedback.

1. Local labels. I don't know where comes the idea of gnu as' local labels from but it's something totally different I'm using everyday.

etc. You see the idea -- I can use dotted prefix in every local label, it's not explicitly exported much like gnu as L-labels but I can reuse the name in every new block! It's extremely handy when you have let's say 20 subroutines in one asm file and every of that routines has some simple loop -- so instead of creating labels like routine1_loop I use just ".loop" everywhere. Quite handy, isn't it?

Is that really so different from GAS's local labels ? With gas you can use, eg "1:" in place of ".loop" and then just refer to the most recent definition with "1b". Not a lot of difference from the way you are using local labels.



2. "|" comments. I know, there's --bitwise-or option but in this case "#" has to be used as comment (I don't count /* */ because it's quite unpractical for one line comments and "//" doesn't work) and this is very confusing with using of "#" for immediate constants... Is there any reason why ";" and "*" symbols aren't used for this?

They certainly can be. But GAS is often hampered by the fact that it needs to be compatible with the assembler syntax specified by the CPU builder and this syntax often uses these characters for other purposes.


(at least for this platform where it's really standard?)

Have a look at the definitions of line_comment_chars and line_separator_chars in gas/config/tc-m68k.c. You will see that currently ";" is used as a line separator, so changing it to a comment-start character would probably break lots of peoples assembler sources. The "*" character however is already set up to be a line comment character, so you should be able to use it for comments.

Of course one of the great things about free software is that you have access to the source code, so you can modify it to suit your own needs...

Cheers
  Nick



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