Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changeset 1381

Show
Ignore:
Timestamp:
12/14/09 08:21:49 (15 years ago)
Author:
walter
Message:

bugzilla 3594 AsmPrimaryExp? rule references unspecified rules

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/docsrc/iasm.dd

    r1380 r1381  
    5959 L1:            ; 
    6060    pop EBX     ; 
    6161    mov pc[EBP],EBX ;   // pc now points to code at L1 
    6262} 
    6363-------------- 
    6464 
    6565<h2>align $(I IntegerExpression)</h2> 
    6666 
    6767$(GRAMMAR 
    6868$(GNAME IntegerExpression): 
    69     $(I IntegerLiteral
     69    $(LINK2 lex.html#IntegerLiteral, $(I IntegerLiteral)
    7070    $(I Identifier) 
    7171) 
    7272 
    7373    $(P Causes the assembler to emit NOP instructions to align the next 
    7474    assembler instruction on an $(I IntegerExpression) boundary. 
    7575    $(I IntegerExpression) must evaluate at compile time to an integer that is 
    7676    a power of 2. 
    7777    ) 
    7878 
    7979    $(P Aligning the start of a loop body can sometimes have a dramatic 
     
    127127-------------- 
    128128 
    129129<h2>Opcodes</h2> 
    130130 
    131131    A list of supported opcodes is at the end. 
    132132    <p> 
    133133 
    134134    The following registers are supported. Register names 
    135135    are always in upper case. 
    136136 
    137     <dl><dl> 
    138     <dt>$(B AL), $(B AH), $(B AX), $(B EAX) 
    139     <dt>$(B BL), $(B BH), $(B BX), $(B EBX) 
    140     <dt>$(B CL), $(B CH), $(B CX), $(B ECX) 
    141     <dt>$(B DL), $(B DH), $(B DX), $(B EDX) 
    142     <dt>$(B BP), $(B EBP) 
    143     <dt>$(B SP), $(B ESP) 
    144     <dt>$(B DI), $(B EDI) 
    145     <dt>$(B SI), $(B ESI) 
    146     <dt>$(B ES), $(B CS), $(B SS), $(B DS), $(B GS), $(B FS) 
    147     <dt>$(B CR0), $(B CR2), $(B CR3), $(B CR4) 
    148     <dt>$(B DR0), $(B DR1), $(B DR2), $(B DR3), $(B DR6), $(B DR7) 
    149     <dt>$(B TR3), $(B TR4), $(B TR5), $(B TR6), $(B TR7) 
    150     <dt>$(B ST) 
    151     <dt>$(B ST(0)), $(B ST(1)), $(B ST(2)), $(B ST(3)), 
    152         $(B ST(4)), $(B ST(5)), $(B ST(6)), $(B ST(7)) 
    153     <dt>$(B MM0), $(B MM1), $(B MM2), $(B MM3), 
    154         $(B MM4), $(B MM5), $(B MM6), $(B MM7) 
    155     <dt>$(B XMM0), $(B XMM1), $(B XMM2), $(B XMM3), 
    156         $(B XMM4), $(B XMM5), $(B XMM6), $(B XMM7) 
    157     </dl></dl> 
     137$(GRAMMAR 
     138$(GNAME Register): 
     139    $(B AL) $(B AH) $(B AX) $(B EAX) 
     140    $(B BL) $(B BH) $(B BX) $(B EBX) 
     141    $(B CL) $(B CH) $(B CX) $(B ECX) 
     142    $(B DL) $(B DH) $(B DX) $(B EDX) 
     143    $(B BP) $(B EBP) 
     144    $(B SP) $(B ESP) 
     145    $(B DI) $(B EDI) 
     146    $(B SI) $(B ESI) 
     147    $(B ES) $(B CS) $(B SS) $(B DS) $(B GS) $(B FS) 
     148    $(B CR0) $(B CR2) $(B CR3) $(B CR4) 
     149    $(B DR0) $(B DR1) $(B DR2) $(B DR3) $(B DR6) $(B DR7) 
     150    $(B TR3) $(B TR4) $(B TR5) $(B TR6) $(B TR7) 
     151    $(B ST) 
     152    $(B ST(0)) $(B ST(1)) $(B ST(2)) $(B ST(3)) $(B ST(4)) $(B ST(5)) $(B ST(6)) $(B ST(7)) 
     153    $(B MM0) $(B MM1) $(B MM2) $(B MM3) $(B MM4) $(B MM5) $(B MM6) $(B MM7) 
     154    $(B XMM0) $(B XMM1) $(B XMM2) $(B XMM3) $(B XMM4) $(B XMM5) $(B XMM6) $(B XMM7) 
     155
    158156 
    159157<h3>Special Cases</h3> 
    160158 
    161159$(DL 
    162160 
    163161    $(DT $(B lock), $(B rep), $(B repe), $(B repne), 
    164162     $(B repnz), $(B repz)) 
    165163    $(DD These prefix instructions do not appear in the same statement 
    166164    as the instructions they prefix; they appear in their own statement. 
    167165    For example: 
     
    267265    $(I AsmTypePrefix) $(I AsmExp) 
    268266    $(B offsetof) $(I AsmExp) 
    269267    $(B seg) $(I AsmExp) 
    270268    $(B +) $(I AsmUnaExp) 
    271269    $(B -) $(I AsmUnaExp) 
    272270    $(B !) $(I AsmUnaExp) 
    273271    $(B ~) $(I AsmUnaExp) 
    274272    $(I AsmPrimaryExp) 
    275273 
    276274$(GNAME AsmPrimaryExp): 
    277     $(I IntegerConstant
    278     $(I FloatConstant
     275    $(LINK2 lex.html#IntegerLiteral, $(I IntegerLiteral)
     276    $(LINK2 lex.html#FloatLiteral, $(I FloatLiteral)
    279277    $(B __LOCAL_SIZE) 
    280278    $(B $) 
    281     $(I Register) 
     279    $(GLINK Register) 
    282280    $(I DotIdentifier) 
    283281 
    284282$(GNAME DotIdentifier): 
    285283    $(I Identifier) 
    286284    $(I Identifier) $(B .) $(I DotIdentifier) 
    287285) 
    288286 
    289287    $(P The operand syntax more or less follows the Intel CPU documentation 
    290288    conventions. 
    291289    In particular, the convention is that for two operand instructions