BinaryAnalysisPlatform / qemu

Official QEMU mirror
Other
9 stars 12 forks source link

fixed store in x86 flags register #6

Closed gitoleg closed 8 years ago

gitoleg commented 8 years ago

now it's posible to track store in CF, OF, ZF and SF bits of flag register. Algorithm works in next way. Two steps should be performed to understand what flag bits were changed. First step: necessary to compare previous flag register value with currently computed. If this value not equal then some bits in flag register were changed. Second step: necessary to check all bits, that are interested for us. flags_value & bit_mask - for current bit value, defined with bit_mask. So if previous bit value is not equal to present, then bit was changed. The only thing is left to do is to find out this current bit value: current_flags & bit_mask.

ivg commented 8 years ago

The review is finished. Summary:

  1. localize your changes to the target-i386/trace_helper.c
  2. store flags as a static variable
  3. store the whole data in the operand value.