Commit Graph

211 Commits

Author SHA1 Message Date
Ivan Krysak ee238fd473 RCC: allow prettier to print errors 2024-06-27 11:05:49 +02:00
Ivan Krysak ac587cbb4f Model: rename Type into TypeDefinition 2024-06-27 11:05:48 +02:00
Ivan Krysak b2959e36df Minor improvements 2024-06-27 11:05:48 +02:00
Alessandro Di Federico 398681c5ce Introduce tests for invalidation 2024-06-25 09:50:38 +02:00
Alessandro Di Federico 6e49fed965 FunctionMetadata::{ControlFlowGraph,Blocks} 2024-06-20 10:24:51 +02:00
Alessandro Di Federico d859db08a4 Fix tests 2024-06-20 10:24:51 +02:00
Alessandro Di Federico bce1d6c0f3 Adopt invalidation along the core pipeline 2024-06-20 10:24:50 +02:00
Alessandro Di Federico b5f7576573 Rework TupleTreeGenerator tracking 2024-06-20 10:24:50 +02:00
Alessandro Di Federico b350d12ad2 TTG: spread some optional: true around 2024-06-20 10:24:49 +02:00
Djordje Todorovic 46946df1d3 Adjust x86_64 collect-cfg test 2024-05-29 16:25:53 +02:00
Alessandro Di Federico 84e3fac538 Minor changes 2024-05-29 12:06:03 +02:00
Alessandro Di Federico f35ca5efc2 for-collect-cfg.yml: make tests more robust 2024-05-22 10:25:25 +02:00
Alessandro Di Federico 452036edf1 Purge instructions to save return address 2024-04-30 15:25:53 +02:00
Alessandro Di Federico f777eaf00f Introduce tests for RegisterUsageAnalyses 2024-04-19 18:33:00 +02:00
Alessandro Di Federico d8e58f7a36 for-detect-abi.yml: re-enable tests
Tests were accidentally disabled due to a typo.
2024-04-18 17:50:31 +02:00
Ivan Krysak 13cc649226 test-model-diff: fix temporary directory usage 2024-03-18 19:32:35 +01:00
Ivan Krysak a58ccd159e ImportPE: fix the filters 2024-03-15 19:05:10 +01:00
Ivan Krysak 1b52530531 ABI-tests: turn temporary directory into "output" 2024-03-15 19:05:10 +01:00
Ivan Krysak d71fd7a1ad ABI-tests: strip model of irrelevant functions 2024-03-15 19:05:10 +01:00
Ivan Krysak 6feb9aa001 ABI-tests: rename replace-abi script 2024-03-15 19:05:10 +01:00
Ivan Krysak 5407c11a8f ABI: do not touch ABIs of unrelated functions 2024-03-15 19:05:10 +01:00
Ivan Krysak b0b1f10e72 ABI: move ToCABIFunctionType analysis to revng 2024-02-09 16:24:44 +01:00
Ivan Krysak e708a3655b ABI: drop incomplete clrcall support 2024-02-09 15:09:37 +00:00
Ivan Krysak e62d4f79ef ABI: remove an obsolete definition parameter
Since pointer to copy system got straightenned up, the old way of
marking them (`abi::Definition::UsePointerToCopyForStackArguments`)
is no longer needed.
2024-02-09 15:09:37 +00:00
Ivan Krysak 5a36d8fccf ABI-tests: update documentation 2024-02-09 15:09:37 +00:00
Ivan Krysak 94b6be25ae ABI-tests: check equivalence after compatibility
This does not change anything about the "successful" tests, but does
make "failing" ones slightly easier to debug - since "compatibility"
failures are generally easier to work with (they provide more explicit
information about the failure) that "equivalence" ones.
2024-02-09 15:09:37 +00:00
Ivan Krysak 27491410d6 ABI: introduce a way to disable vector registers 2024-02-09 15:09:37 +00:00
Ivan Krysak 4e81a34cd7 ABI: separate 'gcc' editions of microsoft ABIs 2024-02-09 15:09:37 +00:00
Ivan Krysak 3fdd7d8e8a ABI: introduce a way to set stack argument offset 2024-02-09 15:09:37 +00:00
Ivan Krysak 3efd08b07a ABI: fix microsoft x64 abi definitions 2024-02-09 15:09:37 +00:00
Ivan Krysak af6f9367b2 ImportPE: remove i386-specific values 2024-02-09 15:09:37 +00:00
Djordje Todorovic 79460c6933 PDBImport: Handle forward referenced types
A class or a struct type A can be a forward declaration and refer
to another type B in PDB, so we need to follow the references.
We pre-create type for B, when we face type A, and then, when we
visit type B, we populate the fields for the model::type we
pre-created.

