When calling a non-inline function with two integer or pointer parameters from a C program, they are passed in registers rdi and rsi. Can the compilation be done in such a way that integer/pointer parameters to inline functions are passed in registers as well (and not on the stack)?
When a function is inlined, it is treated as if its code was written into the function that called it. When this happens, it is not passed parameters at all.
When a function isn't inlined, it's absolutely no different from a normal function. inline is just a hint to the compiler to try and inline a function; it doesn't affect linkage at all.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With