Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index cc0f392f185212826144898536c1945fef233d7f..4c9764beb7497cf90bb58d4f39c4abba148c6f1b 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -2833,6 +2833,15 @@ void MacroAssembler::Move(Register dst, Register src) { |
} |
+void MacroAssembler::Move(Register dst, Immediate imm) { |
+ if (imm.is_zero()) { |
+ xor_(dst, dst); |
+ } else { |
+ mov(dst, imm); |
+ } |
+} |
+ |
+ |
void MacroAssembler::SetCounter(StatsCounter* counter, int value) { |
if (FLAG_native_code_counters && counter->Enabled()) { |
mov(Operand::StaticVariable(ExternalReference(counter)), Immediate(value)); |