Why does the x86-64 System V calling convention pass args in registers instead of just the stack?
问题 Why is it that 32-bit C pushes all function arguments straight onto the stack while 64-bit C puts the first 6 arguments into registers and the rest on the stack? So the 32-bit stack would look like: ... arg2 arg1 return address old %rbp While the 64-bit stack would look like: ... arg8 arg7 return address old %rbp arg6 arg5 arg4 arg3 arg2 arg1 So why does 64-bit C do this? Isn't it much easier to just push everything to the stack instead of put the first 6 arguments in registers just to move