Commit Graph

30 Commits

Author SHA1 Message Date
Ivan Krysak 1f439cbb8c ABI-testing: extend to support unusual alignment
Because it's often hard to predict the specific location of an argument when
non-natural alignment is concerned, this adds an extra check allowing
the cases to pass if they would be well-formed if only some pesky
"extra" bytes were to disappear.
2023-03-15 10:19:03 +01:00
Ivan Krysak 750b6361a8 ABI-testing: add SPTARV support 2023-03-15 10:19:03 +01:00
Ivan Krysak d65ed50e0b ABI-testing: allow explicit abi overrides
Since dwarf sometimes misdetects abi pretty badly, to maintain
the usefulness of the test, it's beneficial to sometimes discard
the "detected" ABI by overriding it by the known value.

This also add a check ensuring that all the functions presents in
the artifact are also present in the binary.
2023-03-15 10:19:03 +01:00
Ivan Krysak a7be2cd11b ABI-testing: improve robustness against padding
Some cases of irregular padding were causing issues when verifying
arguments which varanted a bit of the rework of the main verification
loop.
2023-03-15 10:19:03 +01:00
Ivan Krysak 15f8999fce ABI-testing: simplify compatibility checker
The complicated error handling logic turned out to be more of
a nuisance than a useful debugging tool. This commit removes it
in favour of `revng_abort`'ing or `revng_check`'ing to make sure
the actual state is consistent with the expectations.

It also adds namespace to `std::size_t` mentions.
2023-03-15 10:19:03 +01:00
Ivan Krysak 89b3def533 ABI: move RegisterOrder onto the runtime trait 2023-03-15 10:19:02 +01:00
Ivan Krysak 9e393578c9 ABI: move state deduction onto the runtime trait 2023-03-15 10:19:02 +01:00
Ivan Krysak 58b33ea7af ABI-testing: make rtf-equivalence id-independent 2023-03-15 10:19:02 +01:00
Ivan Krysak 7daa187107 ABI-testing: support returning values as a pointer 2023-03-15 10:19:02 +01:00
Ivan Krysak ad0fc079b8 ABI-testing: rename verify-abi
The new name is `check-compatibility-with-abi`
2023-03-15 10:19:02 +01:00
Ivan Krysak 01a05e2037 ABI: separate convertions based on the direction 2023-03-15 10:19:02 +01:00
Massimo Fioravanti 742e1a0c56 TupleTree: switch from public fields to accessors 2022-12-12 18:36:57 +01:00
Ivan Krysak 535c9dd346 ABI: remove MinimumStackArgumentSize value
The architecture-specific pointer (generic register) size is used
instead.

For all the ABIs we support the value of this parameter was already
set to its pointer size. We might need to reintroduce the parameter
in the future if we want to support a super-exotic ABI with different
stack alignment requirements, but that seems highly unlikely.

This also introduces the argument extension helper for one stop all
treating small arguments when they are put into a register or pushed
into the stack.
2022-11-30 15:06:54 +01:00
Alessandro Di Federico 85d574b305 test-abi: various fixes 2022-09-21 18:39:28 +02:00
Ivan Krysak 240f334d78 Fix minor wording issues 2022-08-05 17:27:56 +03:00
Davide Depau 8d89be44fc Add initialization utility to all main functions 2022-07-22 21:04:03 +02:00
Alessandro Di Federico f4684e244d Switch to new testsuite 2022-06-20 19:04:18 +02:00
Giacomo Vercesi d81dc49809 revng-check-conventions: license check 2022-04-20 09:55:18 +02:00
Giacomo Vercesi 52a5c700e1 revng-check-conventions: add shellcheck
Add bash script checks with shellcheck + `set` rule.
Also, all existing bash scripts have been fixed.
2022-04-20 09:54:51 +02:00
Pietro Fezzardi e40ded965f QualifiedType RawFunctionType.StackArgumentsType
The `StackArgumentsType` field of `RawFunctionType` was the only
cross-reference between `model::Type`s that did not use
`model::QualifiedType` but a naked `TupleTreeReference`.

Switching it to `QualifiedType` make all cross-references across
`model::Type`s homogeneous.
2022-04-08 18:58:58 +02:00
Alessandro Di Federico f6c9b04c81 Adopt clang-tidy: readability-identifier-naming 2022-04-04 21:15:52 +02:00
Ivan Krysak c7fe3b0a42 Improve ABI testing artifact naming 2022-03-28 15:43:34 +02:00
Ivan Krysak 2313335feb abi-verify: move to a byte array-oriented approach 2022-03-28 15:43:34 +02:00
Ivan Krysak a7617f3567 Describe the ABI testing utilities 2022-03-28 15:43:32 +02:00
Ivan Krysak 23173aef29 Add a specialized model comparison tool
It fixes mistreated RFT stack arguments before relying on model passes
for the comparison itself.
2022-03-28 15:38:04 +02:00
Ivan Krysak 974229b171 Optimize the ABI testing script 2022-03-28 15:38:01 +02:00
Ivan Krysak 640ab18d60 Rework renvg-abi-verify 2022-03-28 15:38:01 +02:00
Ivan Krysak fdfaf754c0 Improve ABI test directory name and tags 2022-03-28 15:37:59 +02:00
Alessandro Di Federico 2b55d1df22 Adopt cmake-format 2022-03-17 18:52:18 +01:00
Ivan Krysak 1df6bbc6d6 Introduce ABI testing infrastructure 2022-02-14 13:35:37 +01:00