Share via


ARM Prolog

The ARM prolog has specific component parts. All parts are immediately contiguous, with no intervening instructions.

The following list shows the component parts of an ARM prolog.

  1. A sequence of zero or one instruction that push the incoming argument values in R0, R1, R2, and R3 to the argument home locations, and update R13 to the new stack top. This sequence saves all the permanent registers in descending order at the top of the stack frame, following any saved argument registers.
  2. A sequence of one or more instructions that set up the frame pointer, if one is to be established. The prolog copies stack pointer R13 to R12 before the initial register saves, and then uses R12 to compute the value of the frame pointer, R11.
  3. A sequence of zero or more instructions that allocate the remaining stack frame space for local variables, compiler-generated temporaries, and the argument build area by subtracting a 4-byte aligned offset from R13. If an offset is too wide to represent in the immediate field, the prolog uses the scratch register R12 to hold the offset. In this case, it sets the value in R12 with a different instruction.

When the component parts of the prolog follow this guideline, the Virtual Unwinder can reverse execute the prolog.

See Also

ARM Prolog and Epilog | ARM Epilog | THUMB Prolog | THUMB Epilog | ARM Prolog and Epilog Coding Examples

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.