mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
3709deebc8
This commit: 1. Introduces an alloca for stack arguments of a function. This enables us to "write" to stack argument. In order to do so, we simply map the relevant stack portion to the alloca that, since it's a memory object, can be `load`'d from and `store`'d to. Note that `llvm::Argument`s are always scalar since if the original argument was an aggregate, it would have been passed as a pointer, which is a scalar. Note also that previously we were using scalar arguments as if they were *pointers* to the stack arguments. This commit fixes that too (and updates the tests accordingly). 2. Introduces an alloca for *scalar* stack arguments of a call site. The alloca is then mapped to the corresponding part of the stack. Previously, there was no redirection and negative offsets from `_stack_frame` would pop up.