diff options
author | Michaël Zasso <targos@protonmail.com> | 2022-04-12 11:10:15 +0200 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2022-04-12 22:08:39 +0200 |
commit | fd4f80ce54d7f7b7503e0999f6a9d293d493846d (patch) | |
tree | 00fba34b8aabeb481c7128fccee635719ee44a3b /deps/v8/src/compiler/backend/ia32/code-generator-ia32.cc | |
parent | 73d53fe9f56d7ce5de4b9c9ad5257dc601bbce14 (diff) | |
download | node-new-fd4f80ce54d7f7b7503e0999f6a9d293d493846d.tar.gz |
deps: update V8 to 10.1.124.6
PR-URL: https://github.com/nodejs/node/pull/42657
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Diffstat (limited to 'deps/v8/src/compiler/backend/ia32/code-generator-ia32.cc')
-rw-r--r-- | deps/v8/src/compiler/backend/ia32/code-generator-ia32.cc | 59 |
1 files changed, 24 insertions, 35 deletions
diff --git a/deps/v8/src/compiler/backend/ia32/code-generator-ia32.cc b/deps/v8/src/compiler/backend/ia32/code-generator-ia32.cc index 84cb574821..2730728cdd 100644 --- a/deps/v8/src/compiler/backend/ia32/code-generator-ia32.cc +++ b/deps/v8/src/compiler/backend/ia32/code-generator-ia32.cc @@ -328,8 +328,10 @@ class OutOfLineRecordWrite final : public OutOfLineCode { exit()); __ lea(scratch1_, operand_); RememberedSetAction const remembered_set_action = - mode_ > RecordWriteMode::kValueIsMap ? RememberedSetAction::kEmit - : RememberedSetAction::kOmit; + mode_ > RecordWriteMode::kValueIsMap || + FLAG_use_full_record_write_builtin + ? RememberedSetAction::kEmit + : RememberedSetAction::kOmit; SaveFPRegsMode const save_fp_mode = frame()->DidAllocateDoubleRegisters() ? SaveFPRegsMode::kSave : SaveFPRegsMode::kIgnore; @@ -3736,8 +3738,9 @@ void CodeGenerator::AssembleArchDeoptBranch(Instruction* instr, AssembleArchBranch(instr, branch); } -void CodeGenerator::AssembleArchJump(RpoNumber target) { - if (!IsNextInAssemblyOrder(target)) __ jmp(GetLabel(target)); +void CodeGenerator::AssembleArchJumpRegardlessOfAssemblyOrder( + RpoNumber target) { + __ jmp(GetLabel(target)); } #if V8_ENABLE_WEBASSEMBLY @@ -3996,14 +3999,9 @@ void CodeGenerator::AssembleArchSelect(Instruction* instr, void CodeGenerator::FinishFrame(Frame* frame) { auto call_descriptor = linkage()->GetIncomingDescriptor(); const RegList saves = call_descriptor->CalleeSavedRegisters(); - if (saves != 0) { // Save callee-saved registers. + if (!saves.is_empty()) { // Save callee-saved registers. DCHECK(!info()->is_osr()); - int pushed = 0; - for (int i = Register::kNumRegisters - 1; i >= 0; i--) { - if (!((1 << i) & saves)) continue; - ++pushed; - } - frame->AllocateSavedCalleeRegisterSlots(pushed); + frame->AllocateSavedCalleeRegisterSlots(saves.Count()); } } @@ -4093,17 +4091,17 @@ void CodeGenerator::AssembleConstructFrame() { #endif // V8_ENABLE_WEBASSEMBLY // Skip callee-saved and return slots, which are created below. - required_slots -= base::bits::CountPopulation(saves); + required_slots -= saves.Count(); required_slots -= frame()->GetReturnSlotCount(); if (required_slots > 0) { __ AllocateStackSpace(required_slots * kSystemPointerSize); } } - if (saves != 0) { // Save callee-saved registers. + if (!saves.is_empty()) { // Save callee-saved registers. DCHECK(!info()->is_osr()); - for (int i = Register::kNumRegisters - 1; i >= 0; i--) { - if (((1 << i) & saves)) __ push(Register::from_code(i)); + for (Register reg : base::Reversed(saves)) { + __ push(reg); } } @@ -4118,14 +4116,13 @@ void CodeGenerator::AssembleReturn(InstructionOperand* additional_pop_count) { const RegList saves = call_descriptor->CalleeSavedRegisters(); // Restore registers. - if (saves != 0) { + if (!saves.is_empty()) { const int returns = frame()->GetReturnSlotCount(); if (returns != 0) { __ add(esp, Immediate(returns * kSystemPointerSize)); } - for (int i = 0; i < Register::kNumRegisters; i++) { - if (!((1 << i) & saves)) continue; - __ pop(Register::from_code(i)); + for (Register reg : saves) { + __ pop(reg); } } @@ -4169,7 +4166,7 @@ void CodeGenerator::AssembleReturn(InstructionOperand* additional_pop_count) { if (drop_jsargs) { // Get the actual argument count. __ mov(argc_reg, Operand(ebp, StandardFrameConstants::kArgCOffset)); - DCHECK_EQ(0u, call_descriptor->CalleeSavedRegisters() & argc_reg.bit()); + DCHECK(!call_descriptor->CalleeSavedRegisters().has(argc_reg)); } AssembleDeconstructFrame(); } @@ -4182,21 +4179,14 @@ void CodeGenerator::AssembleReturn(InstructionOperand* additional_pop_count) { Label mismatch_return; Register scratch_reg = edx; DCHECK_NE(argc_reg, scratch_reg); - DCHECK_EQ(0u, call_descriptor->CalleeSavedRegisters() & argc_reg.bit()); - DCHECK_EQ(0u, call_descriptor->CalleeSavedRegisters() & scratch_reg.bit()); - if (kJSArgcIncludesReceiver) { - __ cmp(argc_reg, Immediate(parameter_slots)); - } else { - int parameter_slots_without_receiver = parameter_slots - 1; - __ cmp(argc_reg, Immediate(parameter_slots_without_receiver)); - } + DCHECK(!call_descriptor->CalleeSavedRegisters().has(argc_reg)); + DCHECK(!call_descriptor->CalleeSavedRegisters().has(scratch_reg)); + __ cmp(argc_reg, Immediate(parameter_slots)); __ j(greater, &mismatch_return, Label::kNear); __ Ret(parameter_slots * kSystemPointerSize, scratch_reg); __ bind(&mismatch_return); __ DropArguments(argc_reg, scratch_reg, TurboAssembler::kCountIsInteger, - kJSArgcIncludesReceiver - ? TurboAssembler::kCountIncludesReceiver - : TurboAssembler::kCountExcludesReceiver); + TurboAssembler::kCountIncludesReceiver); // We use a return instead of a jump for better return address prediction. __ Ret(); } else if (additional_pop_count->IsImmediate()) { @@ -4208,16 +4198,15 @@ void CodeGenerator::AssembleReturn(InstructionOperand* additional_pop_count) { __ ret(static_cast<int>(pop_size)); } else { Register scratch_reg = ecx; - DCHECK_EQ(0u, - call_descriptor->CalleeSavedRegisters() & scratch_reg.bit()); + DCHECK(!call_descriptor->CalleeSavedRegisters().has(scratch_reg)); CHECK_LE(pop_size, static_cast<size_t>(std::numeric_limits<int>::max())); __ Ret(static_cast<int>(pop_size), scratch_reg); } } else { Register pop_reg = g.ToRegister(additional_pop_count); Register scratch_reg = pop_reg == ecx ? edx : ecx; - DCHECK_EQ(0u, call_descriptor->CalleeSavedRegisters() & scratch_reg.bit()); - DCHECK_EQ(0u, call_descriptor->CalleeSavedRegisters() & pop_reg.bit()); + DCHECK(!call_descriptor->CalleeSavedRegisters().has(scratch_reg)); + DCHECK(!call_descriptor->CalleeSavedRegisters().has(pop_reg)); int pop_size = static_cast<int>(parameter_slots * kSystemPointerSize); __ PopReturnAddressTo(scratch_reg); __ lea(esp, Operand(esp, pop_reg, times_system_pointer_size, |