Author Topic: Inline assembly using mmx sse2  (Read 8675 times)

nobody

  • Guest
Inline assembly using mmx sse2
« on: May 30, 2007, 10:08:29 AM »
Hello :
      I use Visual Studio 2005, but I got some trouble on inline assembly.

__asm{
   pxor       xmm7,xmm7
   movq       xmm1,temp_int
   punpcklbw  xmm7,xmm1
}

It shows error message on  "movq xmm1.temp_int"
which shows that : error C2415: improper operand type

Is it due that the type of xmm1 is float ?
Though It build ok  if  "movq  mm1,temp_int ".
But I think it is a bad idea to replace xmm1 by mm1 showed in my whole source code.
Could anybody help me ? Thanks.

nobody

  • Guest
Re: Inline assembly using mmx sse2
« Reply #1 on: May 30, 2007, 03:24:22 PM »
Not a NASM question.

If it were, then your problem would be the missing square brackets.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Inline assembly using mmx sse2
« Reply #2 on: May 30, 2007, 05:55:55 PM »
... but since it isn't... the square brackets still might help. I'd try something like:

movq xmm, qword ptr [temp_int]

May (probably) depend on how/where "temp_int" is defined... C++ might be "decorating" it.

You'll probably get better help on a Masm/VS related board...

Best,
Frank