<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Mar 11, 2014 at 6:42 PM, lin zuojian <span dir="ltr"><<a href="mailto:manjian2006@gmail.com" target="_blank">manjian2006@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
here's my patch & testcase. I don't know where to put the testcase<br>
file.So I just drop it to the root path.<br></blockquote><div><br></div><div>This is a known issue" and is considered a feature. There was previous discussion on this topic on llvmdev. If you wish to do this, simply compile with -S -fno-integrated-as and clang should do what you desire.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Index: lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp<br>
===================================================================<br>
--- lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp (revision 203630)<br>
+++ lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp (working copy)<br>
@@ -78,6 +78,11 @@<br>
if (isNullTerminated)<br>
Str = Str.substr(0, Str.size()-1);<br>
<br>
+ // If the output streamer is actually a .s file, just emit the blob textually.<br>
+ if (OutStreamer.hasRawTextSupport()) {<br>
+ OutStreamer.EmitRawText(Str);<br>
+ return;<br>
+ }<br>
// If the output streamer does not have mature MC support or the integrated<br>
// assembler has been disabled, just emit the blob textually.<br>
// Otherwise parse the asm and emit it via MC support.<br>
Index: test-emit-s-file.cpp<br>
===================================================================<br>
--- test-emit-s-file.cpp (revision 0)<br>
+++ test-emit-s-file.cpp (working copy)<br>
@@ -0,0 +1,9 @@<br>
+// RUN: clang -S -o - %s | FileCheck %s<br>
+void foo() {<br>
+ // CHECK:vp8_block_coeff EQU $8<br>
+ asm("\n"<br>
+ "vp8_block_coeff"<br>
+ " EQU %0"<br>
+ :<br>
+ : "i"(8));<br>
+}<br>
<br>
---<br>
Regards<br>
<span class="HOEnZb"><font color="#888888">lin zuojian<br>
_______________________________________________<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>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org
</div></div>