some ideas to gnu as
Nick Clifton
nickc@redhat.com
Wed May 28 14:26:00 GMT 2008
Hi Miro,
> Hoho, so I certainly didn't understand it well then! So only difference
> is I don't use named labels (which is pity but not that unusable at all)
> but 1..9 instead?
Actually any positive integer will work, not just 1..9.
> As I see it, it's much error-prone than that named
> labels, esp. in some more complicated constructions with 6-7 local
> labels...
True, although GAS's implementation does have the advantage that you can
make forward references to local labels as well as backwards references.
So that for example:
foo 1f
1: ; <--- first local label
bar 1b
baz 1f
1: ; <--- second local label
Here both foo and bar refer to the first local label and baz refers to
the second local label. As I understand it from your description of the
local labels that you are used to, you cannot make forward references,
correct ?
> but in principle, do you have something against "my" version
> of local labels?
In principle no, although stylistically yes. Gas has always treated the
period character (.), when it appears as the first character in a
symbol, as indicating the start of a pseudo-operator. (eg .global,
.word, .text etc). So it would be very confusing if a dot prefix were
used also to introduce a local label. Maybe if you introduced a new
pseudo-operator, eg ".local", and used that instead it would be better. ie:
.local loop
foo
foo
b loop
Cheers
Nick
More information about the Binutils
mailing list