<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 05/15/2013 10:53 PM, Richard Smith
wrote:<br>
</div>
<blockquote
cite="mid:CAOfiQqkYqEENTe_uPQcsT3adwoF_5EXAYwQko_DtAmPm_b1e2Q@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
On Mon, May 6, 2013 at 9:09 AM, reed kotler <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:rkotler@mips.com"
target="_blank">rkotler@mips.com</a>></span> wrote:<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 05/06/2013 08:51 AM, Rafael Espíndola
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
It's working fine just that it's ugly to see those
APP/NOAPP markers.<br>
</blockquote>
Inline assembly is inline assembly. It has the semantics
defined in<br>
the IL documentation and should all be treated uniformly.<br>
<br>
I guess I would be OK with unconditionally removing those
comments (I<br>
don't see a lot of value in them) or having different
verbosity levels<br>
for the asm output.<br>
<br>
What we should never have is a "if (this asm was created
by llvm itself)".<br>
</blockquote>
</div>
I would like to see a method in asm printer which turns on/off
these comments.<br>
It's trivial to add and use but I can't put back to this code
without permission so there is no point to write the patch if
nobody will approve it.<br>
<br>
Then I could call that method when I'm processing compiler
generated stubs that have inline<br>
assembly.<br>
<br>
Traditionally these comments are used in gcc so that when you
look at assembly code, you can tell which was generated by the
compiler and which was inline assembly the user created.<br>
</blockquote>
<div><br>
</div>
<div>This does not appear to be the case. As far as I can
discern from the available documentation, #APP and #NOAPP are
pragmas which inform the assembler's preprocessor whether it's
in "application mode" (where it needs more expensive
tokenization rules, including comment-stripping and the like)
or whether it's in "processing compiler output mode" (where it
can skip all that stuff).</div>
<div><br>
</div>
<div>That these pragmas *also* mark where the user's inline asm
ended up seems to just be a happy coincidence.</div>
</div>
</blockquote>
<br>
I've read that too in the docs but I don't think it has any meaning
here because I'm emitting the same kind of code that gcc emits; so I
should not need them. Possible it slows down compilation by some<br>
tiny amount here.<br>
<br>
It does not hurt for me to have the APP/NO_APP markers; I just don't
like to see them in the .s file.<br>
As Jim Grosbach and others have noted, if I move the inline asm
generation to another place, I won't get those. It's just because
the compiler is doing what I user would do that I'm getting them.<br>
<br>
<br>
<br>
</body>
</html>