[PATCH][AsmParser][MC] Allow asm parser to emit elf header flags

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Oct 25 14:04:52 PDT 2013


On 25 October 2013 15:16, Jack Carter <Jack.Carter at imgtec.com> wrote:
> Rafael,
>
> I believe the following is all you are trying to get across to us:
>
> The main point is that for every line of ascii assembler code that can be written out, a streamer method must represent it so that AsmPrinter will just be making one generic call for each of them oblivious of the output type. The underlying streamer type would determine the form of the output.  AsmParser would use the same interface.

Correct.

> Non-assembler code output such as commandline information is to be output through different methods and not through the streamer since it is not going to be seen in a resultant .s file.

Correct.

> If it can be seen in a .s file it goes through the streamer. If not, it doesn't.

Correct.

> There may be a single method for any directive that changes/sets the relocation model. It would not only be used of .abicalls, but also for -call_nonpic, -call_shared, -KPIC, -non_shared, etc.

Normally there is one method per directive, but there is some
flexibility if two directives are closely related.


> There may be another method (emitMipsArchDir) that would handle the -mips[1-4], -mips32r2, etc.

Sorry, what is -mips32r2 a command line option?

> Is this a reasonable definition?
>
> Jack

Cheers,
Rafael




More information about the llvm-commits mailing list