本帖最后由 lianda_ 于 2011-12-28 11:54 编辑
各位大侠, 请教个问题: Keil MDK 4.21 里C/C++与asm之间是怎么转换的呢? 帮助文件里昨天找了一整天了都没找到, 急呀, 请多指教(ARM)
例如:下面的函数:
// 为了测试C与asm 参数的及函数的传递
char * delay_s(uint32_t L1,uint32_t L2, uint32_t L3, uint32_t L4, uint32_t L5, uint32_t L6,
uint32_t L7, uint32_t L8, uint32_t L9, uint32_t L10,
char * buf)
{
uint32_t tst1;
char tst_str[3] = {1,2,3};
L1 = L2;
L2 = L3;
L3 = L4;
L4 = L5;
L5 = L6;
L6 = L7;
L7 = L8;
L8 = L9;
L9 = L10;
L10 = L1;
L1 = tst_str[0];
L2 = tst_str[1];
L3 = tst_str[2];
tst1 = L1;
L2 = tst1;
while( *buf )
{
buf++;
}
return buf;
}
编译后各变量(入参,出参,函数内临时,函数内静态...)与汇编的结果是怎么对应的呢? |