-
基于ARM的嵌入式程序设计中,不同类型局部变量的编译结果分析-8-1
资源介绍
不同类型局部变量的编译结果
int wordinc (int a)
{return a+1
}
short shortinc(short a )
{return a+1
}
short charinc(short a )
{return a+1
}
wordinc
ADD a1,a1,#1
shortinc
ADD a1,a1,#1
MOV a1,a1.LSL #16
MOV a1,a1,ASR #16
MOV PC,LR
charinc
ADD a1,a1,#1
AND a1,a1,#&ff
MOV PC,LR