reilabs / llvm-to-cairo

Efforts to compile LLVM bytecode to run on top of the CairoVM and hence execute provably on Starknet
http://starknet.io
Apache License 2.0
1 stars 0 forks source link

Design Stack Semantics #26

Open ktemkin opened 5 days ago

ktemkin commented 5 days ago

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.