[llvm-commits] [PATCH] Review request: MC access to target and subtarget machine info
Jim Grosbach
grosbach at apple.com
Mon Dec 3 12:38:24 PST 2012
PIC vs. non-PIC is a different sort of thing. Often, that sort of thing for .o file flags are handled via assembler directives (see, for example, the .cpu and .fpu directives in ARM, for example).
The whole ARMAsmPrinter::emitAttributes() may be a useful example, as what it's doing seems pretty similar to what you're looking for. It uses the MCSubtargetInfo for lots of its information, but not all of it.
-Jim
On Dec 3, 2012, at 12:31 PM, "Carter, Jack" <jcarter at mips.com> wrote:
>
> So you are saying is that SubTargetInfo is OK and anything that such as PIC/CPIC that I need would just get added to that?
>
> Yes, I need to know and mark e_flags with EF_MIPS_PIC if we are not compiling static (non-shared).
>
> I would be good with that.
>
> Jack
>
>
> From: Jim Grosbach [grosbach at apple.com]
> Sent: Monday, December 03, 2012 12:04 PM
> To: Carter, Jack
> Cc: llvm-commits at cs.uiuc.edu
> Subject: Re: [PATCH] Review request: MC access to target and subtarget machine info
>
> Hi Jack,
>
> TargetMachine is deliberately not available in any MC layer code, as it's part of the CodeGen layer.
>
> You probably want something along the lines of the features bit mask in MCSubtargetInfo. The ARM assembler has some examples of using that for related things.
>
> -Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121203/9a44c108/attachment.html>
More information about the llvm-commits
mailing list