Àññåìáëåð - ýêñòðåìàëüíàÿ îïòèìèçàöèÿ

ïðèìåð ïðîãðàììû íà


.text:00401000 _main       proc near            ; CODE XREF: start+AFvp

.text:00401000                    mov    eax, 100000h

.text:00401005                    call   __alloca_probe

.text:0040100A                    movsx  eax, byte ptr [esp]

.text:00401012                    add    esp, 100000h

.text:00401018                    retn

.text:00401018 _main       endp                 ; sp =  100000h

.text:00401020 __alloca_probe     proc near            ; CODE XREF: _main+5^p

.text:00401020

.text:00401020 arg_0       = dword ptr  8

.text:00401020

.text:00401020                    push   ecx

.text:00401021                    cmp    eax, 1000h



.text:00401026                    lea    ecx, [esp+arg_0]

.text:0040102A                    jb     short loc_401040

.text:0040102C

.text:0040102C loc_40102C:                      ; CODE XREF: __alloca_probe+1Evj

.text:0040102C                    sub    ecx, 1000h

.text:00401032                    sub    eax, 1000h

.text:00401037                    test   [ecx], eax

.text:00401039                    cmp    eax, 1000h

.text:0040103E                    jnb    short loc_40102C

.text:00401040

.text:00401040 loc_401040:                      ; CODE XREF: __alloca_probe+A^j

.text:00401040                    sub    ecx, eax

.text:00401042                    mov    eax, esp

.text:00401044                    test   [ecx], eax

.text:00401046                    mov    esp, ecx

.text:00401048                    mov    ecx, [eax]

.text:0040104A                    mov    eax, [eax+4]

.text:0040104D                    push   eax

.text:0040104E                    retn

.text:0040104E __alloca_probe     endp



Ñîäåðæàíèå ðàçäåëà