In addition, this patch fixes some minor/side bugs:
  - Handle SHORT/Int16Short simple type
  - Do not delete model::Function if Prototype is invalid.
2024-02-09 15:09:37 +00:00
Ivan Krysak e16cf87106 ABI-tests: specify the default PDB location 2024-02-09 15:09:37 +00:00
Alessandro Di Federico aaa1b26468 AAPCS ABI: drop support for int128_t 2024-02-09 10:04:26 +01:00
Alessandro Di Federico 6cacb56c96 Reorganize test suite 2024-02-09 10:04:25 +01:00
Alessandro Di Federico 346b367c19 Drop revng efa-extractcfg 2024-02-09 10:04:25 +01:00
Alessandro Di Federico d9367954a4 Convert all public strings to kebab-case 2024-02-09 10:04:24 +01:00
Giacomo Vercesi 5978300476 codespell: ignore CSS files 2024-02-09 10:04:24 +01:00
Alessandro Di Federico 54025b48ff s/ConvertToRawFunctionType/ConvertFunctionsToRaw/g 2024-02-09 10:04:23 +01:00
Alessandro Di Federico a9aaa8ced4 s/ToCABIFunctionType/FunctionsToCABI/s 2024-02-09 10:04:23 +01:00
Alessandro Di Federico 2bdca8ab03 Rename steps and analyses 2024-02-09 10:04:22 +01:00
Alessandro Di Federico b4817a4f14 Rename pipelines file 2024-02-09 10:04:22 +01:00
Alessandro Di Federico b34031f828 Import sections into segment's struct
Each model::Segment is associated to a model::StructType. Now we also
create sub-`structs` for sections, if available.
2024-02-08 16:57:40 +01:00
Ivan Krysak 4cb38a722c ABI: disallow ABI flags to be optional 2024-01-29 11:57:54 +02:00
Ivan Krysak 386cb26f6d ABI: introduce a new ABI configuration option
It's called `AllowUnnaturallyAlignedTypesInRegisters` and explicitly
allows weirdly aligned structs in registers.
2024-01-29 11:57:54 +02:00
Massimo Fioravanti f6ff8e544d Add tracking debug infrastructure
Add a mechanism to make the program crash when a given element of the
model is read or written.
2024-01-02 11:14:56 +01:00
Massimo Fioravanti e5347b2910 Remove llvm pipeline 2024-01-02 11:14:55 +01:00
Alessandro Di Federico a3a549be48 EnforceABI step: reduce work done by InlineHelpers
InlineHelpers often inlines functions that contain a switch on an
argument that is constant on the call site. Specifically, this is true
for the `cc_compute_c` and `cc_compute_all` helpers of x86
architectures. The LLVM inliner, in such situations, is smart and
inlines a reduced amount of code, significantly reducing the maximum
size of the modules we work with.

However, before this commit, we couldn't capture this fact due to
`newpc` preventing constant propagation of the values of CSV set in an
instruction into their usage in the next instruction.

Running `PromoteCSV` before `InlineHelpers`, along with `mem2reg`
enables us to capture this behavior effectively.
2023-12-12 12:04:33 +01:00
Alessandro Di Federico 0e7d3a9a71 Pass PlainMetaAddress by pointer 2023-12-12 10:20:51 +01:00
Alessandro Di Federico 2e283fdf2a raise_exception_helper -> _abort and _unreachable 2023-12-12 10:20:35 +01:00