Revision: 11383
Author:   [email protected]
Date:     Thu Apr 19 03:28:17 2012
Log:      Fix mod on ia32 without SSE2.

Review URL: https://chromiumcodereview.appspot.com/10128004
http://code.google.com/p/v8/source/detail?r=11383

Modified:
 /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc

=======================================
--- /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Thu Apr 19 00:19:33 2012 +++ /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Thu Apr 19 03:28:17 2012
@@ -1734,6 +1734,9 @@
             FloatingPointHelper::ARGS_IN_REGISTERS);
         FloatingPointHelper::CheckFloatOperandsAreInt32(masm, &not_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 {

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to