Commit Graph

16 Commits

Author SHA1 Message Date
Ivan Krysak f070f1f1e1 Model: sunset double name system 2025-04-17 11:19:17 +03:00
Ivan Krysak 94a0ad6b93 Adopt reworked model::Type 2024-06-27 11:07:01 +02:00
Ivan Krysak 3705906074 Model: rename Type into TypeDefinition 2024-06-27 11:07:01 +02:00
Lauri Vasama e2f3f31093 Introduce RawFunctionType::Architecture 2024-05-29 15:43:35 +02:00
Andrea Gussoni 7d8b0139f3 SegregateStack: fix FileCheck directive
Add `%` in order to match precisely the argument LLVMIR value, and not
other spurious characters around.
2024-03-11 18:36:09 +01:00
Alessandro Di Federico 0c212b66d9 Relicense to MIT 2024-02-29 17:03:36 +01:00
Alessandro Di Federico 3709deebc8 SegregateStack: use alloca for stack arguments
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.
2023-12-12 12:04:15 +01:00
Pietro Fezzardi 24cb43ce9c Make RawFunctionType::StackArgumentsType a TTR
This is homogeneous with all other nullable references to types in the
model, such as the StackFrameType in model::Function, and others.
2023-12-05 16:56:52 +01:00
Alessandro Di Federico 30c127267c Improve ModelToHeader and HeaderToModel tests
* Fix non-PrimitiveTypes with low IDs.
* Ensure we use `revng model compare` to test the model.
* Updates the name to reflect the recent changes in naming convention
  and in the way we represent `model::Type::ID`s.
2023-08-23 16:37:39 +02:00
Alessandro Di Federico ffee4c22f0 Adapt tests to LLVM 16 2023-04-14 14:54:14 +02:00
Ivan Krysak f5c50da449 Tests: reorder the analyses to import first
The primitives were imported before the importing of the binary, which
is not valid anymore since it leads to duplicate types in cases where
the binary contains any primitive types, since one of the revng-side
commit now asserts on an attempt to insert multiples of the same type.

Also, this removes a duplicated type from the `SegregateStackAccesses`
test's `override` model.
2023-03-15 10:28:24 +01:00
Alessandro Di Federico 080a7ae442 Test returning aggregates 2022-11-30 18:16:13 +01:00
Alessandro Di Federico c5ab81cd08 Segregate: handle aggregate return values 2022-11-30 18:16:13 +01:00
Giacomo Vercesi 29d55849c5 Sync formatting changes
revng-check-conventions now includes the use of prettier for
formatting yaml files.
2022-06-28 11:25:56 +02:00
Alvise de Faveri 221b8f74d9 Add reference semantics to stack opcodes
`revng_stack_frame` and `revng_stack_args` are treated as returning
a reference, and are always followed by an `AddressOf` call.
2022-06-28 10:23:45 +02:00
Alessandro Di Federico da8cc78d17 Switch to new test suite 2022-06-21 10:35:45 +02:00