我写了一个像这样的helloworld:
#include <stdio.h>
int main()
{
uint64_t x = 0xffffffff0;
printf("x=%llu\n", x);
return 0;
}
在我看来,printf使用r0,r1,r2作为参数,r0是字符串的addr,而r1&amp; r2是x的值(根据IHI0042E_aapcs.pdf):
C.3 If the argument requires double-word alignment (8-byte), the NCRN is rounded up to the next even
register number.
然而,当我对它进行objdump时,我发现asm是:
8430: 4804 ldr r0, [pc, #16] ;
8432: f06f 020f mvn.w r2, #15
8436: b510 push {r4, lr}
8438: 230f movs r3, #15
843a: 4478 add r0, pc
843c: f7ff efda blx 83f4 <printf@plt>
显然,r2是0xfffffff0作为x的低32位,r3是x的高32位。而r0是字符串的addr。那么r1怎么样?参数是r0-r3?我很困惑,请帮助我,谢谢!