|
RT,例如,要调用参数和返回值是整型的可以如下调用
int Add(int a, int b) {
return a + b;
}
asm volatile(
"nop #FunTest \n\t"
"mov %3, 4(%%esp) \n\t"
"mov %2, (%%esp) \n\t"
"call *%0 \n\t"
"mov %%eax, %1 \n\t"
:"+r"(pf),"+r"(out)
:"r"(in1),"r"(in2)
:"esp","eax"
);
那么下面这个函数要怎么调用呢?
double Add(double a, double b) {
return a + b;
} |
|