[llvm-commits] [llvm] r84037 - /llvm/trunk/docs/LangRef.html

Dale Johannesen dalej at apple.com
Tue Oct 13 15:20:56 PDT 2009


On Oct 13, 2009, at 3:12 PM, Sandeep Patel wrote:

> I'm trying to wrap my head around the semantics of this. Is this the
> same as having the containing function be naked, or is it just saying
> that there's no call in the asm?

Neither.  It says the asm came originally from the 'asm blocks'  
extension as used by
Apple GCC, MSVS and CodeWarrior (all slightly different in  
undocumented ways of course),
as opposed to gcc-style asm.  I don't think a more complete  
description belongs in the IR document.

One effect is that functions containing only asms that are not marked  
as coming from asm blocks will not
have the stack aligned (PR 5125).  This isn't in yet.

> deep
>
> On Tue, Oct 13, 2009 at 9:56 PM, Dale Johannesen <dalej at apple.com>  
> wrote:
>> Author: johannes
>> Date: Tue Oct 13 16:56:55 2009
>> New Revision: 84037
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=84037&view=rev
>> Log:
>> Documentation for the new msasm flag, which is no
>> worse than the rest of the asm documentation.
>>
>>
>> Modified:
>>    llvm/trunk/docs/LangRef.html
>>
>> Modified: llvm/trunk/docs/LangRef.html
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=84037&r1=84036&r2=84037&view=diff
>>
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> =====================================================================
>> --- llvm/trunk/docs/LangRef.html (original)
>> +++ llvm/trunk/docs/LangRef.html Tue Oct 13 16:56:55 2009
>> @@ -2338,8 +2338,10 @@
>>    to <a href="#moduleasm"> Module-Level Inline Assembly</a>)  
>> through the use of
>>    a special value.  This value represents the inline assembler as  
>> a string
>>    (containing the instructions to emit), a list of operand  
>> constraints (stored
>> -   as a string), and a flag that indicates whether or not the  
>> inline asm
>> -   expression has side effects.  An example inline assembler  
>> expression is:</p>
>> +   as a string), a flag that indicates whether or not the inline asm
>> +   expression has side effects, and a flag indicating whether the  
>> asm came
>> +   originally from an asm block.  An example inline assembler
>> +   expression is:</p>
>>
>>  <div class="doc_code">
>>  <pre>
>> @@ -2367,6 +2369,18 @@
>>  </pre>
>>  </div>
>>
>> +<p>Inline asms derived from asm blocks are similarly marked with the
>> +   '<tt>msasm</tt>' keyword:</p>
>> +
>> +<div class="doc_code">
>> +<pre>
>> +call void asm msasm "eieio", ""()
>> +</pre>
>> +</div>
>> +
>> +<p>If both keywords appear the '<tt>sideeffect</tt>' keyword must  
>> come
>> +   first.</p>
>> +
>>  <p>TODO: The format of the asm and constraints string still need  
>> to be
>>    documented here.  Constraints on what can be done (e.g.  
>> duplication, moving,
>>    etc need to be documented).  This is probably best done by  
>> reference to
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>




More information about the llvm-commits mailing list