Index: src/arm64/code-stubs-arm64.cc |
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc |
index df0ecfe730fe28bb1affa348966e0eeadc6e290d..b9dd63f42142c914fd042c72218efb3558379b04 100644 |
--- a/src/arm64/code-stubs-arm64.cc |
+++ b/src/arm64/code-stubs-arm64.cc |
@@ -2084,9 +2084,13 @@ void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { |
ArgumentsAdaptorFrameConstants::kLengthOffset)); |
__ SmiUntag(param_count, param_count_smi); |
if (has_new_target()) { |
+ __ Cmp(param_count, Operand(0)); |
+ Label skip_decrement; |
+ __ B(eq, &skip_decrement); |
// Skip new.target: it is not a part of arguments. |
__ Sub(param_count, param_count, Operand(1)); |
__ SmiTag(param_count_smi, param_count); |
+ __ Bind(&skip_decrement); |
} |
__ Add(x10, caller_fp, Operand(param_count, LSL, kPointerSizeLog2)); |
__ Add(params, x10, StandardFrameConstants::kCallerSPOffset); |