Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Inline assembly syntax?

_martin_
Beginner
2,097 Views
Hello,

I'm trying to compile a project with Intel C++ Compiler which compiles very well with Microsoft VS 2005 Compiler.

with Intel C++ Compiler 9.1 this inline code:
__asm movaps xmm6, qword ptr [g_vifRow1]
produces this error: __asm 'movaps' Bad memvx128 qualifier

if i remove the 'qword ptr' operator on this line
__asm movaps xmm6, [g_vifRow1] compiles very well but i'm sure it does something different (sorry i'm not much into asm)

what does the errormessage mean?

0 Kudos
5 Replies
Rick_Paulson
Beginner
2,097 Views

One of our engineers has this comment:

"The memory reference in the movaps instruction is 128 bits.You should use XMMWORD instead of QWORD."

-Rick


0 Kudos
Anonymous69
Beginner
2,097 Views
Hi, the problem is not in assembly syntax but in datatype. You shouldn't use

movaps xmm6, qword ptr [g_vifRow1]

because "qword ptr" means pointer to quadword ((sizeof(word) * 4) bytes). You should use pointer to xmmword ((it is a new datatype comming with SSE) 16 bytes) if you use XMM registers

movaps xmm6, xmmword ptr [g_vifRow1]

But in generaly it is not needed to write "xmmword ptr" because the compiler knows what datatype to load into register. So it is enough to write

movaps xmm6, [g_vifRow1]
0 Kudos
Anonymous69
Beginner
2,097 Views
Hi, the problem is not in assembly syntax but in datatype. You shouldn't use

movaps xmm6, qword ptr [g_vifRow1]

because "qword ptr" means pointer to quadword ((sizeof(word) * 4) bytes). You should use pointer to xmmword ((it is a new datatype comming with SSE) 16 bytes) if you use XMM registers

movaps xmm6, xmmword ptr [g_vifRow1]

But in generaly it is not needed to write "xmmword ptr" because the compiler knows what datatype to load into register. So it is enough to write

movaps xmm6, [g_vifRow1]
0 Kudos
Anonymous69
Beginner
2,097 Views
Hi, the problem is not in assembly syntax but in datatype. You shouldn't use

movaps xmm6, qword ptr [g_vifRow1]

because "qword ptr" means pointer to quadword ((sizeof(word) * 4) bytes). You should use pointer to xmmword ((it is a new datatype comming with SSE) 16 bytes) if you use XMM registers

movaps xmm6, xmmword ptr [g_vifRow1]

But in generaly it is not needed to write "xmmword ptr" because the compiler knows what datatype to load into register. So it is enough to write

movaps xmm6, [g_vifRow1]
0 Kudos
Anonymous69
Beginner
2,097 Views
Hi, the problem is not in assembly syntax but in datatype. You shouldn't use

movaps xmm6, qword ptr [g_vifRow1]

because "qword ptr" means pointer to quadword ((sizeof(word) * 4) bytes). You should use pointer to xmmword ((it is a new datatype comming with SSE) 16 bytes) if you use XMM registers

movaps xmm6, xmmword ptr [g_vifRow1]

But in generaly it is not needed to write "xmmword ptr" because the compiler knows what datatype to load into register. So it is enough to write

movaps xmm6, [g_vifRow1]
0 Kudos
Reply