When a register is redefined by an instruction, we should invalidate all
equivalences where that register is used:
Uses of that particular register (ex. $eax) as a simple register location
Uses of that register as a base register of dereferenced address (ex. deref->$eax+(-16))
Uses of its sub/super registers as a simple register location (ex. $rax, $ax...)
Uses of its sub/super registers as a base register of dereferenced address (ex. deref->$rax+(-8))
This patch introduces function RegisterEquivalence::invalidateAllRegUses as a wrapper of
RegisterEquivalence::invalidateRegEq, to address all of the mentioned equivalence invalidations.
In the example above, please notice that after $eax = MOV32ri 111111,
redefinition $eax should trigger invalidation of $rax equivalences,
which is not done, without this patch.
When a register is redefined by an instruction, we should invalidate all equivalences where that register is used:
$eax
) as a simple register locationderef->$eax+(-16)
)$rax
,$ax
...)deref->$rax+(-8)
)This patch introduces function
RegisterEquivalence::invalidateAllRegUses
as a wrapper ofRegisterEquivalence::invalidateRegEq
, to address all of the mentioned equivalence invalidations.In the example above, please notice that after
$eax = MOV32ri 111111
, redefinition$eax
should trigger invalidation of$rax
equivalences, which is not done, without this patch.