Index: src/ia32/lithium-ia32.cc |
=================================================================== |
--- src/ia32/lithium-ia32.cc (revision 7408) |
+++ src/ia32/lithium-ia32.cc (working copy) |
@@ -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; |
@@ -1916,6 +1915,15 @@ |
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, |
val, |