delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/12/27/00:47:34

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: converting Visual c++ inline asm to DJGPP inline assembly
Date: 26 Dec 2004 21:30:54 -0800
Organization: http://groups.google.com
Lines: 40
Message-ID: <7410964b.0412262130.427b7be8@posting.google.com>
NNTP-Posting-Host: 218.50.231.33
X-Trace: posting.google.com 1104125454 5377 127.0.0.1 (27 Dec 2004 05:30:54 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Mon, 27 Dec 2004 05:30:54 +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 asm :


static short mult5[4] = {5, 5, 5, 5};
void 06_mmx_test(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
	loop_1:
		movd		mm0, [edi- 2]
		punpcklbw	mm0, mm7
		movd		mm1, [edi- 1]
		punpcklbw	mm1, mm7
		pmullw		mm1, mult5
		movq		[esi], mm0
		add		esi, 8
		add		edi, st2
		dec		eax
		jnz		loop_1
		mov		esi, dest
		lea		edi, temp
		mov		eax, 4
		movd		[esi], mm0
		add		esi, st1
		add		edi, 8
		dec		eax
		emms
	}
}

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019