Assembly Language for Beginners

(Jeff_L) #1

1.29. SIMD


var_10 = dword ptr -10h
arg_0 = dword ptr 8
arg_4 = dword ptr 0Ch
arg_8 = dword ptr 10h
arg_C = dword ptr 14h


push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0Ch
mov ecx, [ebp+arg_0]
mov esi, [ebp+arg_4]
mov edi, [ebp+arg_8]
mov ebx, [ebp+arg_C]
test ecx, ecx
jle short loc_80484D8
cmp ecx, 6
lea eax, [ebx+10h]
ja short loc_80484E8

loc_80484C1: ; CODE XREF: f(int,int ,int ,int )+4B
; f(int,int
,int ,int )+61 ...
xor eax, eax
nop
lea esi, [esi+0]


loc_80484C8: ; CODE XREF: f(int,int ,int ,int )+36
mov edx, [edi+eax
4]
add edx, [esi+eax4]
mov [ebx+eax
4], edx
add eax, 1
cmp eax, ecx
jnz short loc_80484C8


loc_80484D8: ; CODE XREF: f(int,int ,int ,int )+17
; f(int,int
,int ,int )+A5
add esp, 0Ch
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
retn


align 8

loc_80484E8: ; CODE XREF: f(int,int ,int ,int *)+1F
test bl, 0Fh
jnz short loc_80484C1
lea edx, [esi+10h]
cmp ebx, edx
jbe loc_8048578


loc_80484F8: ; CODE XREF: f(int,int ,int ,int *)+E0
lea edx, [edi+10h]
cmp ebx, edx
ja short loc_8048503
cmp edi, eax
jbe short loc_80484C1


loc_8048503: ; CODE XREF: f(int,int ,int ,int *)+5D
mov eax, ecx
shr eax, 2
mov [ebp+var_14], eax
shl eax, 2
test eax, eax
mov [ebp+var_10], eax
jz short loc_8048547

Free download pdf