small speedup

git-svn-id: svn://kolibrios.org@6423 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
pathoswithin 2016-05-10 19:33:26 +00:00
parent 9f4a226cc1
commit 97bb3982a6

View File

@ -394,21 +394,15 @@ proc mpint_sub uses eax esi edi ecx, dst, src
mov edi, [dst] mov edi, [dst]
add edi, 4 add edi, 4
mov ecx, MPINT_MAX_LEN/4 mov ecx, MPINT_MAX_LEN/4
.loop:
; dst = dst + (NOT src) + 1
stc ; Setting CF takes care of the +1
pushf
@@:
lodsd lodsd
not eax sub [edi], eax
popf jnc @f
adc [edi], eax dec dword [edi+4]
pushf @@:
add edi, 4 add edi, 4
dec ecx dec ecx
jnz @r jnz .loop
popf
ret ret
endp endp