The semantics of the stack as expected by LLVM IR do not 100% match the semantics of the stack as provided by Cairo. We may need to have an emulation layer interposing between the two, and this task deals with designing such a layer.
As part of this design we need to account for how and when we allocate stack frames, and also how the stack is used as part of the calling convention. We want to make use of the CairoVM's stack pointer as much as possible.
Description
The semantics of the stack as expected by LLVM IR do not 100% match the semantics of the stack as provided by Cairo. We may need to have an emulation layer interposing between the two, and this task deals with designing such a layer.
As part of this design we need to account for how and when we allocate stack frames, and also how the stack is used as part of the calling convention. We want to make use of the CairoVM's stack pointer as much as possible.