X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: lst0656 AT hotmail DOT com (lim) Newsgroups: comp.os.msdos.djgpp Subject: Convert intel asm to djgpp asm Date: 26 Dec 2004 21:44:50 -0800 Organization: http://groups.google.com Lines: 51 Message-ID: <7410964b.0412262144.73c7d136@posting.google.com> NNTP-Posting-Host: 218.50.231.33 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1104126290 6398 127.0.0.1 (27 Dec 2004 05:44:50 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Mon, 27 Dec 2004 05:44:50 +0000 (UTC) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi, I need help to convert my inline asm to djgpp inline asm. here is the code I need to be convert over. How to convert the following my inline asm code to djgpp inline asm : short mul5[4] = {5, 5, 5, 5}; void 06_mmx_dec_smv2(unsigned char* dest, int st1, unsigned char* sour, int st2) { short temp[36]; sour -= (st2<<1); __asm { lea esi, temp mov edi, sour mov eax, 9 pxor mm7, mm7 loop06_1: movd mm0, [edi- 2] punpcklbw mm0, mm7 movd mm1, [edi- 1] punpcklbw mm1, mm7 pmullw mm1, mul5 movd mm2, [edi] movq [esi], mm0 add esi, 8 add edi, st2 dec eax jnz loop06_1 mov esi, dest lea edi, temp mov eax, 4 loop06_2: movq mm0, [edi] movq mm2, [edi+ 8] movq mm1, mm0 punpcklwd mm0, mm2 pmaddwd mm0, mul5 psrad mm0, 10 psrad mm1, 10 packssdw mm0, mm1 packuswb mm0, mm7 punpcklbw mm0, mm7 movd [esi], mm0 add esi, st1 add edi, 8 dec eax jnz loop06_2 emms } }