[LLVMdev] AsmPrinter behavior
Nathan Jeffords
blunted2night at gmail.com
Fri May 7 13:00:57 PDT 2010
On Fri, May 7, 2010 at 12:58 PM, Chris Lattner <clattner at apple.com> wrote:
>
> On May 7, 2010, at 11:42 AM, Nathan Jeffords wrote:
>
> $ llc t.ll -o - -mtriple=i386-apple-darwin10
>>> .section __TEXT,__text,regular,pure_instructions
>>> .zerofill __DATA,__bss,_tst1,4,0 ## @tst1
>>> .section __DATA,__data
>>> _tst2: ## @tst2
>>> .ascii "\000\001\002\003"
>>>
>>
>> I think we should have an 'EmitZeroFill()' and 'EmitASCII()' OutStream
>> methods, the latter to deal with dllexports in '
>> lib/Target/X86/AsmPrinter/AsmPrinter.cpp:569'.
>>
>> We also need to sort out COFF TLOF, and get rid of the directive stuff.
>>
>>
>> It looks to me that you should have an Emit method for the .scl, .def,
>> .type, .endef directives. One callback each.
>>
>> -Chris
>>
>
> I've had included a EmitCOFFSymbolDef in MCStreamer to replace the
> EmitRawText that was handling this, seem to me it would be easier to have a
> single call given the restrictions on their use.
>
>
> Sure, whatever you guys think is best. It is also very reasonable to add
> new enums to MCSymbolAttr if EmitSymbolAttribute is the right callback for
> these.
>
> -Chris
>
I could see that working for the object file exporter, but I think it would
be tricky to get the write assembly output.
-Nathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100507/539b2b0f/attachment.html>
More information about the llvm-dev
mailing list