Hi Biterider,
I wanted to get some timings, but your macro throws errors... what's wrong?
include \masm32\include\masm32rt.inc ; plain Masm32
iterations=99999999 ; 100 Mio
include StructCopy.inc
include S2S.inc
.686p
.xmm
.data
pan1 PANOSE <10, 11, 12, 13, 14, 15, 16, 17, 18, 19>
pan2 PANOSE <?>
pt1 POINT <100, 200>
pt2 POINT <?>
rc1 RECT <10, 20, 30, 40>
rc2 RECT <?>
.code
start:
xpan equ PANOSE ptr [ebx]
push rv(GetTickCount)
push iterations
mov ebx, offset pan2
.Repeat
; StructCopy xpan, pan1
StructCopy rc2, rc1
dec dword ptr [esp]
.Until Sign?
pop edx
invoke GetTickCount
pop ecx
sub eax, ecx
print str$(eax), " ticks for StructCopy", 13, 10
if 1
push esi
push edi
push rv(GetTickCount)
push iterations
mov ebx, offset pan2
.Repeat
TARGET_BITNESS=32
mov ecx, RECT/4
mov esi, offset rc1
mov edi, offset rc2
rep movsd
dec dword ptr [esp]
.Until Sign?
pop edx
invoke GetTickCount
pop ecx
sub eax, ecx
print str$(eax), " ticks for rep movsd", 13, 10
pop edi
pop esi
endif
if 0 ; chokes
push rv(GetTickCount)
push iterations
mov ebx, offset pan2
.Repeat
TARGET_BITNESS=32
s2s rc1, rc2, rax, rcx
dec dword ptr [esp]
.Until Sign?
pop edx
invoke GetTickCount
pop ecx
sub eax, ecx
print str$(eax), " ticks for s2s", 13, 10
endif
if 0
StructCopy xpan, pan1
movsx eax, pan2.bFamilyType
print str$(eax), 9, " bFamilyType", 13, 10
movsx eax, pan2.bXHeight
print str$(eax), 9, " bXHeight", 13, 10
StructCopy pt2, pt1
mov eax, pt2.x
print str$(eax), 9, " x", 13, 10
mov eax, pt2.y
print str$(eax), 9, " y", 13, 10
StructCopy rc2, rc1
print str$(rc2.left), 9, " left", 13, 10
print str$(rc2.bottom), 9, " bottom", 13, 10
endif
inkey "hit any key"
exit
end start