| Index: src/ppc/interface-descriptors-ppc.cc
|
| diff --git a/src/mips/interface-descriptors-mips.cc b/src/ppc/interface-descriptors-ppc.cc
|
| similarity index 76%
|
| copy from src/mips/interface-descriptors-mips.cc
|
| copy to src/ppc/interface-descriptors-ppc.cc
|
| index 936ce20acc358138c314e910ab8ce45b88758e1a..260b129a3803dc6a815e604dbcf1ae0406a692d5 100644
|
| --- a/src/mips/interface-descriptors-mips.cc
|
| +++ b/src/ppc/interface-descriptors-ppc.cc
|
| @@ -1,10 +1,13 @@
|
| // Copyright 2012 the V8 project authors. All rights reserved.
|
| +//
|
| +// Copyright IBM Corp. 2012, 2013. All rights reserved.
|
| +//
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| #include "src/v8.h"
|
|
|
| -#if V8_TARGET_ARCH_MIPS
|
| +#if V8_TARGET_ARCH_PPC
|
|
|
| #include "src/interface-descriptors.h"
|
|
|
| @@ -14,36 +17,35 @@ namespace internal {
|
| const Register CallInterfaceDescriptor::ContextRegister() { return cp; }
|
|
|
|
|
| -const Register LoadDescriptor::ReceiverRegister() { return a1; }
|
| -const Register LoadDescriptor::NameRegister() { return a2; }
|
| +const Register LoadDescriptor::ReceiverRegister() { return r4; }
|
| +const Register LoadDescriptor::NameRegister() { return r5; }
|
|
|
|
|
| -const Register VectorLoadICTrampolineDescriptor::SlotRegister() { return a0; }
|
| +const Register VectorLoadICTrampolineDescriptor::SlotRegister() { return r3; }
|
|
|
|
|
| -const Register VectorLoadICDescriptor::VectorRegister() { return a3; }
|
| +const Register VectorLoadICDescriptor::VectorRegister() { return r6; }
|
|
|
|
|
| -const Register StoreDescriptor::ReceiverRegister() { return a1; }
|
| -const Register StoreDescriptor::NameRegister() { return a2; }
|
| -const Register StoreDescriptor::ValueRegister() { return a0; }
|
| +const Register StoreDescriptor::ReceiverRegister() { return r4; }
|
| +const Register StoreDescriptor::NameRegister() { return r5; }
|
| +const Register StoreDescriptor::ValueRegister() { return r3; }
|
|
|
|
|
| -const Register ElementTransitionAndStoreDescriptor::MapRegister() { return a3; }
|
| +const Register ElementTransitionAndStoreDescriptor::MapRegister() { return r6; }
|
|
|
|
|
| -const Register InstanceofDescriptor::left() { return a0; }
|
| -const Register InstanceofDescriptor::right() { return a1; }
|
| +const Register InstanceofDescriptor::left() { return r3; }
|
| +const Register InstanceofDescriptor::right() { return r4; }
|
|
|
|
|
| -const Register ArgumentsAccessReadDescriptor::index() { return a1; }
|
| -const Register ArgumentsAccessReadDescriptor::parameter_count() { return a0; }
|
| +const Register ArgumentsAccessReadDescriptor::index() { return r4; }
|
| +const Register ArgumentsAccessReadDescriptor::parameter_count() { return r3; }
|
|
|
|
|
| -const Register ApiGetterDescriptor::function_address() { return a2; }
|
| +const Register ApiGetterDescriptor::function_address() { return r5; }
|
|
|
| -
|
| -const Register MathPowTaggedDescriptor::exponent() { return a2; }
|
| +const Register MathPowTaggedDescriptor::exponent() { return r5; }
|
|
|
|
|
| const Register MathPowIntegerDescriptor::exponent() {
|
| @@ -52,32 +54,32 @@ const Register MathPowIntegerDescriptor::exponent() {
|
|
|
|
|
| void FastNewClosureDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| - Register registers[] = {cp, a2};
|
| + Register registers[] = {cp, r5};
|
| data->Initialize(arraysize(registers), registers, NULL);
|
| }
|
|
|
|
|
| void FastNewContextDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| - Register registers[] = {cp, a1};
|
| + Register registers[] = {cp, r4};
|
| data->Initialize(arraysize(registers), registers, NULL);
|
| }
|
|
|
|
|
| void ToNumberDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| - Register registers[] = {cp, a0};
|
| + Register registers[] = {cp, r3};
|
| data->Initialize(arraysize(registers), registers, NULL);
|
| }
|
|
|
|
|
| void NumberToStringDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| - Register registers[] = {cp, a0};
|
| + Register registers[] = {cp, r3};
|
| data->Initialize(arraysize(registers), registers, NULL);
|
| }
|
|
|
|
|
| void FastCloneShallowArrayDescriptor::Initialize(
|
| CallInterfaceDescriptorData* data) {
|
| - Register registers[] = {cp, a3, a2, a1};
|
| + Register registers[] = {cp, r6, r5, r4};
|
| Representation representations[] = {
|
| Representation::Tagged(), Representation::Tagged(), Representation::Smi(),
|
| Representation::Tagged()};
|
| @@ -87,34 +89,34 @@ void FastCloneShallowArrayDescriptor::Initialize(
|
|
|
| void FastCloneShallowObjectDescriptor::Initialize(
|
| CallInterfaceDescriptorData* data) {
|
| - Register registers[] = {cp, a3, a2, a1, a0};
|
| + Register registers[] = {cp, r6, r5, r4, r3};
|
| data->Initialize(arraysize(registers), registers, NULL);
|
| }
|
|
|
|
|
| void CreateAllocationSiteDescriptor::Initialize(
|
| CallInterfaceDescriptorData* data) {
|
| - Register registers[] = {cp, a2, a3};
|
| + Register registers[] = {cp, r5, r6};
|
| data->Initialize(arraysize(registers), registers, NULL);
|
| }
|
|
|
|
|
| void StoreArrayLiteralElementDescriptor::Initialize(
|
| CallInterfaceDescriptorData* data) {
|
| - Register registers[] = {cp, a3, a0};
|
| + Register registers[] = {cp, r6, r3};
|
| data->Initialize(arraysize(registers), registers, NULL);
|
| }
|
|
|
|
|
| void CallFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| - Register registers[] = {cp, a1};
|
| + Register registers[] = {cp, r4};
|
| data->Initialize(arraysize(registers), registers, NULL);
|
| }
|
|
|
|
|
| void CallFunctionWithFeedbackDescriptor::Initialize(
|
| CallInterfaceDescriptorData* data) {
|
| - Register registers[] = {cp, a1, a3};
|
| + Register registers[] = {cp, r4, r6};
|
| Representation representations[] = {Representation::Tagged(),
|
| Representation::Tagged(),
|
| Representation::Smi()};
|
| @@ -123,28 +125,28 @@ void CallFunctionWithFeedbackDescriptor::Initialize(
|
|
|
|
|
| void CallConstructDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| - // a0 : number of arguments
|
| - // a1 : the function to call
|
| - // a2 : feedback vector
|
| - // a3 : (only if a2 is not the megamorphic symbol) slot in feedback
|
| + // r3 : number of arguments
|
| + // r4 : the function to call
|
| + // r5 : feedback vector
|
| + // r6 : (only if r5 is not the megamorphic symbol) slot in feedback
|
| // vector (Smi)
|
| // TODO(turbofan): So far we don't gather type feedback and hence skip the
|
| // slot parameter, but ArrayConstructStub needs the vector to be undefined.
|
| - Register registers[] = {cp, a0, a1, a2};
|
| + Register registers[] = {cp, r3, r4, r5};
|
| data->Initialize(arraysize(registers), registers, NULL);
|
| }
|
|
|
|
|
| void RegExpConstructResultDescriptor::Initialize(
|
| CallInterfaceDescriptorData* data) {
|
| - Register registers[] = {cp, a2, a1, a0};
|
| + Register registers[] = {cp, r5, r4, r3};
|
| data->Initialize(arraysize(registers), registers, NULL);
|
| }
|
|
|
|
|
| void TransitionElementsKindDescriptor::Initialize(
|
| CallInterfaceDescriptorData* data) {
|
| - Register registers[] = {cp, a0, a1};
|
| + Register registers[] = {cp, r3, r4};
|
| data->Initialize(arraysize(registers), registers, NULL);
|
| }
|
|
|
| @@ -153,17 +155,17 @@ void ArrayConstructorConstantArgCountDescriptor::Initialize(
|
| CallInterfaceDescriptorData* data) {
|
| // register state
|
| // cp -- context
|
| - // a0 -- number of arguments
|
| - // a1 -- function
|
| - // a2 -- allocation site with elements kind
|
| - Register registers[] = {cp, a1, a2};
|
| + // r3 -- number of arguments
|
| + // r4 -- function
|
| + // r5 -- allocation site with elements kind
|
| + Register registers[] = {cp, r4, r5};
|
| data->Initialize(arraysize(registers), registers, NULL);
|
| }
|
|
|
|
|
| void ArrayConstructorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| // stack param count needs (constructor pointer, and single argument)
|
| - Register registers[] = {cp, a1, a2, a0};
|
| + Register registers[] = {cp, r4, r5, r3};
|
| Representation representations[] = {
|
| Representation::Tagged(), Representation::Tagged(),
|
| Representation::Tagged(), Representation::Integer32()};
|
| @@ -175,9 +177,9 @@ void InternalArrayConstructorConstantArgCountDescriptor::Initialize(
|
| CallInterfaceDescriptorData* data) {
|
| // register state
|
| // cp -- context
|
| - // a0 -- number of arguments
|
| - // a1 -- constructor function
|
| - Register registers[] = {cp, a1};
|
| + // r3 -- number of arguments
|
| + // r4 -- constructor function
|
| + Register registers[] = {cp, r4};
|
| data->Initialize(arraysize(registers), registers, NULL);
|
| }
|
|
|
| @@ -185,7 +187,7 @@ void InternalArrayConstructorConstantArgCountDescriptor::Initialize(
|
| void InternalArrayConstructorDescriptor::Initialize(
|
| CallInterfaceDescriptorData* data) {
|
| // stack param count needs (constructor pointer, and single argument)
|
| - Register registers[] = {cp, a1, a0};
|
| + Register registers[] = {cp, r4, r3};
|
| Representation representations[] = {Representation::Tagged(),
|
| Representation::Tagged(),
|
| Representation::Integer32()};
|
| @@ -194,32 +196,32 @@ void InternalArrayConstructorDescriptor::Initialize(
|
|
|
|
|
| void CompareNilDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| - Register registers[] = {cp, a0};
|
| + Register registers[] = {cp, r3};
|
| data->Initialize(arraysize(registers), registers, NULL);
|
| }
|
|
|
|
|
| void ToBooleanDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| - Register registers[] = {cp, a0};
|
| + Register registers[] = {cp, r3};
|
| data->Initialize(arraysize(registers), registers, NULL);
|
| }
|
|
|
|
|
| void BinaryOpDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| - Register registers[] = {cp, a1, a0};
|
| + Register registers[] = {cp, r4, r3};
|
| data->Initialize(arraysize(registers), registers, NULL);
|
| }
|
|
|
|
|
| void BinaryOpWithAllocationSiteDescriptor::Initialize(
|
| CallInterfaceDescriptorData* data) {
|
| - Register registers[] = {cp, a2, a1, a0};
|
| + Register registers[] = {cp, r5, r4, r3};
|
| data->Initialize(arraysize(registers), registers, NULL);
|
| }
|
|
|
|
|
| void StringAddDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| - Register registers[] = {cp, a1, a0};
|
| + Register registers[] = {cp, r4, r3};
|
| data->Initialize(arraysize(registers), registers, NULL);
|
| }
|
|
|
| @@ -227,7 +229,7 @@ void StringAddDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| void KeyedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| Register registers[] = {
|
| cp, // context
|
| - a2, // key
|
| + r5, // key
|
| };
|
| Representation representations[] = {
|
| Representation::Tagged(), // context
|
| @@ -240,7 +242,7 @@ void KeyedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| void NamedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| Register registers[] = {
|
| cp, // context
|
| - a2, // name
|
| + r5, // name
|
| };
|
| Representation representations[] = {
|
| Representation::Tagged(), // context
|
| @@ -253,7 +255,7 @@ void NamedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| void CallHandlerDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| Register registers[] = {
|
| cp, // context
|
| - a0, // receiver
|
| + r3, // receiver
|
| };
|
| Representation representations[] = {
|
| Representation::Tagged(), // context
|
| @@ -266,9 +268,9 @@ void CallHandlerDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| void ArgumentAdaptorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| Register registers[] = {
|
| cp, // context
|
| - a1, // JSFunction
|
| - a0, // actual number of arguments
|
| - a2, // expected number of arguments
|
| + r4, // JSFunction
|
| + r3, // actual number of arguments
|
| + r5, // expected number of arguments
|
| };
|
| Representation representations[] = {
|
| Representation::Tagged(), // context
|
| @@ -283,10 +285,10 @@ void ArgumentAdaptorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| void ApiFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| Register registers[] = {
|
| cp, // context
|
| - a0, // callee
|
| - t0, // call_data
|
| - a2, // holder
|
| - a1, // api_function_address
|
| + r3, // callee
|
| + r7, // call_data
|
| + r5, // holder
|
| + r4, // api_function_address
|
| };
|
| Representation representations[] = {
|
| Representation::Tagged(), // context
|
| @@ -300,4 +302,4 @@ void ApiFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
|
| }
|
| } // namespace v8::internal
|
|
|
| -#endif // V8_TARGET_ARCH_MIPS
|
| +#endif // V8_TARGET_ARCH_PPC
|
|
|