Changing The '.' Used to Prefix Labels in Assembly Output

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing The '.' Used to Prefix Labels in Assembly Output

bill rowe
I'm working on an LLVM back end with output to assembly file (.s). I'm using the ARM assembly printer.
The generated labels (e.g. for a while statement) start with '.' like .LBB0_1
I would like to change the '.' to something else (specifically $$ if it matters).
I see a lot of customizability in targetinfo.cpp but not that particular item.

Where should I be looking?


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Changing The '.' Used to Prefix Labels in Assembly Output

Tim Northover-2
> The generated labels (e.g. for a while statement) start with '.' like
> .LBB0_1
> I would like to change the '.' to something else (specifically $$ if it
> matters).
> I see a lot of customizability in targetinfo.cpp but not that particular
> item.

I think you probably want the MCAsmInfo members (PrivateLabelPrefix,
for example).

Cheers.

Tim.
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Changing The '.' Used to Prefix Labels in Assembly Output

Ahmed Bougacha
In reply to this post by bill rowe
On Mon, Mar 23, 2015 at 12:46 PM, bill rowe <[hidden email]> wrote:

> I'm working on an LLVM back end with output to assembly file (.s). I'm using
> the ARM assembly printer.
> The generated labels (e.g. for a while statement) start with '.' like
> .LBB0_1
> I would like to change the '.' to something else (specifically $$ if it
> matters).
> I see a lot of customizability in targetinfo.cpp but not that particular
> item.
>
> Where should I be looking?

I believe MCAsmInfo is what you're looking for. (for ARM, in
lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp)

-Ahmed

>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Changing The '.' Used to Prefix Labels in Assembly Output

Ahmed Bougacha
(+llvmdev)

On Mon, Mar 23, 2015 at 2:18 PM, bill rowe <[hidden email]> wrote:
> Thanks.  Thats sounds exactly the right thing.
>
> I couldn't actually find any instance of PrivateLabelPrefix though.

It might not be used directly by ARMMCAsmInfo.cpp, as there's a class
hierarchy mirroring the object file formats/platforms/target
relationships (doxygen is helpful for this kind of thing:
http://llvm.org/doxygen/)

See the MCAsmInfo class declaration for the base class:
include/llvm/MC/MCAsmInfo.h

-Ahmed

> I do
> see PrivateGlobalPrefix which doesn't sound quite as right but was set to
> ".L".  Changing it to "$$L" didn't affect anything.

> On Mon, Mar 23, 2015 at 4:11 PM, Ahmed Bougacha <[hidden email]>
> wrote:
>>
>> On Mon, Mar 23, 2015 at 12:46 PM, bill rowe <[hidden email]>
>> wrote:
>> > I'm working on an LLVM back end with output to assembly file (.s). I'm
>> > using
>> > the ARM assembly printer.
>> > The generated labels (e.g. for a while statement) start with '.' like
>> > .LBB0_1
>> > I would like to change the '.' to something else (specifically $$ if it
>> > matters).
>> > I see a lot of customizability in targetinfo.cpp but not that particular
>> > item.
>> >
>> > Where should I be looking?
>>
>> I believe MCAsmInfo is what you're looking for. (for ARM, in
>> lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp)
>>
>> -Ahmed
>>
>> >
>> > _______________________________________________
>> > LLVM Developers mailing list
>> > [hidden email]         http://llvm.cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>> >
>
>
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev