From 316239761e88683479fa88496f09a56e3b9897fa Mon Sep 17 00:00:00 2001 From: Marcus Comstedt Date: Sat, 13 Jun 2020 20:49:35 +0200 Subject: [PATCH] Fix crashes on Linux/PPC64 ELFv1 --- 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 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deps/v8/src/compiler/backend/instruction-selector.cc b/deps/v8/src/compiler/backend/instruction-selector.cc index 7d72dbbf2d0e74..0e0d1935017d33 100644 --- a/deps/v8/src/compiler/backend/instruction-selector.cc +++ b/deps/v8/src/compiler/backend/instruction-selector.cc @@ -2779,7 +2779,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. if (!call_descriptor->NoFunctionDescriptor()) { 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 addbd76ffbab25..4dd1e0264c956e 100644 --- a/deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc +++ b/deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc @@ -1032,7 +1032,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( bool isWasmCapiFunction = linkage()->GetIncomingDescriptor()->IsWasmCapiFunction(); int offset = 20 * 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; diff --git a/deps/v8/src/execution/simulator.h b/deps/v8/src/execution/simulator.h index a4e07b235b4a57..37a7c7420c26d1 100644 --- a/deps/v8/src/execution/simulator.h +++ b/deps/v8/src/execution/simulator.h @@ -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