Commit 66ae3479 authored by Mostyn Bramley-Moore's avatar Mostyn Bramley-Moore Committed by Commit Bot

jumbo: Include src/compiler/*linkage.cc in jumbo compilation units

BUG=chromium:752428

Change-Id: I0d1f3a09ecd2ffb7bfd8120b212e88fd00008fc0
Reviewed-on: https://chromium-review.googlesource.com/608961Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Commit-Queue: Mostyn Bramley-Moore <mostynb@opera.com>
Cr-Commit-Position: refs/heads/master@{#47544}
parent 27fd52ab
......@@ -2076,9 +2076,6 @@ v8_source_set("v8_base") {
jumbo_excluded_sources = [
# TODO(mostynb@opera.com): don't exclude these http://crbug.com/752428
"src/profiler/heap-snapshot-generator.cc", # Macro clash in mman-linux.h
"src/compiler/c-linkage.cc", # Symbol clashes with linkage.cc
"src/compiler/wasm-linkage.cc", # regloc symbol clash with linkage.cc
"src/compiler/escape-analysis.cc", # Symbol clashes with new-escape-analysis.cc
"src/compiler/escape-analysis-reducer.cc", # Symbol clashes with new-escape-analysis-reducer.cc
]
......
......@@ -14,10 +14,6 @@ namespace internal {
namespace compiler {
namespace {
LinkageLocation regloc(Register reg, MachineType type) {
return LinkageLocation::ForRegister(reg.code(), type);
}
// Platform-specific configuration for C calling convention.
#if V8_TARGET_ARCH_IA32
......@@ -178,19 +174,21 @@ CallDescriptor* Linkage::GetSimplifiedCDescriptor(
CHECK(locations.return_count_ <= 2);
if (locations.return_count_ > 0) {
locations.AddReturn(regloc(kReturnRegister0, msig->GetReturn(0)));
locations.AddReturn(LinkageLocation::ForRegister(kReturnRegister0.code(),
msig->GetReturn(0)));
}
if (locations.return_count_ > 1) {
locations.AddReturn(regloc(kReturnRegister1, msig->GetReturn(1)));
locations.AddReturn(LinkageLocation::ForRegister(kReturnRegister1.code(),
msig->GetReturn(1)));
}
const int parameter_count = static_cast<int>(msig->parameter_count());
#ifdef PARAM_REGISTERS
const Register kParamRegisters[] = {PARAM_REGISTERS};
const v8::internal::Register kParamRegisters[] = {PARAM_REGISTERS};
const int kParamRegisterCount = static_cast<int>(arraysize(kParamRegisters));
#else
const Register* kParamRegisters = nullptr;
const v8::internal::Register* kParamRegisters = nullptr;
const int kParamRegisterCount = 0;
#endif
......@@ -202,7 +200,8 @@ 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], msig->GetParam(i)));
locations.AddParam(LinkageLocation::ForRegister(kParamRegisters[i].code(),
msig->GetParam(i)));
} else {
locations.AddParam(LinkageLocation::ForCallerFrameSlot(
-1 - stack_offset, msig->GetParam(i)));
......
......@@ -38,14 +38,6 @@ MachineType MachineTypeFor(ValueType type) {
}
}
LinkageLocation regloc(Register reg, MachineType type) {
return LinkageLocation::ForRegister(reg.code(), type);
}
LinkageLocation regloc(DoubleRegister reg, MachineType type) {
return LinkageLocation::ForRegister(reg.code(), type);
}
LinkageLocation stackloc(int i, MachineType type) {
return LinkageLocation::ForCallerFrameSlot(i, type);
}
......@@ -173,11 +165,12 @@ struct Allocator {
if (type == wasm::kWasmF32) {
int float_reg_code = reg.code() * 2;
DCHECK(float_reg_code < RegisterConfiguration::kMaxFPRegisters);
return regloc(DoubleRegister::from_code(float_reg_code),
return LinkageLocation::ForRegister(
DoubleRegister::from_code(float_reg_code).code(),
MachineTypeFor(type));
}
#endif
return regloc(reg, MachineTypeFor(type));
return LinkageLocation::ForRegister(reg.code(), MachineTypeFor(type));
} else {
int offset = -1 - stack_offset;
stack_offset += Words(type);
......@@ -186,7 +179,8 @@ struct Allocator {
} else {
// Allocate a general purpose register/stack location.
if (gp_offset < gp_count) {
return regloc(gp_regs[gp_offset++], MachineTypeFor(type));
return LinkageLocation::ForRegister(gp_regs[gp_offset++].code(),
MachineTypeFor(type));
} else {
int offset = -1 - stack_offset;
stack_offset += Words(type);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment