Skip to content

Commit

Permalink
Support movz with operands of equal sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
yegord committed Jan 10, 2018
1 parent 505db12 commit 9b39ef9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/nc/arch/x86/X86InstructionAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,15 @@ class X86InstructionAnalyzerImpl {
break;
}
case UD_Imovzx: {
_[operand(0) ^= zero_extend(operand(1))];
auto operand0 = operand(0);
auto operand1 = operand(1);

if (operand0.size() > operand1.size()) {
_[std::move(operand0) ^= zero_extend(std::move(operand1))];
} else {
/* Yes, movzww exists: https://github.com/yegord/snowman/issues/153 */
_[std::move(operand0) ^= std::move(operand1)];
}
break;
}
case UD_Ineg: {
Expand Down

0 comments on commit 9b39ef9

Please sign in to comment.