mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 18:25:13 +08:00
deps: V8: cherry-pick 7107287
Original commit message:
aix: add required changes to build with clang
Change-Id: Icc78c58831306aa2f227843b0b4ec2321585fa64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7107287
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#104364}
PR-URL: https://github.com/nodejs/node/pull/62656
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
1 parent
aba7a48e44
commit
142b593485
6 files changed
+33
-12
No files matched your search
+1
-1
@@ -38,7 +38,7 @@
|
||||
|
||||
# Reset this number to 0 on major V8 upgrades.
|
||||
# Increment by one for each non-official patch applied to deps/v8.
|
||||
'v8_embedder_string': '-node.17',
|
||||
'v8_embedder_string': '-node.18',
|
||||
|
||||
##### V8 defaults for Node.js #####
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1583,7 +1583,7 @@ config("toolchain") {
|
||||
if (v8_current_cpu == "ppc64") {
|
||||
defines += [ "V8_TARGET_ARCH_PPC64" ]
|
||||
cflags += [ "-ffp-contract=off" ]
|
||||
if (current_os == "aix") {
|
||||
if (current_os == "aix" and !is_clang) {
|
||||
cflags += [
|
||||
# Work around AIX ceil, trunc and round oddities.
|
||||
"-mcpu=power5+",
|
||||
|
||||
+13
@@ -4219,6 +4219,19 @@ void Builtins::Generate_CEntry(MacroAssembler* masm, int result_size,
|
||||
|
||||
// If return value is on the stack, pop it to registers.
|
||||
if (needs_return_buffer) {
|
||||
Label done;
|
||||
if (switch_to_central_stack) {
|
||||
Label no_stack_change;
|
||||
__ CmpU64(kOldSPRegister, Operand(0), r0);
|
||||
__ beq(&no_stack_change);
|
||||
__ addi(r3, kOldSPRegister,
|
||||
Operand((kStackFrameExtraParamSlot + 1) * kSystemPointerSize));
|
||||
__ b(&done);
|
||||
__ bind(&no_stack_change);
|
||||
}
|
||||
__ addi(r3, sp,
|
||||
Operand((kStackFrameExtraParamSlot + 1) * kSystemPointerSize));
|
||||
__ bind(&done);
|
||||
__ LoadU64(r4, MemOperand(r3, kSystemPointerSize));
|
||||
__ LoadU64(r3, MemOperand(r3));
|
||||
}
|
||||
|
||||
+3
-3
@@ -526,7 +526,7 @@ class InputsRepFactory {
|
||||
};
|
||||
};
|
||||
|
||||
struct EffectDimensions {
|
||||
struct __attribute__((packed)) EffectDimensions {
|
||||
// Produced by loads, consumed by operations that should not move before loads
|
||||
// because they change memory.
|
||||
bool load_heap_memory : 1;
|
||||
@@ -621,7 +621,7 @@ static_assert(sizeof(EffectDimensions) == sizeof(EffectDimensions::Bits));
|
||||
// they become more restricted in their movement. Note that calls are not the
|
||||
// most side-effectful operations, as they do not leave the heap in an
|
||||
// inconsistent state, so they do not need to be marked as raw heap access.
|
||||
struct OpEffects {
|
||||
struct __attribute__((packed)) OpEffects {
|
||||
EffectDimensions produces;
|
||||
EffectDimensions consumes;
|
||||
|
||||
@@ -2878,7 +2878,7 @@ struct ConstantOp : FixedArityOperationT<0, ConstantOp> {
|
||||
// When result_rep is RegisterRepresentation::Compressed(), then the load does
|
||||
// not decompress the value.
|
||||
struct LoadOp : OperationT<LoadOp> {
|
||||
struct Kind {
|
||||
struct __attribute__((packed)) Kind {
|
||||
// The `base` input is a tagged pointer to a HeapObject.
|
||||
bool tagged_base : 1;
|
||||
// The effective address might be unaligned. This is only set to true if
|
||||
|
||||
Vendored
+11
-7
@@ -199,13 +199,17 @@ class GeneratedCode {
|
||||
return fn(args...);
|
||||
#else
|
||||
// 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
|
||||
// alias of the pseudo FD to the function pointer, and hence, optimizing the
|
||||
// pseudo FD declaration/initialization away.
|
||||
volatile Address function_desc[] = {reinterpret_cast<Address>(fn_ptr_), 0,
|
||||
0};
|
||||
Signature* fn = reinterpret_cast<Signature*>(function_desc);
|
||||
// FD to ensure correct dispatch to generated code.
|
||||
void* function_desc[3];
|
||||
Signature* fn;
|
||||
asm("std %1, 0(%2)\n\t"
|
||||
"li 0, 0\n\t"
|
||||
"std 0, 8(%2)\n\t"
|
||||
"std 0, 16(%2)\n\t"
|
||||
"mr %0, %2\n\t"
|
||||
: "=r"(fn)
|
||||
: "r"(fn_ptr_), "r"(function_desc)
|
||||
: "memory", "0");
|
||||
return fn(args...);
|
||||
#endif // V8_OS_ZOS
|
||||
#else
|
||||
|
||||
+4
@@ -24,7 +24,11 @@ namespace v8 {
|
||||
namespace internal {
|
||||
namespace trap_handler {
|
||||
|
||||
#if defined(V8_OS_AIX)
|
||||
__thread bool TrapHandlerGuard::is_active_ = 0;
|
||||
#else
|
||||
thread_local bool TrapHandlerGuard::is_active_ = 0;
|
||||
#endif
|
||||
|
||||
size_t gNumCodeObjects = 0;
|
||||
CodeProtectionInfoListEntry* gCodeObjects = nullptr;
|
||||
|
||||
Reference in new issue
Block a user