symqemu icon indicating copy to clipboard operation
symqemu copied to clipboard

PC/eip is not updated within a basic block

Open enlighten5 opened this issue 1 year ago • 0 comments

QEMU does not update the pc within a basic block at runtime. Specifically,

  1. Instructions in one basic block will have the same pc as the first instruction.

  2. Blocks that are patched together by a jump instruction will have the same pc, i.e., pc will be not updated by the jump.

QEMU might do this for a better performance. but the pc is used by the backend for branch filtering and basic block pruning, an accurate pc can lead to better pruning results.

I have a fix in this commit. Please let me know if it makes sense.

Thank you!

enlighten5 avatar Apr 20 '23 21:04 enlighten5