Subject: Re: 'pand' MMX instruction -- illegal?
To: None <gson@araneus.fi>
From: None <Havard.Eidnes@runit.sintef.no>
List: port-i386
Date: 01/14/1999 16:57:02
> I am using MMX under NetBSD/i386 1.3.2 on an AMD K6.  I had to patch
> the 1.3.2 assembler source to add support for the MMX instructions.
> You are apparently using the built-in MMX support in as.new which was
> only recently integrated into -current for the i386 port; I haven't
> yet built a recent enough -current to try it out myself.  In other
> words, you are using quite new and untested assembler functionality.

You're right; I used the -current assembler, but the rest of the
code is compiled and linked on my 1.3.2 system, so the compilation
is not exactly automatic at this point (I want as much as possible
backwards compatibility for the program).

> >	__asm("
> >		movq %%mm6, %1
> >		movq %%mm7, %2
> >		pand %%mm6, %%mm7
> >		movq %0, %%mm6
> >		" : "=3Dm" (c) : "m" (a), "m" (b));
>
> Aha!  The operands are the wrong way around.

This reflects more my own personal lack of experience with the GNU
CC asm directive than anything else, I'm afraid... ;-)

> MMX works fine on NetBSD/i386 provided you find a working assembler.

Ok, sounds promising.

> You only run into the context switch goo if you are crazy enogh to try
> to do MMX in the kernel like I'm doing (http://www.araneus.fi/audsl/).

Impressive!

Regards,

- H=E5vard