[Fwd: Need help with MMX] 
Author Message
 [Fwd: Need help with MMX]

[ Attached Message ]

Date: Wed, 28 Jul 1999 22:47:41 +0800
Local: Wed, Jul 28 1999 10:47 am
Subject: Need help with MMX


I'm programming in VC++ and need a little help with MMX coding.

When I run Routine 1, I got the result I wanted.

Routine 1:

 int vv=0x8816;
 int ww=0xb5;
 int dd=vv*ww;

But, when I tried to use Routine 2, I got the wrong answer. Can anyone

When using pmulhw or pmullw, the intermediate result would be 32-bit.
The lower 16-bit will
be put in mm2 while the higher 16-bit will be in mm2. So, when I combine
both of them
(by shifting mm2 16 bits to the left and 'por' them), I should get the
answer as above (dd)). But, I
don't. What's wrong?

Routine 2:
_int64 m1=0x8816;
 _int64 m2=0xb5;

  movq mm0,m1
  movq mm1,m2
  movq mm2,mm1

  pmulhw mm1,mm0
  pmullw mm2,mm0

Sun, 13 Jan 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Beginner needs some help with MMX/SSE/3DNOW

2. ASM for Pentium 166 mmx (Another newbie who needs help)

3. Need help with MMX

4. Needs help with ST/V (fwd)

5. Fwd: [LogoForum] I need help with varibles

6. [Fwd: Multi-user VRML help needed]

7. (Fwd) Re: Need Help in Plone

8. Info about MMX instructions needed

9. Need MMX-Macro-File for TASM

10. HELP, clipper app. + 200 MMX Multiple errors

11. MMX Sound AGC Help

12. mmx help


Powered by phpBB® Forum Software