bill rowe
2015-Mar-23 19:46 UTC
[LLVMdev] Changing The '.' Used to Prefix Labels in Assembly Output
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? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150323/f45c705c/attachment.html>
Tim Northover
2015-Mar-23 20:07 UTC
[LLVMdev] Changing The '.' Used to Prefix Labels in Assembly Output
> 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.
Ahmed Bougacha
2015-Mar-23 20:11 UTC
[LLVMdev] Changing The '.' Used to Prefix Labels in Assembly Output
On Mon, Mar 23, 2015 at 12:46 PM, bill rowe <bill.rowe.ottawa at gmail.com> 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 > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Ahmed Bougacha
2015-Mar-23 22:26 UTC
[LLVMdev] Changing The '.' Used to Prefix Labels in Assembly Output
(+llvmdev) On Mon, Mar 23, 2015 at 2:18 PM, bill rowe <bill.rowe.ottawa at gmail.com> 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 <ahmed.bougacha at gmail.com> > wrote: >> >> On Mon, Mar 23, 2015 at 12:46 PM, bill rowe <bill.rowe.ottawa at gmail.com> >> 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 >> > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> > > >