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

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

Issue 1211333003: Make context register implicit for CallInterfaceDescriptors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Platform ports Created 5 years, 6 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
Index: src/mips64/lithium-mips64.cc
diff --git a/src/mips64/lithium-mips64.cc b/src/mips64/lithium-mips64.cc
index c243671106a5f7e1a923d9c2b49b6ea986f5b5a4..3df4defc7af739a65a1a08650817fb20a4a6b049 100644
--- a/src/mips64/lithium-mips64.cc
+++ b/src/mips64/lithium-mips64.cc
@@ -1097,11 +1097,19 @@ LInstruction* LChunkBuilder::DoCallWithDescriptor(
LOperand* target = UseRegisterOrConstantAtStart(instr->target());
ZoneList<LOperand*> ops(instr->OperandCount(), zone());
+ // Target
ops.Add(target, zone());
- for (int i = 1; i < instr->OperandCount(); i++) {
- LOperand* op =
- UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1));
- ops.Add(op, zone());
+ // Context
+ LOperand* op = UseFixed(instr->OperandAt(1), cp);
+ ops.Add(op, zone());
+ // Other register parameters
+ for (int i = LCallWithDescriptor::kImplicitRegisterParameterCount;
+ i < instr->OperandCount(); i++) {
+ op =
+ UseFixed(instr->OperandAt(i),
+ descriptor.GetRegisterParameter(
+ i - LCallWithDescriptor::kImplicitRegisterParameterCount));
+ ops.Add(op, zone());
}
LCallWithDescriptor* result = new(zone()) LCallWithDescriptor(
@@ -2453,7 +2461,7 @@ LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
CallInterfaceDescriptor descriptor =
info()->code_stub()->GetCallInterfaceDescriptor();
int index = static_cast<int>(instr->index());
- Register reg = descriptor.GetEnvironmentParameterRegister(index);
+ Register reg = descriptor.GetRegisterParameter(index);
return DefineFixed(result, reg);
}
}
« src/code-stubs.h ('K') | « src/mips64/lithium-mips64.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698