nodejs-14.15.0-fix_ppc64_crashes.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334
  1. --- a/deps/v8/src/compiler/backend/instruction-selector.cc
  2. +++ b/deps/v8/src/compiler/backend/instruction-selector.cc
  3. @@ -2808,7 +2808,7 @@
  4. switch (call_descriptor->kind()) {
  5. case CallDescriptor::kCallAddress: {
  6. int misc_field = static_cast<int>(call_descriptor->ParameterCount());
  7. -#if defined(_AIX)
  8. +#if ABI_USES_FUNCTION_DESCRIPTORS
  9. // Highest misc_field bit is used on AIX to indicate if a CFunction call
  10. // has function descriptor or not.
  11. if (!call_descriptor->NoFunctionDescriptor()) {
  12. --- a/deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc
  13. +++ b/deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc
  14. @@ -1039,7 +1039,7 @@
  15. linkage()->GetIncomingDescriptor()->IsWasmCapiFunction();
  16. int offset = (FLAG_enable_embedded_constant_pool ? 20 : 23) * kInstrSize;
  17. -#if defined(_AIX)
  18. +#if ABI_USES_FUNCTION_DESCRIPTORS
  19. // AIX/PPC64BE Linux uses a function descriptor
  20. int kNumParametersMask = kHasFunctionDescriptorBitMask - 1;
  21. num_parameters = kNumParametersMask & misc_field;
  22. --- a/deps/v8/src/execution/simulator.h
  23. +++ b/deps/v8/src/execution/simulator.h
  24. @@ -128,7 +128,7 @@
  25. #if defined(V8_TARGET_OS_WIN) && !defined(V8_OS_WIN)
  26. FATAL("Generated code execution not possible during cross-compilation.");
  27. #endif // defined(V8_TARGET_OS_WIN) && !defined(V8_OS_WIN)
  28. -#if V8_OS_AIX
  29. +#if ABI_USES_FUNCTION_DESCRIPTORS
  30. // AIX ABI requires function descriptors (FD). Artificially create a pseudo
  31. // FD to ensure correct dispatch to generated code. The 'volatile'
  32. // declaration is required to avoid the compiler from not observing the