Research Article

An Efficient Platform for the Automatic Extraction of Patterns in Native Code

Algorithm 7

Pattern generalization rule of move instructions.
Function  MOVE_generalization(instruction)
if  .mnemonic in  [mov, movzx, movsd, movss, movsx]
      and  .operands.type = register
      and  .operands.value in [eax, ax, ah, al]  then
  .mnemonic    <mov>
  .operands.value    <generic ax>
  .operands.value    <any>
end if
return  ( , next(instruction))
end