OK this can be preaty lame question but. I have got structure with qwords ...... zzzz
just look at this:
mov .iloscMat,eax
mov .SumaN,qword ptr 0 <--- it's not working of course but i need something like this
just look at this:
mov .iloscMat,eax
mov .SumaN,qword ptr 0 <--- it's not working of course but i need something like this
mov dword ptr [edx].SumaN+00h, 0
mov dword ptr [edx].SumaN+04h, 0
thanks Comrade.
i shouldnt work that late :sweat:
i shouldnt work that late :sweat:
A more space efficient solution would be:
fld0
fistp qword ptr .SumaN
fld0
fistp qword ptr .SumaN
And more efficiently,
Raymond
fldz
fstp qword ptr [edx].SumaN
More efficient because the FPU doesn't have to go through the process of converting from a float to an integer. In this case, it would still be the same 0 getting into memory.
Raymond
how about:
also its debatable if that FPU code is indeed faster than the two dword moves :)
pxor MM0, MM0
movq [edx].SumaN, MM0
also its debatable if that FPU code is indeed faster than the two dword moves :)
On Northwood, the two dword moves take one tickless than the FPU and MMX ones.
I tested like so:
I tested like so:
mov ebx,OFFSET shit
mov ecx,[rounds]
.next: rdtsc
mov esi,eax
mov edi,edx
;mov dword [ebx+00h],0
;mov dword [ebx+04h],0
;fldz
;fstp qword [ebx]
pxor MM0,MM0
movq [ebx],MM0
rdtsc
add esi,54h
sub eax,esi
sbb edx,edi
add dword [sum+00h],eax
add dword [sum+04h],edx
loop .next
mov edx,dword [sum+04h]
mov eax,dword [sum+00h]
div [rounds]
showhex "ticks",eax
sum dq 0
rounds dd 1000h
shit dq 0
blah... damn typos :P