Tool/software: TI C/C++ Compiler
Hello,
I would like to see how the epilog and prolog work when calling a function.
I checked the document Code-Size Optimization(Compiler Document 18.12.0 / section 3.13).
Q1. Is this a way to automatically remove the epilogue and prolog of the function, not by selecting an option?
If not, I wonder how to set the --opt_for_space Option.
Q2. Through Code-Size Optimization, function calls are made through LCR instructions. At this time, the value of the RPC register is pushed to the stack, and when the function ends, the return address of the stack is POPed through the LRETR instruction.
Is it correct that I understand well?
Q3. Passing arguments to the function call is recorded in the ACC register.
Isn't XAR register when use CALL and LRETR? If it is used, I wonder how it is used.
Thanks, Regards
Han