再补充一下,这个问题跟ADS的优化确实有关,把优化级别改到最低,就正确了。
aa [0xe59f0044] ldr r0,0x0000804c ; = #0x30313233
00008004 [0xe1a0f00e] mov pc,r14
main [0xe92d4038] * stmfd r13!,{r3-r5,r14}
0000800c [0xe3a04001] mov r4,#1
00008010 [0xebfffffa] bl aa
00008014 [0xe1a00400] mov r0,r0,lsl #8
00008018 [0xe59f1030] ldr r1,0x00008050 ; = #0x00313233
0000801c [0xe1510420] cmp r1,r0,lsr #8
00008020 [0x1a000001] bne 0x802c ; (main + 0x24)
00008024 [0xe3a00001] mov r0,#1
00008028 [0xea000000] b 0x8030 ; (main + 0x28)
0000802c [0xe3a00000] mov r0,#0
00008030 [0xe1a05000] mov r5,r0
00008034 [0xe1a02005] mov r2,r5
00008038 [0xe1a01004] mov r1,r4
0000803c [0xe28f0010] add r0,pc,#0x10 ; #0x8054
00008040 [0xeb000033] bl _printf
00008044 [0xe3a00000] mov r0,#0
00008048 [0xe8bd8038] ldmfd r13!,{r3-r5,pc}
0000804c [0x30313233] dcd 0x30313233 3210
00008050 [0x00313233] dcd 0x00313233 321.
00008054 [0x203d2061] dcd 0x203d2061 a =
00008058 [0x202c6425] dcd 0x202c6425 %d,
0000805c [0x203d2062] dcd 0x203d2062 b =
00008060 [0x000a6425] dcd 0x000a6425 %d..
|