misc: Fix broken memcmp()

This commit is contained in:
mintsuki 2022-07-14 20:03:21 +02:00
parent 8a8b62fbcf
commit 4dc295c9d8
3 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,7 @@ global memcmp
memcmp: memcmp:
mov rcx, rdx mov rcx, rdx
repe cmpsb repe cmpsb
jecxz .equal je .equal
mov al, byte [rdi-1] mov al, byte [rdi-1]
sub al, byte [rsi-1] sub al, byte [rsi-1]

View File

@ -60,7 +60,7 @@ memcmp:
mov esi, dword [esp+16] mov esi, dword [esp+16]
mov ecx, dword [esp+20] mov ecx, dword [esp+20]
repe cmpsb repe cmpsb
jecxz .equal je .equal
mov al, byte [edi-1] mov al, byte [edi-1]
sub al, byte [esi-1] sub al, byte [esi-1]
movsx eax, al movsx eax, al

View File

@ -60,7 +60,7 @@ memcmp:
mov esi, dword [esp+16] mov esi, dword [esp+16]
mov ecx, dword [esp+20] mov ecx, dword [esp+20]
repe cmpsb repe cmpsb
jecxz .equal je .equal
mov al, byte [edi-1] mov al, byte [edi-1]
sub al, byte [esi-1] sub al, byte [esi-1]
movsx eax, al movsx eax, al