Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Unified Diff: src/x64/lithium-x64.cc

Issue 6708109: Use a fixed input register where we require a byte register. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/ia32/lithium-ia32.cc ('K') | « src/ia32/lithium-ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« src/ia32/lithium-ia32.cc ('K') | « src/ia32/lithium-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698