Revision: 14653
Author:   [email protected]
Date:     Mon May 13 23:53:46 2013
Log: BinaryOpStub::GenerateSmiStub() on 32bit would erroneously patch the IC in case of a gc requirement. Brought the behavior into line with ARM and x64. Also some cleanup to label names.

BUG=
[email protected]

Review URL: https://codereview.chromium.org/15102006
http://code.google.com/p/v8/source/detail?r=14653

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

=======================================
--- /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Tue May 7 14:01:53 2013 +++ /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Mon May 13 23:53:46 2013
@@ -1633,7 +1633,9 @@
     BinaryOpStub_GenerateSmiCode(
         masm, &call_runtime, ALLOW_HEAPNUMBER_RESULTS, op_);
   }
-  __ bind(&call_runtime);
+
+ // Code falls through if the result is not returned as either a smi or heap
+  // number.
   switch (op_) {
     case Token::ADD:
     case Token::SUB:
@@ -1653,6 +1655,27 @@
     default:
       UNREACHABLE();
   }
+
+  __ bind(&call_runtime);
+  switch (op_) {
+    case Token::ADD:
+    case Token::SUB:
+    case Token::MUL:
+    case Token::DIV:
+      GenerateRegisterArgsPush(masm);
+      break;
+    case Token::MOD:
+    case Token::BIT_OR:
+    case Token::BIT_AND:
+    case Token::BIT_XOR:
+    case Token::SAR:
+    case Token::SHL:
+    case Token::SHR:
+      break;
+    default:
+      UNREACHABLE();
+  }
+  GenerateCallRuntime(masm);
 }


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to