Revision: 7417
Author:   fschnei...@chromium.org
Date:     Tue Mar 29 08:19:42 2011
Log:      Use a fixed input register where we require a byte register.

Currently we can't specify a set of registers as a register constraint.
This change forces a fixed register (eax) in places that need
a byte register.

BUG=77752
Review URL: http://codereview.chromium.org/6708109
http://code.google.com/p/v8/source/detail?r=7417

Modified:
 /branches/bleeding_edge/src/ia32/lithium-ia32.cc

=======================================
--- /branches/bleeding_edge/src/ia32/lithium-ia32.cc Tue Mar 29 03:51:35 2011 +++ /branches/bleeding_edge/src/ia32/lithium-ia32.cc Tue Mar 29 08:19:42 2011
@@ -1905,7 +1905,6 @@
   ASSERT(instr->key()->representation().IsInteger32());

   LOperand* external_pointer = UseRegister(instr->external_pointer());
-  LOperand* val = UseRegister(instr->value());
   LOperand* key = UseRegister(instr->key());
   LOperand* temp = NULL;

@@ -1915,6 +1914,15 @@
     // requirement.
     temp = FixedTemp(eax);
   }
+
+  LOperand* val = NULL;
+  if (array_type == kExternalByteArray ||
+      array_type == kExternalUnsignedByteArray) {
+    // We need a byte register in this case for the value.
+    val = UseFixed(instr->value(), eax);
+  } else {
+    val = UseRegister(instr->value());
+  }

   return new LStoreKeyedSpecializedArrayElement(external_pointer,
                                                 key,

--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev

Reply via email to