This patch was reviewed internally at mips.<br><br>clang actually does print the pseudo when you compile with "-S". The function which does the pseudo-to-real expansion is called only if OutStreamer.hasRawTextSupport() returns false:<br>
<br>+    if (!OutStreamer.hasRawTextSupport()){<br><br><br>But I realize now that perhaps this expansion should happen in MCCodeEmitter::EncodeInstruction as you suggest. The purpose of this patch was to change the function to do a mcinst-to-mcinst conversion to make it available to both direct object emitter and assembler. If the function is called in MCCodeEmitter::EncodeInstruction, then that will take care of both cases.<br>
<br><br><div class="gmail_quote">On Thu, Sep 13, 2012 at 6:09 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 5 September 2012 22:31, Jack Carter <<a href="mailto:jcarter@mips.com">jcarter@mips.com</a>> wrote:<br>
> Author: jacksprat<br>
> Date: Wed Sep  5 21:31:34 2012<br>
> New Revision: 163287<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=163287&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=163287&view=rev</a><br>
> Log:<br>
> There are some Mips instructions that are lowered by the<br>
> assembler such as shifts greater than 32. In the case<br>
> of direct object, the code gen needs to do this lowering<br>
> since the assembler is not involved.<br>
><br>
> With the advent of the llvm-mc assembler, it also needs<br>
> to do the same lowering.<br>
><br>
> This patch makes that specific lowering code accessible<br>
> to both the direct object output and the assembler.<br>
><br>
> This patch does not affect generated output.<br>
<br>
</div>Has this patch been reviewed? It doesn't look like the best solution.<br>
If I understand it correctly, there is a pseudo instruction that the<br>
mips assembler turns into a real instruction. This looks really<br>
similar to the .cfi pseudo instructions. The way we handle them is<br>
<br>
* Codegen just uses a regular MCStreamer interface to print the pseudo<br>
instruction.<br>
* The Asm streamer prints the text representation of the pseudo instruction.<br>
* The object streamer expands it into the "real stuff".<br>
<br>
The user observed difference is that "clang -S" uses the pseudo<br>
instruction, which is a good thing, no?<br>
<br>
Cheers,<br>
Rafael<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br>