[llvm] r192265 - Add a paragraph about MCTargetStreamer.

Quentin Colombet qcolombet at apple.com
Wed Oct 9 10:20:16 PDT 2013


Hi Rafael,

Thanks for this adding!

I think we could also give more information on how to set this information.
In particular, I think it may be useful to explain the need of a call to TargetRegistry::RegisterXXXStreamer and quickly explain what the registered function is supposed to do (basically, create the related MCTargetStreamer and pass it down to the default createXXXStreamer).
Mentioning or directly putting code fragment from Mips (or ARM) as an example may greatly help.

Thanks again.

Cheers,
-Quentin

On Oct 8, 2013, at 7:05 PM, Rafael Espindola <rafael.espindola at gmail.com> wrote:

> Author: rafael
> Date: Tue Oct  8 21:05:08 2013
> New Revision: 192265
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=192265&view=rev
> Log:
> Add a paragraph about MCTargetStreamer.
> 
> Modified:
>    llvm/trunk/docs/CodeGenerator.rst
> 
> Modified: llvm/trunk/docs/CodeGenerator.rst
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CodeGenerator.rst?rev=192265&r1=192264&r2=192265&view=diff
> ==============================================================================
> --- llvm/trunk/docs/CodeGenerator.rst (original)
> +++ llvm/trunk/docs/CodeGenerator.rst Tue Oct  8 21:05:08 2013
> @@ -636,6 +636,13 @@ file (MCObjectStreamer).  MCAsmStreamer
> that prints out a directive for each method (e.g. ``EmitValue -> .byte``), but
> MCObjectStreamer implements a full assembler.
> 
> +For target specific directives, the MCStreamer has a MCTargetStreamer instance.
> +Each target that needs it defines a class that inherits from it and is a lot
> +like MCStreamer itself: It has one method per directive and two classes that
> +inherit from it, a target object streamer and a target asm streamer. The target
> +asm streamer just prints it (``emitFnStart -> .fnstrart``), and the object
> +streamer implement the assembler logic for it.
> +
> The ``MCContext`` class
> -----------------------
> 
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131009/d54767ae/attachment.html>


More information about the llvm-commits mailing list