Index: src/x64/lithium-x64.cc |
=================================================================== |
--- src/x64/lithium-x64.cc (revision 7402) |
+++ src/x64/lithium-x64.cc (working copy) |
@@ -1873,11 +1873,22 @@ |
ASSERT(instr->key()->representation().IsInteger32()); |
LOperand* external_pointer = UseRegister(instr->external_pointer()); |
- bool val_is_temp_register = array_type == kExternalPixelArray || |
- array_type == kExternalFloatArray; |
- LOperand* val = val_is_temp_register |
- ? UseTempRegister(instr->value()) |
- : UseRegister(instr->key()); |
+ LOperand* val = NULL; |
+ switch (array_type) { |
+ case kExternalPixelArray: |
danno
2011/03/29 14:25:34
Doesn't pixel array still need to be a temp, since
fschneider
2011/03/29 14:43:58
That would be ok, since UseFixed is always a fixed
|
+ case kExternalByteArray: |
+ case kExternalUnsignedByteArray: |
+ // We need a byte register in these cases. |
+ val = UseFixed(instr->value(), rax); |
danno
2011/03/29 14:25:34
Do you really need to use rax? On 64 bit the byte
fschneider
2011/03/29 14:43:58
You're right. I didn't realize x64 allows that. I
|
+ break; |
+ case kExternalFloatArray: |
+ // We need a writable register here. |
+ val = UseTempRegister(instr->value()); |
+ break; |
+ default: |
+ val = UseRegister(instr->value()); |
+ break; |
+ } |
LOperand* key = UseRegister(instr->key()); |
return new LStoreKeyedSpecializedArrayElement(external_pointer, |