Chromium Code Reviews

Unified Diff: src/full-codegen/mips64/full-codegen-mips64.cc

Issue 2191663004: [fullcode][mips][mips64][ppc][s390] Avoid trashing of a home object when doing a count operation wi… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/full-codegen/mips64/full-codegen-mips64.cc
diff --git a/src/full-codegen/mips64/full-codegen-mips64.cc b/src/full-codegen/mips64/full-codegen-mips64.cc
index 902f510d1ae8403ef7f3c785865ad7bbf6e5939f..9ccd9c3411b7eff171f0cb639046917c0e5c8167 100644
--- a/src/full-codegen/mips64/full-codegen-mips64.cc
+++ b/src/full-codegen/mips64/full-codegen-mips64.cc
@@ -3203,25 +3203,23 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
VisitForStackValue(prop->obj()->AsSuperPropertyReference()->this_var());
VisitForAccumulatorValue(
prop->obj()->AsSuperPropertyReference()->home_object());
- PushOperand(result_register());
const Register scratch = a1;
__ ld(scratch, MemOperand(sp, kPointerSize));
- PushOperands(scratch, result_register());
+ PushOperands(result_register(), scratch, result_register());
EmitNamedSuperPropertyLoad(prop);
break;
}
case KEYED_SUPER_PROPERTY: {
VisitForStackValue(prop->obj()->AsSuperPropertyReference()->this_var());
- VisitForAccumulatorValue(
+ VisitForStackValue(
prop->obj()->AsSuperPropertyReference()->home_object());
- const Register scratch = a1;
- const Register scratch1 = a4;
- __ Move(scratch, result_register());
VisitForAccumulatorValue(prop->key());
- PushOperands(scratch, result_register());
+ const Register scratch1 = a1;
+ const Register scratch2 = a4;
__ ld(scratch1, MemOperand(sp, 2 * kPointerSize));
- PushOperands(scratch1, scratch, result_register());
+ __ ld(scratch2, MemOperand(sp, 1 * kPointerSize));
+ PushOperands(result_register(), scratch1, scratch2, result_register());
EmitKeyedSuperPropertyLoad(prop);
break;
}

Powered by Google App Engine