Index: src/compiler/ppc/linkage-ppc.cc |
diff --git a/src/compiler/arm64/linkage-arm64.cc b/src/compiler/ppc/linkage-ppc.cc |
similarity index 72% |
copy from src/compiler/arm64/linkage-arm64.cc |
copy to src/compiler/ppc/linkage-ppc.cc |
index 352a4bcd969c50873235f7175c47cbbf9f6b9e22..96dcaaa5b2bc6df16b438ce94d70de1833da2a6a 100644 |
--- a/src/compiler/arm64/linkage-arm64.cc |
+++ b/src/compiler/ppc/linkage-ppc.cc |
@@ -14,26 +14,28 @@ namespace v8 { |
namespace internal { |
namespace compiler { |
-struct Arm64LinkageHelperTraits { |
- static Register ReturnValueReg() { return x0; } |
- static Register ReturnValue2Reg() { return x1; } |
- static Register JSCallFunctionReg() { return x1; } |
+struct PPCLinkageHelperTraits { |
+ static Register ReturnValueReg() { return r3; } |
+ static Register ReturnValue2Reg() { return r4; } |
+ static Register JSCallFunctionReg() { return r4; } |
static Register ContextReg() { return cp; } |
- static Register RuntimeCallFunctionReg() { return x1; } |
- static Register RuntimeCallArgCountReg() { return x0; } |
+ static Register RuntimeCallFunctionReg() { return r4; } |
+ static Register RuntimeCallArgCountReg() { return r3; } |
static RegList CCalleeSaveRegisters() { |
- // TODO(dcarney): correct callee saved registers. |
- return 0; |
+ return r14.bit() | r15.bit() | r16.bit() | r17.bit() | r18.bit() | |
+ r19.bit() | r20.bit() | r21.bit() | r22.bit() | r23.bit() | |
+ r24.bit() | r25.bit() | r26.bit() | r27.bit() | r28.bit() | |
+ r29.bit() | r30.bit() | fp.bit(); |
} |
static Register CRegisterParameter(int i) { |
- static Register register_parameters[] = {x0, x1, x2, x3, x4, x5, x6, x7}; |
+ static Register register_parameters[] = {r3, r4, r5, r6, r7, r8, r9, r10}; |
return register_parameters[i]; |
} |
static int CRegisterParametersLength() { return 8; } |
}; |
-typedef LinkageHelper<Arm64LinkageHelperTraits> LH; |
+typedef LinkageHelper<PPCLinkageHelperTraits> LH; |
CallDescriptor* Linkage::GetJSCallDescriptor(Zone* zone, bool is_osr, |
int parameter_count, |