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

Unified Diff: src/crankshaft/s390/lithium-codegen-s390.cc

Issue 2611193002: s390: fix smi compare in DoBoundsCheck (Closed)
Patch Set: fix1 Created 3 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/s390/lithium-codegen-s390.cc
diff --git a/src/crankshaft/s390/lithium-codegen-s390.cc b/src/crankshaft/s390/lithium-codegen-s390.cc
index ff8cec5e8f9d6f8a62e680f49962a9a6946e7e7e..7b287c9844ef899f292e1588948440efcfe38a8e 100644
--- a/src/crankshaft/s390/lithium-codegen-s390.cc
+++ b/src/crankshaft/s390/lithium-codegen-s390.cc
@@ -3911,13 +3911,14 @@ void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
Representation representation = instr->hydrogen()->length()->representation();
DCHECK(representation.Equals(instr->hydrogen()->index()->representation()));
DCHECK(representation.IsSmiOrInteger32());
+ Register temp = scratch0();
Condition cc = instr->hydrogen()->allow_equality() ? lt : le;
if (instr->length()->IsConstantOperand()) {
int32_t length = ToInteger32(LConstantOperand::cast(instr->length()));
Register index = ToRegister(instr->index());
if (representation.IsSmi()) {
- __ CmpLogicalP(index, Operand(Smi::FromInt(length)));
+ __ CmpLogicalSmiLiteral(index, Smi::FromInt(length), temp);
} else {
__ CmpLogical32(index, Operand(length));
}
@@ -3926,7 +3927,7 @@ void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
int32_t index = ToInteger32(LConstantOperand::cast(instr->index()));
Register length = ToRegister(instr->length());
if (representation.IsSmi()) {
- __ CmpLogicalP(length, Operand(Smi::FromInt(index)));
+ __ CmpLogicalSmiLiteral(length, Smi::FromInt(index), temp);
} else {
__ CmpLogical32(length, Operand(index));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698