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

Side by Side Diff: src/compiler/linkage.cc

Issue 1289863003: [interpreter]: Changes to interpreter builtins for accumulator and register file registers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@fix_interpreter_initialization
Patch Set: Rename incoming_accumulator Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « src/compiler/linkage.h ('k') | src/compiler/raw-machine-assembler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/code-stubs.h" 5 #include "src/code-stubs.h"
6 #include "src/compiler.h" 6 #include "src/compiler.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/node.h" 9 #include "src/compiler/node.h"
10 #include "src/compiler/osr.h" 10 #include "src/compiler/osr.h"
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 Operator::kNoProperties, // properties 385 Operator::kNoProperties, // properties
386 kNoCalleeSaved, // callee-saved 386 kNoCalleeSaved, // callee-saved
387 kNoCalleeSaved, // callee-saved fp 387 kNoCalleeSaved, // callee-saved fp
388 CallDescriptor::kCanUseRoots | // flags 388 CallDescriptor::kCanUseRoots | // flags
389 flags, // flags 389 flags, // flags
390 "js-call"); 390 "js-call");
391 } 391 }
392 392
393 393
394 CallDescriptor* Linkage::GetInterpreterDispatchDescriptor(Zone* zone) { 394 CallDescriptor* Linkage::GetInterpreterDispatchDescriptor(Zone* zone) {
395 MachineSignature::Builder types(zone, 0, 3); 395 MachineSignature::Builder types(zone, 0, 5);
396 LocationSignature::Builder locations(zone, 0, 3); 396 LocationSignature::Builder locations(zone, 0, 5);
397 397
398 // Add registers for fixed parameters passed via interpreter dispatch. 398 // Add registers for fixed parameters passed via interpreter dispatch.
399 STATIC_ASSERT(0 == Linkage::kInterpreterBytecodeOffsetParameter); 399 STATIC_ASSERT(0 == Linkage::kInterpreterAccumulatorParameter);
400 types.AddParam(kMachAnyTagged);
401 locations.AddParam(regloc(kInterpreterAccumulatorRegister));
402
403 STATIC_ASSERT(1 == Linkage::kInterpreterRegisterFileParameter);
404 types.AddParam(kMachPtr);
405 locations.AddParam(regloc(kInterpreterRegisterFileRegister));
406
407 STATIC_ASSERT(2 == Linkage::kInterpreterBytecodeOffsetParameter);
400 types.AddParam(kMachIntPtr); 408 types.AddParam(kMachIntPtr);
401 locations.AddParam(regloc(kInterpreterBytecodeOffsetRegister)); 409 locations.AddParam(regloc(kInterpreterBytecodeOffsetRegister));
402 410
403 STATIC_ASSERT(1 == Linkage::kInterpreterBytecodeArrayParameter); 411 STATIC_ASSERT(3 == Linkage::kInterpreterBytecodeArrayParameter);
404 types.AddParam(kMachAnyTagged); 412 types.AddParam(kMachAnyTagged);
405 locations.AddParam(regloc(kInterpreterBytecodeArrayRegister)); 413 locations.AddParam(regloc(kInterpreterBytecodeArrayRegister));
406 414
407 STATIC_ASSERT(2 == Linkage::kInterpreterDispatchTableParameter); 415 STATIC_ASSERT(4 == Linkage::kInterpreterDispatchTableParameter);
408 types.AddParam(kMachPtr); 416 types.AddParam(kMachPtr);
409 locations.AddParam(regloc(kInterpreterDispatchTableRegister)); 417 locations.AddParam(regloc(kInterpreterDispatchTableRegister));
410 418
411 LinkageLocation target_loc = LinkageLocation::ForAnyRegister(); 419 LinkageLocation target_loc = LinkageLocation::ForAnyRegister();
412 return new (zone) CallDescriptor( // -- 420 return new (zone) CallDescriptor( // --
413 CallDescriptor::kCallCodeObject, // kind 421 CallDescriptor::kCallCodeObject, // kind
414 kMachNone, // target MachineType 422 kMachNone, // target MachineType
415 target_loc, // target location 423 target_loc, // target location
416 types.Build(), // machine_sig 424 types.Build(), // machine_sig
417 locations.Build(), // location_sig 425 locations.Build(), // location_sig
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 return LinkageLocation::ForCalleeFrameSlot(spill_index); 509 return LinkageLocation::ForCalleeFrameSlot(spill_index);
502 } else { 510 } else {
503 // Parameter. Use the assigned location from the incoming call descriptor. 511 // Parameter. Use the assigned location from the incoming call descriptor.
504 int parameter_index = 1 + index; // skip index 0, which is the target. 512 int parameter_index = 1 + index; // skip index 0, which is the target.
505 return incoming_->GetInputLocation(parameter_index); 513 return incoming_->GetInputLocation(parameter_index);
506 } 514 }
507 } 515 }
508 } // namespace compiler 516 } // namespace compiler
509 } // namespace internal 517 } // namespace internal
510 } // namespace v8 518 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/linkage.h ('k') | src/compiler/raw-machine-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698