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

Unified Diff: src/compiler/c-linkage.cc

Issue 2124023003: [turbofan] Add MachineType to LinkageLocation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 5 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 | « src/compiler/arm/instruction-selector-arm.cc ('k') | src/compiler/ia32/instruction-selector-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/c-linkage.cc
diff --git a/src/compiler/c-linkage.cc b/src/compiler/c-linkage.cc
index b38e529f9fa1caa2e00095f243e5da409e38dcea..7d05a8d42973bf68149415928ede0b6fb2dd0c13 100644
--- a/src/compiler/c-linkage.cc
+++ b/src/compiler/c-linkage.cc
@@ -14,8 +14,8 @@ namespace internal {
namespace compiler {
namespace {
-LinkageLocation regloc(Register reg) {
- return LinkageLocation::ForRegister(reg.code());
+LinkageLocation regloc(Register reg, MachineType type) {
+ return LinkageLocation::ForRegister(reg.code(), type);
}
@@ -182,10 +182,10 @@ CallDescriptor* Linkage::GetSimplifiedCDescriptor(
CHECK(locations.return_count_ <= 2);
if (locations.return_count_ > 0) {
- locations.AddReturn(regloc(kReturnRegister0));
+ locations.AddReturn(regloc(kReturnRegister0, msig->GetReturn(0)));
}
if (locations.return_count_ > 1) {
- locations.AddReturn(regloc(kReturnRegister1));
+ locations.AddReturn(regloc(kReturnRegister1, msig->GetReturn(1)));
}
const int parameter_count = static_cast<int>(msig->parameter_count());
@@ -207,10 +207,10 @@ CallDescriptor* Linkage::GetSimplifiedCDescriptor(
// Add register and/or stack parameter(s).
for (int i = 0; i < parameter_count; i++) {
if (i < kParamRegisterCount) {
- locations.AddParam(regloc(kParamRegisters[i]));
+ locations.AddParam(regloc(kParamRegisters[i], msig->GetParam(i)));
} else {
- locations.AddParam(
- LinkageLocation::ForCallerFrameSlot(-1 - stack_offset));
+ locations.AddParam(LinkageLocation::ForCallerFrameSlot(
+ -1 - stack_offset, msig->GetParam(i)));
stack_offset++;
}
}
@@ -229,7 +229,7 @@ CallDescriptor* Linkage::GetSimplifiedCDescriptor(
// The target for C calls is always an address (i.e. machine pointer).
MachineType target_type = MachineType::Pointer();
- LinkageLocation target_loc = LinkageLocation::ForAnyRegister();
+ LinkageLocation target_loc = LinkageLocation::ForAnyRegister(target_type);
CallDescriptor::Flags flags = CallDescriptor::kUseNativeStack;
if (set_initialize_root_flag) {
flags |= CallDescriptor::kInitializeRootRegister;
@@ -239,7 +239,6 @@ CallDescriptor* Linkage::GetSimplifiedCDescriptor(
CallDescriptor::kCallAddress, // kind
target_type, // target MachineType
target_loc, // target location
- msig, // machine_sig
locations.Build(), // location_sig
0, // stack_parameter_count
Operator::kNoProperties, // properties
« no previous file with comments | « src/compiler/arm/instruction-selector-arm.cc ('k') | src/compiler/ia32/instruction-selector-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698