Commit e4be6d41 authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

[nci][x64] Add interface descriptors for ic-collecting builtins

These will be used by ic-collecting builtins called from both bytecode
handlers and js-generic-lowering.

For now only x64 is implemented.

Bug: v8:8888
Change-Id: I12a21b40061b7cb6c9b3cbad6134e7457a6cfa44
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2184237
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67611}
parent adc2b643
......@@ -283,6 +283,30 @@ void RunMicrotasksEntryDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void BinaryOp_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void CallTrampoline_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void Compare_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void UnaryOp_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 3);
}
} // namespace internal
} // namespace v8
......
......@@ -287,6 +287,30 @@ void RunMicrotasksEntryDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void BinaryOp_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void CallTrampoline_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void Compare_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void UnaryOp_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 3);
}
} // namespace internal
} // namespace v8
......
......@@ -300,6 +300,30 @@ void WasmFloat64ToNumberDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void BinaryOp_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void CallTrampoline_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void Compare_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void UnaryOp_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 3);
}
} // namespace internal
} // namespace v8
......
......@@ -35,19 +35,23 @@ namespace internal {
V(BigIntToI32Pair) \
V(BigIntToI64) \
V(BinaryOp) \
V(BinaryOp_WithFeedback) \
V(CallForwardVarargs) \
V(CallFunctionTemplate) \
V(CallTrampoline) \
V(CallTrampoline_WithFeedback) \
V(CallVarargs) \
V(CallWithArrayLike) \
V(CallWithSpread) \
V(CEntry1ArgvOnStack) \
V(CloneObjectWithVector) \
V(Compare) \
V(Compare_WithFeedback) \
V(ConstructForwardVarargs) \
V(ConstructStub) \
V(ConstructVarargs) \
V(ConstructWithArrayLike) \
V(Construct_WithFeedback) \
V(ConstructWithSpread) \
V(ContextOnly) \
V(CppBuiltinAdaptor) \
......@@ -89,6 +93,7 @@ namespace internal {
V(TypeConversion) \
V(TypeConversionStackParameter) \
V(Typeof) \
V(UnaryOp_WithFeedback) \
V(Void) \
V(WasmAtomicNotify) \
V(WasmFloat32ToNumber) \
......@@ -1505,6 +1510,57 @@ class CloneObjectWithVectorDescriptor final : public CallInterfaceDescriptor {
DECLARE_DESCRIPTOR(CloneObjectWithVectorDescriptor, CallInterfaceDescriptor)
};
class BinaryOp_WithFeedbackDescriptor : public CallInterfaceDescriptor {
public:
DEFINE_PARAMETERS(kLeft, kRight, kSlot, kMaybeFeedbackVector)
DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kLeft
MachineType::AnyTagged(), // kRight
MachineType::Int32(), // kSlot
MachineType::AnyTagged()) // kMaybeFeedbackVector
DECLARE_DESCRIPTOR(BinaryOp_WithFeedbackDescriptor, CallInterfaceDescriptor)
};
class CallTrampoline_WithFeedbackDescriptor : public CallInterfaceDescriptor {
public:
DEFINE_PARAMETERS_VARARGS(kFunction, kActualArgumentsCount, kSlot,
kMaybeFeedbackVector)
DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kFunction
MachineType::Int32(), // kActualArgumentsCount
MachineType::Int32(), // kSlot
MachineType::AnyTagged()) // kMaybeFeedbackVector
DECLARE_DESCRIPTOR(CallTrampoline_WithFeedbackDescriptor,
CallInterfaceDescriptor)
};
class Compare_WithFeedbackDescriptor : public CallInterfaceDescriptor {
public:
DEFINE_PARAMETERS(kLeft, kRight, kSlot, kMaybeFeedbackVector)
DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kLeft
MachineType::AnyTagged(), // kRight
MachineType::Int32(), // kSlot
MachineType::AnyTagged()) // kMaybeFeedbackVector
DECLARE_DESCRIPTOR(Compare_WithFeedbackDescriptor, CallInterfaceDescriptor)
};
class Construct_WithFeedbackDescriptor : public CallInterfaceDescriptor {
public:
// kSlot is passed in a register, kMaybeFeedbackVector on the stack.
DEFINE_JS_PARAMETERS(kSlot, kMaybeFeedbackVector)
DEFINE_JS_PARAMETER_TYPES(MachineType::Int32(), // kSlot
MachineType::AnyTagged()) // kMaybeFeedbackVector
DECLARE_JS_COMPATIBLE_DESCRIPTOR(Construct_WithFeedbackDescriptor,
CallInterfaceDescriptor, 1)
};
class UnaryOp_WithFeedbackDescriptor : public CallInterfaceDescriptor {
public:
DEFINE_PARAMETERS(kValue, kSlot, kMaybeFeedbackVector)
DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kValue
MachineType::Int32(), // kSlot
MachineType::AnyTagged()) // kMaybeFeedbackVector
DECLARE_DESCRIPTOR(UnaryOp_WithFeedbackDescriptor, CallInterfaceDescriptor)
};
#define DEFINE_TFS_BUILTIN_DESCRIPTOR(Name, ...) \
class Name##Descriptor : public CallInterfaceDescriptor { \
public: \
......
......@@ -326,6 +326,30 @@ void RunMicrotasksEntryDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void BinaryOp_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void CallTrampoline_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void Compare_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void UnaryOp_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 3);
}
} // namespace internal
} // namespace v8
......
......@@ -326,6 +326,30 @@ void RunMicrotasksEntryDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void BinaryOp_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void CallTrampoline_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void Compare_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void UnaryOp_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 3);
}
} // namespace internal
} // namespace v8
......
......@@ -283,6 +283,30 @@ void RunMicrotasksEntryDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void BinaryOp_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void CallTrampoline_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void Compare_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void UnaryOp_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 3);
}
} // namespace internal
} // namespace v8
......
......@@ -283,6 +283,30 @@ void RunMicrotasksEntryDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void BinaryOp_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void CallTrampoline_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void Compare_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 4);
}
void UnaryOp_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// TODO(v8:8888): Implement on this platform.
DefaultInitializePlatformSpecific(data, 3);
}
} // namespace internal
} // namespace v8
......
......@@ -285,6 +285,41 @@ void RunMicrotasksEntryDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void BinaryOp_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {rdx, // kLeft
rax, // kRight
rdi, // Slot
rbx}; // kMaybeFeedbackVector
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void CallTrampoline_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {rdi, // kFunction
rax, // kActualArgumentsCount
rcx, // kSlot
rbx}; // kMaybeFeedbackVector
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void Compare_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {rdx, // kLeft
rax, // kRight
rdi, // Slot
rbx}; // kMaybeFeedbackVector
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void UnaryOp_WithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {rdx, // kValue
rax, // kSlot
rdi}; // kMaybeFeedbackVector
data->InitializePlatformSpecific(arraysize(registers), registers);
}
} // namespace internal
} // namespace v8
......
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