Index: src/ia32/code-stubs-ia32.cc |
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc |
index 229e8fc536599476abb765d3f82835cab8a3e455..6cd02338977eb0e5086375074b8e24bbef8786f3 100644 |
--- a/src/ia32/code-stubs-ia32.cc |
+++ b/src/ia32/code-stubs-ia32.cc |
@@ -1734,6 +1734,9 @@ void BinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) { |
FloatingPointHelper::ARGS_IN_REGISTERS); |
FloatingPointHelper::CheckFloatOperandsAreInt32(masm, ¬_int32); |
if (op_ == Token::MOD) { |
+ // The operands are now on the FPU stack, but we don't need them. |
+ __ fstp(0); |
+ __ fstp(0); |
GenerateRegisterArgsPush(masm); |
__ InvokeBuiltin(Builtins::MOD, JUMP_FUNCTION); |
} else { |