<p> <span>现有某函数,其方法声明为:int func(int x)</
现有某函数,其方法声明为:int func(int x)
该函数对应的ARM汇编代码如下:
0000016A PUSH {LR}
0000016C MOVS R3, #1
0000016E ADDS R1, R3, #0
00000170 loc_170
00000170 CMP R0, #0
00000172 BLE loc_184
00000174 MOVS R2, R0
00000176 MULS R2, R3
00000178 ADDS R3, R2, #1
0000017A TST R0, R1
0000017C BEQ loc_180
0000017E ADDS R3, R2, #0
00000180 loc_180
00000180 SUBS R0, #1
00000182 B loc_170
00000184 loc_184
00000184 MOVS R0, R3
00000186 POP {PC}
从上面的汇编代码可以得出func(3)的值等于