23 Commits

Author SHA1 Message Date
Alessandro Di Federico f0e44e5fe8 primitive-types: emit undef_value as typed pointer
Return a pointer to a buffer of the requested size and let the macro
dereference it as the target type, instead of casting a uintmax_t. This
makes the macro usable for types wider than uintmax_t.
2026-06-11 17:39:52 +02:00
Pietro Fezzardi d97427e9af primitive-types.h: fix typos in comments 2026-05-11 09:22:09 +02:00
Pietro Fezzardi 58e95d330f Drop assign_array macro
The macro is no longer necessary: the code now ensures we never
need to assign anything to an array, which would be ill-advised
nevertheless given that array-typed rvalues in C immediately
decay to pointers.
2026-05-08 11:37:10 +02:00
Pietro Fezzardi 85a9780d28 Drop bit_cast_to_array macro
The macro is no longer necessary: the code now ensures we never
need to bitcast anything to an array, which would be ill-advised
nevertheless given that array-typed rvalues in C immediately
decay to pointers.
2026-05-08 11:37:10 +02:00
Pietro Fezzardi 0251ddd37d Add assign_array and bit_cast_to_array
assign_array is necessary as a fallback for when the decompiled C
code may need assignments among array types. bit_cast_to_array is
necessary because when the target type of a bitcast is an array
the regular bit_cast macro is not enough.
2026-05-08 11:37:10 +02:00
Pietro Fezzardi 3bf02e6f60 Unify implementation of bit_cast, requiring typeof
Rework primitive-types.h so that the various bit_cast macros share
a single implementation based on `typeof`/`__typeof__`. As a
consequence both keywords are added to the model's reserved-name
set so that user identifiers cannot collide with them.
2026-05-08 11:37:10 +02:00
Lauri Vasama a37f3195d9 Homogenize static assertions in primitive-types.h 2026-04-08 11:12:41 +03:00
Lauri Vasama b062b23ad6 Include stddef.h in primitive-types.h 2026-04-08 11:12:41 +03:00
Ivan Krysak dab7e61f4a attributes.h: introduce _NORETURN 2026-03-27 08:26:29 +00:00
Ivan Krysak 307ddcfeaf attributes.h: introduce _ALWAYS_INLINE 2026-03-27 08:26:04 +00:00
Ivan Krysak 5631fe68fb attributes.h: reorganize the attribute order 2026-03-27 08:25:39 +00:00
Ivan Krysak 3e6c42f69c attributes.h introduce custom attribute helpers 2026-03-27 08:25:14 +00:00
Ivan Krysak 16611a93fc attributes.h: drop unnecessary macro definitions 2026-03-27 08:24:49 +00:00
Ivan Krysak 95650e593d primitive-types.h: include stdbool.h 2026-02-25 14:10:44 +01:00
Ivan Krysak 1c3d11096d primitive-types.h: define NULL if absent 2026-02-25 14:10:44 +01:00
Lauri Vasama d4114ae188 Implement bit_cast in Clift backend 2025-12-05 19:53:41 +02:00
Lauri Vasama bf5adce413 Overhaul Clift loop syntax, add break/continue 2025-10-21 09:15:40 +02:00
Lauri Vasama 653d451e6c Remove undef name configuration support
Also adds a model migration removing
Configuration.Naming.UndefinedValuePrefix.
2025-09-29 18:05:55 +03:00
Ivan Krysak c6a175a1b9 Rename _START_AT -> _STARTS_AT 2025-08-29 14:00:29 +03:00
Giacomo Vercesi 29d7f2d8a8 artifacts: allow parsing the recompilable archive
Allow the artifacts machinery to parse, via `pycparser`, the
recompilable archive provided by revng via the
`emit-recompilable-archive` artifact.
2025-07-18 09:30:56 +02:00
Lauri Vasama 28550f2f57 Add explicit pointer size support in old backend
When `Configuration.ExplicitTargetPointerSize` is set, the backend uses
explicit pointer type sizes (e.g. `pointer32_t(T)`).
2025-07-17 16:45:03 +02:00
Ivan Krysak dce5c1a02c NamingConfiguration: pull more prefixes inside
Unify additional values that used to be hardcoded in the old backend
under the same naming configuration root.
2025-04-17 11:19:17 +03:00
Alessandro Di Federico 143c315196 Merge revng-c into revng 2024-11-21 10:50:55 +01:00