Commit d3a84205 authored by Milad Fa's avatar Milad Fa Committed by V8 LUCI CQ

[builtins] Move DCHECK under drop_jsargs

Port: c69b0c80

Change-Id: Ie29079f976c7ab6fa14e5edc1da296a9e75b1bcf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3523822Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79471}
parent 9d6df33d
......@@ -4161,8 +4161,6 @@ void CodeGenerator::AssembleReturn(InstructionOperand* additional_pop_count) {
unwinding_info_writer_.MarkBlockWillExit();
// We might need r6 for scratch.
DCHECK(!call_descriptor->CalleeSavedRegisters().has(r6));
PPCOperandConverter g(this, nullptr);
const int parameter_slots =
static_cast<int>(call_descriptor->ParameterSlotCount());
......@@ -4215,6 +4213,7 @@ void CodeGenerator::AssembleReturn(InstructionOperand* additional_pop_count) {
// The number of arguments without the receiver is
// max(argc_reg, parameter_slots-1), and the receiver is added in
// DropArguments().
DCHECK(!call_descriptor->CalleeSavedRegisters().has(argc_reg));
if (parameter_slots > 1) {
Label skip;
__ CmpS64(argc_reg, Operand(parameter_slots), r0);
......
......@@ -3519,8 +3519,6 @@ void CodeGenerator::AssembleReturn(InstructionOperand* additional_pop_count) {
unwinding_info_writer_.MarkBlockWillExit();
// We might need r3 for scratch.
DCHECK(!call_descriptor->CalleeSavedRegisters().has(r5));
S390OperandConverter g(this, nullptr);
const int parameter_slots =
static_cast<int>(call_descriptor->ParameterSlotCount());
......@@ -3572,6 +3570,7 @@ void CodeGenerator::AssembleReturn(InstructionOperand* additional_pop_count) {
// The number of arguments without the receiver is
// max(argc_reg, parameter_slots-1), and the receiver is added in
// DropArguments().
DCHECK(!call_descriptor->CalleeSavedRegisters().has(argc_reg));
if (parameter_slots > 1) {
Label skip;
__ CmpS64(argc_reg, Operand(parameter_slots));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment