23,125
社区成员
发帖
与我相关
我的任务
分享
#include "stdio.h"
int main( int argc, char* argv[])
{
int cpu_iid;
__asm__ __volatile__(
"mov 1, %0\n"
:"=m"(cpu_iid)
:
);
}
$gcc test.c -o a.out
test.c: Assembler messages:
test.c:7: Error: too many memory references for `mov'
#include "stdio.h"
int main( int argc, char* argv[])
{
int cpu_iid;
__asm__ __volatile__(
"mov $1, %0\n"
:"=m"(cpu_iid)
:
);
}
$gcc test.c -o a.out
test.c: Assembler messages:
test.c:7: Error: no instruction mnemonic suffix given and no register operands; can't size instruction