angr.analyses.decompiler.peephole_optimizations.remove_int_fp_int_roundtrip¶
- class angr.analyses.decompiler.peephole_optimizations.remove_int_fp_int_roundtrip.RemoveIntFPIntRoundTrip¶
Bases:
PeepholeOptimizationExprBaseConv(F->sN, Conv(sN->F, x)) ==> x when the int -> FP conversion is exact.
That is the case when the FP significand holds every N-bit integer, and also for 64-bit integers on 32-bit x86: there, I64StoF64 only comes from x87
fild(SSE cannot convert 64-bit integers outside of 64-bit mode), which loads into the 80-bit format whose 64-bit significand holds any int64 (precision control does not apply to loads). VEX models the x87 registers as F64 regardless.fistpof an integral value is exact in every rounding mode, so the pair is a plain int64 copy, which compilers use to move 8 bytes at once.- NAME = 'Remove int -> FP -> int round trips'¶
- expr_classes = (<class 'angr.ailment.expression.Convert'>,)¶