macaw/macaw-aarch32/tests
Tristan Ravitch 6a4f406c68 Revisit handling of tail calls
It turns out that we have to be more conservative with tail call identification,
as incorrectly identifying a block as the target of a tail call (instead of a
branch) can cause other branch classifiers to fail if that block is the target
of another jump.

Ultimately, we will need to give up some tail call recognition (since they are
in general indistinguishable from jumps), and instead only identify known call
targets as tail call candidates.

With additional global analysis we could do better.

Fixes #294
2022-06-27 15:02:43 -07:00
..
arm Revisit handling of tail calls 2022-06-27 15:02:43 -07:00
ARMTests.hs Fix -Wincomplete-uni-patterns warnings 2022-05-31 15:50:48 -04:00
MismatchTests.hs Fix macaw-aarch32 tests. 2020-11-12 19:22:20 -08:00
README.md Support for mixed ARM/Thumb binaries (#174) 2020-11-02 12:48:01 -08:00
Shared.hs Fix -Wincomplete-uni-patterns warnings 2022-05-31 15:50:48 -04:00
TestMain.hs AArch32: Support conditional returns (#243) 2021-11-19 16:20:50 -08:00

Overview

The tests in this directory attempt to test both ARM and Thumb decoding/discovery. The test suite only runs on the binaries with corresponding .mcw.expected files, which describe the expected discovered basic blocks.

  • test-just-exit-a32.exe: Ensures that the very basics of anything at all works
  • test-conditional-a32.exe: Ensures that conditional branches in A32 mode are handled correctly
  • test-direct-call-a32.exe: Ensures that call and return sequences work in A32 mode
  • test-direct-call-t32.exe: Ensures that transitions (via call) to Thumb mode work correctly
  • test-conditional-mixed.exe: Ensures that multi-block Thumb functions are handled correctly
  • test-just-exit-t32.exe: Ensures that Thumb entry points work correctly

Notes

The test-just-exit-t32.exe test is interesting because executables with Thumb entry points have the low bit set (even though it isn't technically the address where the function starts - it happens to work because the ISA clears the bit before jumping). We want to make sure that macaw handles it correctly.