Why arm64 pass params throught register x8-x17?

32 Views Asked by At

as I know, Arm64 pass params in a function depend on x0-x7 register. but i test it in a demo, i observerd x8-x15 can be used for pass params. why it different with https://developer.arm.com/documentation

test on device Android 11, Arm64

int sp1 = register_params_test(0x11, 0x12, 0x13, 0x14, 0x15, body, dataHeader, &dh, 0x16, 0x17, 0x18,
                               0x19, 0x110,
                               0x111, 0x112, 0x113, 0x114, 0x115);

enter image description here

1

There are 1 best solutions below

0
xxking On

enter image description here

these register were used in the function before I print the register values, so it's not the real params

thanks Michael