Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

MMX moves (Developers)

posted by Laaca Homepage, Czech republic, 16.02.2009, 21:20

Do I something wrong or the simple MMX moves are slower than normal 386 moves?
I measured than if I switch on the "block A" it is about 8% slower than if I switch it off.
Both, DS:ESI and ES:EDI are in normal RAM (not VRAM or ROM).

My code:

{DS:ESI = source; ES:EDI = destination; ECX = number of bytes to copy}

{block A}
@mmxloop: movq mm0,ds:[esi];movq es:[edi],mm0
add esi,8;sub ecx,8;add edi,8;cmp ecx,8;jge @mmxloop

{block B}
shr ecx,1;pushf;shr ecx,1;rep movsd;adc ecx,ecx
rep movsw;popf;adc ecx,ecx;rep movsb

---
DOS-u-akbar!

 

Complete thread:

Back to the forum
Board view  Mix view
22751 Postings in 2119 Threads, 402 registered users (2 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum