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

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

Issue 190783002: A64: Improve constraints on StoreKeyed instructions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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
« no previous file with comments | « no previous file | src/a64/lithium-codegen-a64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/lithium-a64.cc
diff --git a/src/a64/lithium-a64.cc b/src/a64/lithium-a64.cc
index cf89c09f5b2515d2dbc0b6cabe667b10245eb9ea..38f9c731041430afd0955a52e42194d4e695fb5b 100644
--- a/src/a64/lithium-a64.cc
+++ b/src/a64/lithium-a64.cc
@@ -2169,7 +2169,7 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
LOperand* temp = NULL;
LOperand* elements = NULL;
LOperand* val = NULL;
- LOperand* key = NULL;
+ LOperand* key = UseRegisterOrConstantAtStart(instr->key());
if (!instr->is_typed_elements() &&
instr->value()->representation().IsTagged() &&
@@ -2177,11 +2177,11 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
// RecordWrite() will clobber all registers.
elements = UseRegisterAndClobber(instr->elements());
val = UseRegisterAndClobber(instr->value());
- key = UseRegisterAndClobber(instr->key());
+ temp = TempRegister();
} else {
elements = UseRegister(instr->elements());
val = UseRegister(instr->value());
- key = UseRegisterOrConstantAtStart(instr->key());
+ temp = instr->key()->IsConstant() ? NULL : TempRegister();
}
if (instr->is_typed_elements()) {
@@ -2193,23 +2193,16 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
instr->elements()->representation().IsTagged()) ||
(instr->is_external() &&
instr->elements()->representation().IsExternal()));
- temp = instr->key()->IsConstant() ? NULL : TempRegister();
return new(zone()) LStoreKeyedExternal(elements, key, val, temp);
} else if (instr->value()->representation().IsDouble()) {
ASSERT(instr->elements()->representation().IsTagged());
-
- // The constraint used here is UseRegister, even though the StoreKeyed
- // instruction may canonicalize the value in the register if it is a NaN.
- temp = TempRegister();
return new(zone()) LStoreKeyedFixedDouble(elements, key, val, temp);
} else {
ASSERT(instr->elements()->representation().IsTagged());
ASSERT(instr->value()->representation().IsSmiOrTagged() ||
instr->value()->representation().IsInteger32());
-
- temp = TempRegister();
return new(zone()) LStoreKeyedFixed(elements, key, val, temp);
}
}
« no previous file with comments | « no previous file | src/a64/lithium-codegen-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698