From 9e0fde6c9c590f7def41a27dfab536fc22e60aa6 Mon Sep 17 00:00:00 2001 From: Marcus Comstedt Date: Sat, 13 Jun 2020 20:49:35 +0200 Subject: [PATCH] [PATCH] Fix crashes on Linux/PPC64 ELFv1 Gbp-Pq: Name ppc64.patch --- deps/v8/src/compiler/backend/instruction-selector.cc | 2 +- deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc | 2 +- deps/v8/src/execution/simulator.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deps/v8/src/compiler/backend/instruction-selector.cc b/deps/v8/src/compiler/backend/instruction-selector.cc index d565a469..7b643494 100644 --- a/deps/v8/src/compiler/backend/instruction-selector.cc +++ b/deps/v8/src/compiler/backend/instruction-selector.cc @@ -2788,7 +2788,7 @@ void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) { switch (call_descriptor->kind()) { case CallDescriptor::kCallAddress: { int misc_field = static_cast(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. misc_field |= call_descriptor->HasFunctionDescriptor() diff --git a/deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc b/deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc index d91d9f1e..70eb17a0 100644 --- a/deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc +++ b/deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc @@ -1026,7 +1026,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( Label start_call; bool isWasmCapiFunction = linkage()->GetIncomingDescriptor()->IsWasmCapiFunction(); -#if defined(_AIX) +#if ABI_USES_FUNCTION_DESCRIPTORS // AIX/PPC64BE Linux uses a function descriptor int kNumParametersMask = kHasFunctionDescriptorBitMask - 1; num_parameters = kNumParametersMask & misc_field; diff --git a/deps/v8/src/execution/simulator.h b/deps/v8/src/execution/simulator.h index 58b17369..761603bd 100644 --- a/deps/v8/src/execution/simulator.h +++ b/deps/v8/src/execution/simulator.h @@ -122,7 +122,7 @@ class GeneratedCode { DISABLE_CFI_ICALL Return Call(Args... args) { // When running without a simulator we call the entry directly. -#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 @@ -134,7 +134,7 @@ class GeneratedCode { return fn(args...); #else return fn_ptr_(args...); -#endif // V8_OS_AIX +#endif // ABI_USES_FUNCTION_DESCRIPTORS } #endif // USE_SIMULATOR