Index: src/x87/interface-descriptors-x87.cc |
diff --git a/src/x87/interface-descriptors-x87.cc b/src/x87/interface-descriptors-x87.cc |
old mode 100644 |
new mode 100755 |
index dfa188478579ad6816d4a633ec630efeceedd098..8008ea2b48bfb17c77b684e95fe4f853609ecd1b |
--- a/src/x87/interface-descriptors-x87.cc |
+++ b/src/x87/interface-descriptors-x87.cc |
@@ -6,7 +6,6 @@ |
#if V8_TARGET_ARCH_X87 |
-#include "src/ic/ic-conventions.h" |
#include "src/interface-descriptors.h" |
namespace v8 { |
@@ -15,231 +14,280 @@ namespace internal { |
const Register CallInterfaceDescriptor::ContextRegister() { return esi; } |
-void CallDescriptors::InitializeForIsolate(Isolate* isolate) { |
- InitializeForIsolateAllPlatforms(isolate); |
- |
- { |
- CallInterfaceDescriptor* descriptor = |
- isolate->call_descriptor(CallDescriptorKey::FastNewClosureCall); |
- Register registers[] = {esi, ebx}; |
- descriptor->Initialize(arraysize(registers), registers, NULL); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = |
- isolate->call_descriptor(CallDescriptorKey::FastNewContextCall); |
- Register registers[] = {esi, edi}; |
- descriptor->Initialize(arraysize(registers), registers, NULL); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = |
- isolate->call_descriptor(CallDescriptorKey::ToNumberCall); |
- // ToNumberStub invokes a function, and therefore needs a context. |
- Register registers[] = {esi, eax}; |
- descriptor->Initialize(arraysize(registers), registers, NULL); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = |
- isolate->call_descriptor(CallDescriptorKey::NumberToStringCall); |
- Register registers[] = {esi, eax}; |
- descriptor->Initialize(arraysize(registers), registers, NULL); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = |
- isolate->call_descriptor(CallDescriptorKey::FastCloneShallowArrayCall); |
- Register registers[] = {esi, eax, ebx, ecx}; |
- 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[] = {esi, eax, ebx, ecx, edx}; |
- descriptor->Initialize(arraysize(registers), registers, NULL); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = |
- isolate->call_descriptor(CallDescriptorKey::CreateAllocationSiteCall); |
- Register registers[] = {esi, ebx, edx}; |
- descriptor->Initialize(arraysize(registers), registers, NULL); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = |
- isolate->call_descriptor(CallDescriptorKey::CallFunctionCall); |
- Register registers[] = {esi, edi}; |
- descriptor->Initialize(arraysize(registers), registers, NULL); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = |
- isolate->call_descriptor(CallDescriptorKey::CallConstructCall); |
- // eax : number of arguments |
- // ebx : feedback vector |
- // edx : (only if ebx is not the megamorphic symbol) slot in feedback |
- // vector (Smi) |
- // edi : constructor function |
- // 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[] = {esi, eax, edi, ebx}; |
- descriptor->Initialize(arraysize(registers), registers, NULL); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = |
- isolate->call_descriptor(CallDescriptorKey::RegExpConstructResultCall); |
- Register registers[] = {esi, ecx, ebx, eax}; |
- descriptor->Initialize(arraysize(registers), registers, NULL); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = |
- isolate->call_descriptor(CallDescriptorKey::TransitionElementsKindCall); |
- Register registers[] = {esi, eax, ebx}; |
- descriptor->Initialize(arraysize(registers), registers, NULL); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = isolate->call_descriptor( |
- CallDescriptorKey::ArrayConstructorConstantArgCountCall); |
- // register state |
- // eax -- number of arguments |
- // edi -- function |
- // ebx -- allocation site with elements kind |
- Register registers[] = {esi, edi, ebx}; |
- descriptor->Initialize(arraysize(registers), registers, NULL); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = |
- isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall); |
- // stack param count needs (constructor pointer, and single argument) |
- Register registers[] = {esi, edi, ebx, eax}; |
- 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 |
- // eax -- number of arguments |
- // edi -- function |
- Register registers[] = {esi, edi}; |
- descriptor->Initialize(arraysize(registers), registers, NULL); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = isolate->call_descriptor( |
- CallDescriptorKey::InternalArrayConstructorCall); |
- // stack param count needs (constructor pointer, and single argument) |
- Register registers[] = {esi, edi, eax}; |
- Representation representations[] = {Representation::Tagged(), |
- Representation::Tagged(), |
- Representation::Integer32()}; |
- descriptor->Initialize(arraysize(registers), registers, representations); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = |
- isolate->call_descriptor(CallDescriptorKey::CompareNilCall); |
- Register registers[] = {esi, eax}; |
- descriptor->Initialize(arraysize(registers), registers, NULL); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = |
- isolate->call_descriptor(CallDescriptorKey::ToBooleanCall); |
- Register registers[] = {esi, eax}; |
- descriptor->Initialize(arraysize(registers), registers, NULL); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = |
- isolate->call_descriptor(CallDescriptorKey::BinaryOpCall); |
- Register registers[] = {esi, edx, eax}; |
- descriptor->Initialize(arraysize(registers), registers, NULL); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = isolate->call_descriptor( |
- CallDescriptorKey::BinaryOpWithAllocationSiteCall); |
- Register registers[] = {esi, ecx, edx, eax}; |
- descriptor->Initialize(arraysize(registers), registers, NULL); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = |
- isolate->call_descriptor(CallDescriptorKey::StringAddCall); |
- Register registers[] = {esi, edx, eax}; |
- descriptor->Initialize(arraysize(registers), registers, NULL); |
- } |
- |
- { |
- CallInterfaceDescriptor* descriptor = |
- isolate->call_descriptor(CallDescriptorKey::ArgumentAdaptorCall); |
- Register registers[] = { |
- esi, // context |
- edi, // JSFunction |
- eax, // actual number of arguments |
- ebx, // expected number of arguments |
- }; |
- Representation representations[] = { |
- Representation::Tagged(), // context |
- Representation::Tagged(), // JSFunction |
- Representation::Integer32(), // actual number of arguments |
- Representation::Integer32(), // expected number of arguments |
- }; |
- descriptor->Initialize(arraysize(registers), registers, representations); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = |
- isolate->call_descriptor(CallDescriptorKey::KeyedCall); |
- Register registers[] = { |
- esi, // context |
- ecx, // key |
- }; |
- Representation representations[] = { |
- Representation::Tagged(), // context |
- Representation::Tagged(), // key |
- }; |
- descriptor->Initialize(arraysize(registers), registers, representations); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = |
- isolate->call_descriptor(CallDescriptorKey::NamedCall); |
- Register registers[] = { |
- esi, // context |
- ecx, // name |
- }; |
- Representation representations[] = { |
- Representation::Tagged(), // context |
- Representation::Tagged(), // name |
- }; |
- descriptor->Initialize(arraysize(registers), registers, representations); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = |
- isolate->call_descriptor(CallDescriptorKey::CallHandler); |
- Register registers[] = { |
- esi, // context |
- edx, // name |
- }; |
- Representation representations[] = { |
- Representation::Tagged(), // context |
- Representation::Tagged(), // receiver |
- }; |
- descriptor->Initialize(arraysize(registers), registers, representations); |
- } |
- { |
- CallInterfaceDescriptor* descriptor = |
- isolate->call_descriptor(CallDescriptorKey::ApiFunctionCall); |
- Register registers[] = { |
- esi, // context |
- eax, // callee |
- ebx, // call_data |
- ecx, // holder |
- edx, // api_function_address |
- }; |
- Representation representations[] = { |
- Representation::Tagged(), // context |
- Representation::Tagged(), // callee |
- Representation::Tagged(), // call_data |
- Representation::Tagged(), // holder |
- Representation::External(), // api_function_address |
- }; |
- descriptor->Initialize(arraysize(registers), registers, representations); |
- } |
+const Register LoadDescriptor::ReceiverRegister() { return edx; } |
+const Register LoadDescriptor::NameRegister() { return ecx; } |
+ |
+ |
+const Register VectorLoadICDescriptor::ReceiverRegister() { |
+ return LoadDescriptor::ReceiverRegister(); |
+} |
+ |
+ |
+const Register VectorLoadICDescriptor::NameRegister() { |
+ return LoadDescriptor::NameRegister(); |
+} |
+ |
+ |
+const Register VectorLoadICDescriptor::SlotRegister() { return eax; } |
+const Register VectorLoadICDescriptor::VectorRegister() { return ebx; } |
+ |
+ |
+const Register StoreDescriptor::ReceiverRegister() { return edx; } |
+const Register StoreDescriptor::NameRegister() { return ecx; } |
+const Register StoreDescriptor::ValueRegister() { return eax; } |
+ |
+ |
+const Register ElementTransitionAndStoreDescriptor::ReceiverRegister() { |
+ return StoreDescriptor::ReceiverRegister(); |
+} |
+ |
+ |
+const Register ElementTransitionAndStoreDescriptor::NameRegister() { |
+ return StoreDescriptor::NameRegister(); |
+} |
+ |
+ |
+const Register ElementTransitionAndStoreDescriptor::ValueRegister() { |
+ return StoreDescriptor::ValueRegister(); |
+} |
+ |
+ |
+const Register ElementTransitionAndStoreDescriptor::MapRegister() { |
+ return ebx; |
+} |
+ |
+ |
+const Register InstanceofDescriptor::left() { return eax; } |
+const Register InstanceofDescriptor::right() { return edx; } |
+ |
+ |
+void FastNewClosureDescriptor::Initialize(Isolate* isolate) { |
+ Register registers[] = {esi, ebx}; |
+ InitializeData(isolate, key(), arraysize(registers), registers, NULL); |
+} |
+ |
+ |
+void FastNewContextDescriptor::Initialize(Isolate* isolate) { |
+ Register registers[] = {esi, edi}; |
+ InitializeData(isolate, key(), arraysize(registers), registers, NULL); |
+} |
+ |
+ |
+void ToNumberDescriptor::Initialize(Isolate* isolate) { |
+ // ToNumberStub invokes a function, and therefore needs a context. |
+ Register registers[] = {esi, eax}; |
+ InitializeData(isolate, key(), arraysize(registers), registers, NULL); |
+} |
+ |
+ |
+void NumberToStringDescriptor::Initialize(Isolate* isolate) { |
+ Register registers[] = {esi, eax}; |
+ InitializeData(isolate, key(), arraysize(registers), registers, NULL); |
+} |
+ |
+ |
+void FastCloneShallowArrayDescriptor::Initialize(Isolate* isolate) { |
+ Register registers[] = {esi, eax, ebx, ecx}; |
+ Representation representations[] = { |
+ Representation::Tagged(), Representation::Tagged(), Representation::Smi(), |
+ Representation::Tagged()}; |
+ InitializeData(isolate, key(), arraysize(registers), registers, |
+ representations); |
+} |
+ |
+ |
+void FastCloneShallowObjectDescriptor::Initialize(Isolate* isolate) { |
+ Register registers[] = {esi, eax, ebx, ecx, edx}; |
+ InitializeData(isolate, key(), arraysize(registers), registers, NULL); |
+} |
+ |
+ |
+void CreateAllocationSiteDescriptor::Initialize(Isolate* isolate) { |
+ Register registers[] = {esi, ebx, edx}; |
+ InitializeData(isolate, key(), arraysize(registers), registers, NULL); |
+} |
+ |
+ |
+void CallFunctionDescriptor::Initialize(Isolate* isolate) { |
+ Register registers[] = {esi, edi}; |
+ InitializeData(isolate, key(), arraysize(registers), registers, NULL); |
+} |
+ |
+ |
+void CallConstructDescriptor::Initialize(Isolate* isolate) { |
+ // eax : number of arguments |
+ // ebx : feedback vector |
+ // edx : (only if ebx is not the megamorphic symbol) slot in feedback |
+ // vector (Smi) |
+ // edi : constructor function |
+ // 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[] = {esi, eax, edi, ebx}; |
+ InitializeData(isolate, key(), arraysize(registers), registers, NULL); |
+} |
+ |
+ |
+void RegExpConstructResultDescriptor::Initialize(Isolate* isolate) { |
+ Register registers[] = {esi, ecx, ebx, eax}; |
+ InitializeData(isolate, key(), arraysize(registers), registers, NULL); |
+} |
+ |
+ |
+void TransitionElementsKindDescriptor::Initialize(Isolate* isolate) { |
+ Register registers[] = {esi, eax, ebx}; |
+ InitializeData(isolate, key(), arraysize(registers), registers, NULL); |
+} |
+ |
+ |
+void ArrayConstructorConstantArgCountDescriptor::Initialize(Isolate* isolate) { |
+ // register state |
+ // eax -- number of arguments |
+ // edi -- function |
+ // ebx -- allocation site with elements kind |
+ Register registers[] = {esi, edi, ebx}; |
+ InitializeData(isolate, key(), arraysize(registers), registers, NULL); |
+} |
+ |
+ |
+void ArrayConstructorDescriptor::Initialize(Isolate* isolate) { |
+ // stack param count needs (constructor pointer, and single argument) |
+ Register registers[] = {esi, edi, ebx, eax}; |
+ Representation representations[] = { |
+ Representation::Tagged(), Representation::Tagged(), |
+ Representation::Tagged(), Representation::Integer32()}; |
+ InitializeData(isolate, key(), arraysize(registers), registers, |
+ representations); |
+} |
+ |
+ |
+void InternalArrayConstructorConstantArgCountDescriptor::Initialize( |
+ Isolate* isolate) { |
+ // register state |
+ // eax -- number of arguments |
+ // edi -- function |
+ Register registers[] = {esi, edi}; |
+ InitializeData(isolate, key(), arraysize(registers), registers, NULL); |
+} |
+ |
+ |
+void InternalArrayConstructorDescriptor::Initialize(Isolate* isolate) { |
+ // stack param count needs (constructor pointer, and single argument) |
+ Register registers[] = {esi, edi, eax}; |
+ Representation representations[] = {Representation::Tagged(), |
+ Representation::Tagged(), |
+ Representation::Integer32()}; |
+ InitializeData(isolate, key(), arraysize(registers), registers, |
+ representations); |
+} |
+ |
+ |
+void CompareNilDescriptor::Initialize(Isolate* isolate) { |
+ Register registers[] = {esi, eax}; |
+ InitializeData(isolate, key(), arraysize(registers), registers, NULL); |
+} |
+ |
+ |
+void ToBooleanDescriptor::Initialize(Isolate* isolate) { |
+ Register registers[] = {esi, eax}; |
+ InitializeData(isolate, key(), arraysize(registers), registers, NULL); |
+} |
+ |
+ |
+void BinaryOpDescriptor::Initialize(Isolate* isolate) { |
+ Register registers[] = {esi, edx, eax}; |
+ InitializeData(isolate, key(), arraysize(registers), registers, NULL); |
+} |
+ |
+ |
+void BinaryOpWithAllocationSiteDescriptor::Initialize(Isolate* isolate) { |
+ Register registers[] = {esi, ecx, edx, eax}; |
+ InitializeData(isolate, key(), arraysize(registers), registers, NULL); |
+} |
+ |
+ |
+void StringAddDescriptor::Initialize(Isolate* isolate) { |
+ Register registers[] = {esi, edx, eax}; |
+ InitializeData(isolate, key(), arraysize(registers), registers, NULL); |
+} |
+ |
+ |
+void KeyedDescriptor::Initialize(Isolate* isolate) { |
+ Register registers[] = { |
+ esi, // context |
+ ecx, // key |
+ }; |
+ Representation representations[] = { |
+ Representation::Tagged(), // context |
+ Representation::Tagged(), // key |
+ }; |
+ InitializeData(isolate, key(), arraysize(registers), registers, |
+ representations); |
+} |
+ |
+ |
+void NamedDescriptor::Initialize(Isolate* isolate) { |
+ Register registers[] = { |
+ esi, // context |
+ ecx, // name |
+ }; |
+ Representation representations[] = { |
+ Representation::Tagged(), // context |
+ Representation::Tagged(), // name |
+ }; |
+ InitializeData(isolate, key(), arraysize(registers), registers, |
+ representations); |
+} |
+ |
+ |
+void CallHandlerDescriptor::Initialize(Isolate* isolate) { |
+ Register registers[] = { |
+ esi, // context |
+ edx, // name |
+ }; |
+ Representation representations[] = { |
+ Representation::Tagged(), // context |
+ Representation::Tagged(), // receiver |
+ }; |
+ InitializeData(isolate, key(), arraysize(registers), registers, |
+ representations); |
+} |
+ |
+ |
+void ArgumentAdaptorDescriptor::Initialize(Isolate* isolate) { |
+ Register registers[] = { |
+ esi, // context |
+ edi, // JSFunction |
+ eax, // actual number of arguments |
+ ebx, // expected number of arguments |
+ }; |
+ Representation representations[] = { |
+ Representation::Tagged(), // context |
+ Representation::Tagged(), // JSFunction |
+ Representation::Integer32(), // actual number of arguments |
+ Representation::Integer32(), // expected number of arguments |
+ }; |
+ InitializeData(isolate, key(), arraysize(registers), registers, |
+ representations); |
+} |
+ |
+ |
+void ApiFunctionDescriptor::Initialize(Isolate* isolate) { |
+ Register registers[] = { |
+ esi, // context |
+ eax, // callee |
+ ebx, // call_data |
+ ecx, // holder |
+ edx, // api_function_address |
+ }; |
+ Representation representations[] = { |
+ Representation::Tagged(), // context |
+ Representation::Tagged(), // callee |
+ Representation::Tagged(), // call_data |
+ Representation::Tagged(), // holder |
+ Representation::External(), // api_function_address |
+ }; |
+ InitializeData(isolate, key(), arraysize(registers), registers, |
+ representations); |
} |
} |
} // namespace v8::internal |