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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent dad747e7
......@@ -1905,7 +1905,6 @@ LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement(
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 @@ LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement(
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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment