MIPS: Multiple stubs can point to the same calling convention.

Port r23546 (068adb0)

BUG=
R=paul.lind@imgtec.com

Review URL: https://codereview.chromium.org/525403003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 925298ad
......@@ -17,22 +17,20 @@ const Register LoadConvention::ReceiverRegister() { return a1; }
const Register LoadConvention::NameRegister() { return a2; }
const Register VectorLoadConvention::SlotRegister() {
DCHECK(FLAG_vector_ics);
return a0;
}
const Register VectorLoadConvention::SlotRegister() { return a0; }
const Register FullVectorLoadConvention::VectorRegister() {
DCHECK(FLAG_vector_ics);
return a3;
}
const Register FullVectorLoadConvention::VectorRegister() { return a3; }
const Register StoreConvention::ReceiverRegister() { return a1; }
const Register StoreConvention::NameRegister() { return a2; }
const Register StoreConvention::ValueRegister() { return a0; }
const Register StoreConvention::MapRegister() { return a3; }
const Register InstanceofConvention::left() { return a0; }
const Register InstanceofConvention::right() { return a1; }
}
} // namespace v8::internal
......
......@@ -17,22 +17,20 @@ const Register LoadConvention::ReceiverRegister() { return a1; }
const Register LoadConvention::NameRegister() { return a2; }
const Register VectorLoadConvention::SlotRegister() {
DCHECK(FLAG_vector_ics);
return a0;
}
const Register VectorLoadConvention::SlotRegister() { return a0; }
const Register FullVectorLoadConvention::VectorRegister() {
DCHECK(FLAG_vector_ics);
return a3;
}
const Register FullVectorLoadConvention::VectorRegister() { return a3; }
const Register StoreConvention::ReceiverRegister() { return a1; }
const Register StoreConvention::NameRegister() { return a2; }
const Register StoreConvention::ValueRegister() { return a0; }
const Register StoreConvention::MapRegister() { return a3; }
const Register InstanceofConvention::left() { return a0; }
const Register InstanceofConvention::right() { return a1; }
}
} // namespace v8::internal
......
This diff is collapsed.
......@@ -15,6 +15,137 @@ const Register InterfaceDescriptor::ContextRegister() { return cp; }
void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
InitializeForIsolateAllPlatforms(isolate);
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastNewClosureCall);
Register registers[] = {cp, a2};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastNewContextCall);
Register registers[] = {cp, a1};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ToNumberCall);
Register registers[] = {cp, a0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::NumberToStringCall);
Register registers[] = {cp, a0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastCloneShallowArrayCall);
Register registers[] = {cp, a3, a2, a1};
Representation representations[] = {
Representation::Tagged(), Representation::Tagged(),
Representation::Smi(), Representation::Tagged()};
descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastCloneShallowObjectCall);
Register registers[] = {cp, a3, a2, a1, a0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CreateAllocationSiteCall);
Register registers[] = {cp, a2, a3};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::RegExpConstructResultCall);
Register registers[] = {cp, a2, a1, a0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::TransitionElementsKindCall);
Register registers[] = {cp, a0, a1};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::ArrayConstructorConstantArgCountCall);
// register state
// cp -- context
// a0 -- number of arguments
// a1 -- function
// a2 -- allocation site with elements kind
Register registers[] = {cp, a1, a2};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall);
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {cp, a1, a2, a0};
Representation representations[] = {
Representation::Tagged(), Representation::Tagged(),
Representation::Tagged(), Representation::Integer32()};
descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::InternalArrayConstructorConstantArgCountCall);
// register state
// cp -- context
// a0 -- number of arguments
// a1 -- constructor function
Register registers[] = {cp, a1};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::InternalArrayConstructorCall);
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {cp, a1, a0};
Representation representations[] = {Representation::Tagged(),
Representation::Tagged(),
Representation::Integer32()};
descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CompareNilCall);
Register registers[] = {cp, a0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ToBooleanCall);
Register registers[] = {cp, a0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::BinaryOpCall);
Register registers[] = {cp, a1, a0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::BinaryOpWithAllocationSiteCall);
Register registers[] = {cp, a2, a1, a0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::StringAddCall);
Register registers[] = {cp, a1, a0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ArgumentAdaptorCall);
......
This diff is collapsed.
......@@ -15,6 +15,137 @@ const Register InterfaceDescriptor::ContextRegister() { return cp; }
void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
InitializeForIsolateAllPlatforms(isolate);
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastNewClosureCall);
Register registers[] = {cp, a2};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastNewContextCall);
Register registers[] = {cp, a1};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ToNumberCall);
Register registers[] = {cp, a0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::NumberToStringCall);
Register registers[] = {cp, a0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastCloneShallowArrayCall);
Register registers[] = {cp, a3, a2, a1};
Representation representations[] = {
Representation::Tagged(), Representation::Tagged(),
Representation::Smi(), Representation::Tagged()};
descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::FastCloneShallowObjectCall);
Register registers[] = {cp, a3, a2, a1, a0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CreateAllocationSiteCall);
Register registers[] = {cp, a2, a3};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::RegExpConstructResultCall);
Register registers[] = {cp, a2, a1, a0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::TransitionElementsKindCall);
Register registers[] = {cp, a0, a1};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::ArrayConstructorConstantArgCountCall);
// register state
// cp -- context
// a0 -- number of arguments
// a1 -- function
// a2 -- allocation site with elements kind
Register registers[] = {cp, a1, a2};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall);
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {cp, a1, a2, a0};
Representation representations[] = {
Representation::Tagged(), Representation::Tagged(),
Representation::Tagged(), Representation::Integer32()};
descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::InternalArrayConstructorConstantArgCountCall);
// register state
// cp -- context
// a0 -- number of arguments
// a1 -- constructor function
Register registers[] = {cp, a1};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::InternalArrayConstructorCall);
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {cp, a1, a0};
Representation representations[] = {Representation::Tagged(),
Representation::Tagged(),
Representation::Integer32()};
descriptor->Initialize(arraysize(registers), registers, representations);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::CompareNilCall);
Register registers[] = {cp, a0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ToBooleanCall);
Register registers[] = {cp, a0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::BinaryOpCall);
Register registers[] = {cp, a1, a0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::BinaryOpWithAllocationSiteCall);
Register registers[] = {cp, a2, a1, a0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::StringAddCall);
Register registers[] = {cp, a1, a0};
descriptor->Initialize(arraysize(registers), registers, NULL);
}
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::ArgumentAdaptorCall);
......
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