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

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

Issue 1266603002: [turbofan] Factor C call descriptor building into compiler/c-linkage.cc. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/ppc/linkage-ppc.cc ('k') | src/compiler/x87/linkage-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/x64/linkage-x64.cc
diff --git a/src/compiler/x64/linkage-x64.cc b/src/compiler/x64/linkage-x64.cc
index a49e6b3e35dc53d1b4d5f77212ab3eddf50f5304..559d8aab039f13ceb6da84178b290d5334469a31 100644
--- a/src/compiler/x64/linkage-x64.cc
+++ b/src/compiler/x64/linkage-x64.cc
@@ -12,12 +12,6 @@ namespace v8 {
namespace internal {
namespace compiler {
-#ifdef _WIN64
-const bool kWin64 = true;
-#else
-const bool kWin64 = false;
-#endif
-
struct X64LinkageHelperTraits {
static Register ReturnValueReg() { return rax; }
static Register ReturnValue2Reg() { return rdx; }
@@ -27,35 +21,6 @@ struct X64LinkageHelperTraits {
static Register InterpreterDispatchTableReg() { return rdi; }
static Register RuntimeCallFunctionReg() { return rbx; }
static Register RuntimeCallArgCountReg() { return rax; }
- static RegList CCalleeSaveRegisters() {
- if (kWin64) {
- return rbx.bit() | rdi.bit() | rsi.bit() | r12.bit() | r13.bit() |
- r14.bit() | r15.bit();
- } else {
- return rbx.bit() | r12.bit() | r13.bit() | r14.bit() | r15.bit();
- }
- }
- static RegList CCalleeSaveFPRegisters() {
- if (kWin64) {
- return (1 << xmm6.code()) | (1 << xmm7.code()) | (1 << xmm8.code()) |
- (1 << xmm9.code()) | (1 << xmm10.code()) | (1 << xmm11.code()) |
- (1 << xmm12.code()) | (1 << xmm13.code()) | (1 << xmm14.code()) |
- (1 << xmm15.code());
- } else {
- return 0;
- }
- }
- static Register CRegisterParameter(int i) {
- if (kWin64) {
- static Register register_parameters[] = {rcx, rdx, r8, r9};
- return register_parameters[i];
- } else {
- static Register register_parameters[] = {rdi, rsi, rdx, rcx, r8, r9};
- return register_parameters[i];
- }
- }
- static int CRegisterParametersLength() { return kWin64 ? 4 : 6; }
- static int CStackBackingStoreLength() { return kWin64 ? 4 : 0; }
};
typedef LinkageHelper<X64LinkageHelperTraits> LH;
@@ -85,12 +50,6 @@ CallDescriptor* Linkage::GetStubCallDescriptor(
}
-CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone,
- const MachineSignature* sig) {
- return LH::GetSimplifiedCDescriptor(zone, sig);
-}
-
-
CallDescriptor* Linkage::GetInterpreterDispatchDescriptor(Zone* zone) {
return LH::GetInterpreterDispatchDescriptor(zone);
}
« no previous file with comments | « src/compiler/ppc/linkage-ppc.cc ('k') | src/compiler/x87/linkage-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698