<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><base href="x-msg://32749/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>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).</div><div><br></div><div>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.</div><div><br></div><div>-Jim</div><br><div><div>On Dec 3, 2012, at 12:31 PM, "Carter, Jack" <<a href="mailto:jcarter@mips.com">jcarter@mips.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; direction: ltr; font-family: Tahoma; font-size: 10pt; "><div style="font-family: 'Times New Roman'; font-size: 16px; "><br class="Apple-interchange-newline"><hr tabindex="-1"><div id="divRpF151893" style="direction: ltr; "><font face="Tahoma" size="2">So<font size="2"><span class="Apple-converted-space"> </span>you are saying<span class="Apple-converted-space"> </span><font size="2">is that SubT<font size="2">argetInfo is OK and an<font size="2">ything that such as PIC<font size="2">/CPIC that I ne<font size="2">ed would just get added to that?<span class="Apple-converted-space"> </span><br><br><font size="2">Yes, I need to<span class="Apple-converted-space"> </span><font size="2">know and mark e_flags with EF_MIPS_PIC i<font size="2">f<span class="Apple-converted-space"> </span><font size="2">we<span class="Apple-converted-space"> </span><font size="2">are not compil<font size="2">ing static (non-shared).<span class="Apple-converted-space"> </span><br><br><font size="2">I would be good with that.<font size="2"><font size="2"><span class="Apple-converted-space"> </span></font></font></font><br><br><font size="2">Jack</font><br><font size="2"></font><br></font></font></font></font></font></font></font></font></font></font></font></font></font><b><br>From:</b><span class="Apple-converted-space"> </span>Jim Grosbach [<a href="mailto:grosbach@apple.com">grosbach@apple.com</a>]<br><b>Sent:</b><span class="Apple-converted-space"> </span>Monday, December 03, 2012 12:04 PM<br><b>To:</b><span class="Apple-converted-space"> </span>Carter, Jack<br><b>Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [PATCH] Review request: MC access to target and subtarget machine info<br><br></div><div></div><div>Hi Jack,<div><br></div><div>TargetMachine is deliberately not available in any MC layer code, as it's part of the CodeGen layer.</div><div><br></div><div>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.</div><div><br></div><div>-Jim</div></div></div></div></blockquote></div><br></body></html>