Add CFI-checking script and fix found CFI issues.
It is essential for the unwinder to know the stack size at any point.
Our assembly is manually annotated with this information, but it is
easy to make mistakes (e.g. cfi_restore_state handles register spills,
but does not restore CFI offset as one might easily assume).
Add python script which compares the CFI information to disassembly
and checks that they match (that is, it is checking that push/pop
instructions result in the expected CFI offset increment/decrement).
In general, this is unfeasible (as we would not need CFI otherwise),
but even conservative checks can catch many bugs.
Test: ./art/test.py -b -r
Change-Id: I232fc0a31fa6f28381e18fdf6aceaf0b8323f550
8 files changed