Commit 1c3f45a0 authored by Milad Farazmand's avatar Milad Farazmand Committed by Commit Bot

PPC: Support different PPC platforms with function descriptors

Change-Id: I9a91bd41bc4429509457d73c78fc88e2cf826fb6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2248202Reviewed-by: 's avatarMichael Dawson <michael_dawson@ca.ibm.com>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#68391}
parent 6f267e8a
......@@ -2845,7 +2845,7 @@ void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) {
switch (call_descriptor->kind()) {
case CallDescriptor::kCallAddress: {
int misc_field = static_cast<int>(call_descriptor->ParameterCount());
#if defined(_AIX)
#if ABI_USES_FUNCTION_DESCRIPTORS
// Highest misc_field bit is used on AIX to indicate if a CFunction call
// has function descriptor or not.
if (!call_descriptor->NoFunctionDescriptor()) {
......
......@@ -1039,7 +1039,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
linkage()->GetIncomingDescriptor()->IsWasmCapiFunction();
int offset = (FLAG_enable_embedded_constant_pool ? 20 : 23) * kInstrSize;
#if defined(_AIX)
#if ABI_USES_FUNCTION_DESCRIPTORS
// AIX/PPC64BE Linux uses a function descriptor
int kNumParametersMask = kHasFunctionDescriptorBitMask - 1;
num_parameters = kNumParametersMask & misc_field;
......
......@@ -128,7 +128,7 @@ class GeneratedCode {
#if defined(V8_TARGET_OS_WIN) && !defined(V8_OS_WIN)
FATAL("Generated code execution not possible during cross-compilation.");
#endif // defined(V8_TARGET_OS_WIN) && !defined(V8_OS_WIN)
#if V8_OS_AIX
#if ABI_USES_FUNCTION_DESCRIPTORS
// AIX ABI requires function descriptors (FD). Artificially create a pseudo
// FD to ensure correct dispatch to generated code. The 'volatile'
// declaration is required to avoid the compiler from not observing the
......@@ -140,7 +140,7 @@ class GeneratedCode {
return fn(args...);
#else
return fn_ptr_(args...);
#endif // V8_OS_AIX
#endif // ABI_USES_FUNCTION_DESCRIPTORS
}
#endif // USE_SIMULATOR
......
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