angr.analyses.decompiler.peephole_optimizations.bt_rflags_merge¶
- class angr.analyses.decompiler.peephole_optimizations.bt_rflags_merge.BTRflagsMergeBitExtraction¶
Bases:
PeepholeOptimizationExprBaseFold CF extractions from the flags merge that the libVEX 3.27+ amd64 BT/BTS/BTR/BTC lifting emits.
The new lifting preserves O/S/A/P/Z across BT-family instructions by writing
(amd64g_calculate_rflags_all(...) & 0x8D4) | bt_bitinto the flags thunk. A downstream condition that tests the tested bit (CF, bit 0) extracts it as(merge & 0x8D4 | bt_bit) & 1; since 0x8D4 has bit 0 cleared, this is justbt_bit, and folding it lets the (otherwise unreducible) rflags_all ccall become dead.- NAME = '(x & 0x8d4 | bit) & 1 => bit'¶
- expr_classes = (<class 'angr.ailment.expression.BinaryOp'>,)¶