Nikhil Patil
|
problem with assembly code
|
Nikhil Patil
03/25/2009 1:28 PM
post25210
|
problem with assembly code
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
int fx_dWord = 0;
asm(
"movd %0, %%xmm7;"
: //output
: "r" (fx_dWord) //input
: "%xmm7"
);
return EXIT_SUCCESS;
}
The above code compiles with gcc 3.4.4 but not with gcc4.2.4 and gcc2.95.7
The code above for gcc 3.4.4 and gcc 2.95.3 was tested with QNX632 and for gcc4.2.4 was tested with QNX640.
We use binutils 2.18 on both OSes
Error
-------------------------------------------------------------------------
D:/Workspace/qnx/xmmtest1/xmmtest1.c: In function 'main':
D:/Workspace/qnx/xmmtest1/xmmtest1.c:21: error: unknown register name '%xmm7' in 'asm'
cc: D:/Perforce_QNX/qnx/qssl/nto/qnx640/Trunk/host/win32/x86/usr/lib/gcc/i386-pc-nto-qnx6.4.0/4.2.4/cc1 caught signal 1
-------------------------------------------------------------------------
Help !!
|
|
|