BinaryAnalysisPlatform / bap

Binary Analysis Platform
MIT License
2.05k stars 271 forks source link

fixes handling modified immediate constants in ARM T32 encoding #1374

Closed ivg closed 2 years ago

ivg commented 2 years ago

We use the old ARM lifter to handle T32 instructions but, unlike in ARM, LLVM does decode modified immediate constants in T32 mode so we don't need to decode them twice. This change uses the encoding of the instruction for deciding whether the immediate is in the shifted form or is already decoded.

Thanks @ccasin for detecting the problem.