remill icon indicating copy to clipboard operation
remill copied to clipboard

Uniform handling of undefined aflags

Open lkorenc opened this issue 4 years ago • 0 comments

After some instructions, value inside some arithmetic flags may be undefined. X86 semantics currently handle this non-uniformly by either using __remill_undefined_* intrinsics, storing arbitrary values, or ignoring the undefined value altogether.

Ideal solution would be to always use __remill_undefined_* but add an extra argument, that can be used to indicate a preferred value. Unfortunately a list of all affected instructions is rather long. Non-exhaustive list of instructions to check:

  • [ ] IDIV
  • [ ] ROR, RCL, ...
  • [ ] BTS, BTR, BTC, ...

lkorenc avatar Sep 09 '21 11:09 lkorenc