Conversation
Add lifting for vector comparisons, bitwise operations, widening and narrowing moves, multiply-long, negation, pairwise addition, shifts, swaps, transposes, tests, and interleaving operations. Use dedicated intrinsics for lane-wise operations and explicit IL for bitwise operations, register swaps, and scalar floating-point negation. Correct SIMD decoding, signedness, immediate types, D/Q operand widths, and reserved encodings. Support ARMv8 VMULL.P64 polynomial products. Add FLDMDBX/FLDMIAX and FSTMDBX/FSTMIAX lifting, accounting for the unused trailing word in addressing and writeback. Correct Thumb decoding of these forms, including SP-based transfers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR expands lifting for vector comparisons, bitwise operations, widening/narrowing moves, and more. Expansion includes all the ARMv7 instructions from this issue: https://github.com/Vector35/binaryninja/issues/1910
In addition to expanding lifting, I had to make fixes to the thumb-2 decoder. Here is a short summary:
vorr/vbic/vmvnimmediates: derive.i16/.i32types fromcmodeinstead of register bits, immediate payload bits, or a constantvmovl: preserve the encoded signedness instead of unconditionally marking all widening moves as unsignedvcge #0: include the F bit when selecting the data type so.f32is distinguished from.s32vmull.p64: add the ARMv8 polynomial-multiple decodingfldm*x/fstm*xencodings before selectingvpop/vpushaliasesI've uploaded my test binaries that I used for verification in addition to the binaries in this repository: https://github.com/Aarno-Labs/iot-binary-dataset (that are responsible for uncovering the issues)
armv7-dh-lifting-expansion.zip
Before:
After: