Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Changes between Version 6 and Version 7 of InlineAsmExpressions

Show
Ignore:
Author:
lindquist (IP: 83.89.208.70)
Timestamp:
03/28/09 16:10:33 (15 years ago)
Comment:

more ranting

Legend:

Unmodified
Added
Removed
Modified
  • InlineAsmExpressions

    v6 v7  
    11= Inline Assembly Expressions = 
     2Inline assembly expressions are useful when the D asm statement is not yet available, or when the limitations or it being a statement are problematic. Being an expression, extended inline expressions are able to return values! 
     3 
     4Additionally issues regarding inlining of function containing inline asm are mostly not relevant for extended inline assembly expressions. 
     5Effectively, extended inline assembly expression can be used to efficiently implement new intrinsics in the compiler. 
     6 
    27To use them you must import the module containing the magic declarations: 
    38 {{{ 
    4247 
    4348Common output constraints: 
    44  * '''=*m''' = memory output 
    45  * '''=r''' = general purpose register output 
     49 * '''=*m''' == memory output 
     50 * '''=r''' == general purpose register output 
    4651 
    4752Common input constraints: 
    48  * '''*m''' = memory input 
    49  * '''r''' = general purpose register input 
    50  * '''i''' = immediate value input 
     53 * '''*m''' == memory input 
     54 * '''r''' == general purpose register input 
     55 * '''i''' == immediate value input 
    5156 
    5257Common clobbers: 
    53  * '''~{memory}''' = clobbers memory 
     58 * '''~{memory}''' == clobbers memory 
    5459 
    5560= X86-32 = 
    5762== X86-32 specific constraints == 
    5863 
    59  * '''a''' or '''{ax}''' or '''{eax}''' = EAX 
    60  * '''b''' or '''{bx}''' or '''{ebx}''' = EBX 
    61  * '''c''' or '''{cx}''' or '''{ecx}''' = ECX 
    62  * '''d''' or '''{dx}''' or '''{edx}''' = EDX 
    63  * '''A''' = EAX:EDX 
    64  * '''{st}''' = ST(0) 
    65  * '''{st(N)}''' = ST(N) 
     64 * '''a''' or '''{ax}''' or '''{eax}''' == EAX 
     65 * '''b''' or '''{bx}''' or '''{ebx}''' == EBX 
     66 * '''c''' or '''{cx}''' or '''{ecx}''' == ECX 
     67 * '''d''' or '''{dx}''' or '''{edx}''' == EDX 
     68 * '''A''' == EAX:EDX 
     69 * '''{st}''' == ST(0) 
     70 * '''{st(N)}''' == ST(N) 
    6671 
    6772== Examples == 
Copyright © 2008, LDC Development Team.