I write a helloworld like this:
#include <stdio.h>
int main()
{
uint64_t x = 0xffffffff0;
printf("x=%llu\n", x);
return 0;
}
In my opinion, the printf use r0,r1,r2 as parameters, r0 is the addr of string, and r1&r2 is the value of x(according to 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.
However, when I objdump it, I found the asm is:
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>
Obviously, r2 is 0xfffffff0 as the low 32 bits of x, and r3 is the high 32 bits of x. And r0 is the addr of string. So what about r1? The parameter is r0-r3? I was confused, please help me, thanks!