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

How to verify whether value is loaded into xmm register in C or not?

shahedabegum
Beginner
332 Views
Hi everyone,

How to check whether the value is loaded into the xmm register in C ??I am using GCC. For eg,
typedef struct
{
int val[4];
}state;
int main()
{
int *m;
state a;
asm(" movups (%eax),%xmm0:"=r"(m):"r"(a.val);
}
Here i am not able to print the m value. I need help in this issue. Thank you in advance.

0 Kudos
1 Reply
levicki
Valued Contributor I
332 Views

Well if you tell the CPU to load a value to XMM register it will do it or die trying. Perhaps you meant to ask how to check the loaded value from the XMM register? The only way is to write it back to memory and print it out using traditional C or C++ code.

0 Kudos
Reply