While reading some calling convention in some CPU architecture I read something like
“epilogue and prologue”, when a function is called from another function.
What is a function prologue or epilogue?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The epilogue and prologue of a function are simply the set of instructions that ‘set up’ the context for the function when it’s called and clean up when it returns.
The prologue typically performs such tasks as:
The epilogue generally only needs to restore any save registers and restore the stack pointer such that any memory reserved by the function for its own use is ‘freed’.
The exact mechanisms that might be used in a prologue/epilogue are Dependant on the CPU architecture, the platforms standard, the arguments and return values of the function, and the particular calling convention the function might be using.