Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index 96c81609be937fb1fda59a51dbccb9ec837e5a38..474bb7773236aa1ff1690c17e30a0780271153ae 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -1923,10 +1923,10 @@ void MacroAssembler::InvokePrologue(const ParameterCount& expected, |
Label invoke; |
if (expected.is_immediate()) { |
DCHECK(actual.is_immediate()); |
+ mov(eax, actual.immediate()); |
if (expected.immediate() == actual.immediate()) { |
definitely_matches = true; |
} else { |
- mov(eax, actual.immediate()); |
const int sentinel = SharedFunctionInfo::kDontAdaptArgumentsSentinel; |
if (expected.immediate() == sentinel) { |
// Don't worry about adapting arguments for builtins that |
@@ -1944,10 +1944,10 @@ void MacroAssembler::InvokePrologue(const ParameterCount& expected, |
// Expected is in register, actual is immediate. This is the |
// case when we invoke function values without going through the |
// IC mechanism. |
+ mov(eax, actual.immediate()); |
cmp(expected.reg(), actual.immediate()); |
j(equal, &invoke); |
DCHECK(expected.reg().is(ebx)); |
- mov(eax, actual.immediate()); |
} else if (!expected.reg().is(actual.reg())) { |
// Both expected and actual are in (different) registers. This |
// is the case when we invoke functions using call and apply. |
@@ -1955,6 +1955,8 @@ void MacroAssembler::InvokePrologue(const ParameterCount& expected, |
j(equal, &invoke); |
DCHECK(actual.reg().is(eax)); |
DCHECK(expected.reg().is(ebx)); |
+ } else { |
+ Move(eax, actual.reg()); |
} |
} |