Commit 3d989b29 authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

[builtins] Fix unsigned comparison in InterpreterPushArgs loop

This is a loop over an address range; the loop condition was
incorrectly implemented as a signed comparison.

Bug: chromium:876210
Change-Id: If7276d8ba50f46600f2dfc31268fd02cbb173f15
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1985997Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65664}
parent e27e6fd6
......@@ -1190,7 +1190,7 @@ static void Generate_InterpreterPushArgs(MacroAssembler* masm,
__ push(scratch);
__ bind(&loop_check);
__ cmp(index, limit);
__ b(gt, &loop_header);
__ b(hi, &loop_header);
}
// static
......
......@@ -1137,7 +1137,7 @@ static void Generate_InterpreterPushArgs(MacroAssembler* masm,
__ sub(start_address, Immediate(kSystemPointerSize));
__ bind(&loop_check);
__ cmp(start_address, array_limit);
__ j(greater, &loop_header, Label::kNear);
__ j(above, &loop_header, Label::kNear);
}
// static
......
......@@ -1170,7 +1170,7 @@ static void Generate_InterpreterPushArgs(MacroAssembler* masm,
__ Addu(index, index, Operand(-kPointerSize));
__ push(scratch);
__ bind(&loop_check);
__ Branch(&loop_header, gt, index, Operand(scratch2));
__ Branch(&loop_header, hi, index, Operand(scratch2));
}
// static
......
......@@ -1189,7 +1189,7 @@ static void Generate_InterpreterPushArgs(MacroAssembler* masm,
__ Daddu(index, index, Operand(-kPointerSize));
__ push(scratch);
__ bind(&loop_check);
__ Branch(&loop_header, gt, index, Operand(scratch2));
__ Branch(&loop_header, hi, index, Operand(scratch2));
}
// static
......
......@@ -1238,7 +1238,7 @@ static void Generate_InterpreterPushArgs(MacroAssembler* masm,
__ subq(start_address, Immediate(kSystemPointerSize));
__ bind(&loop_check);
__ cmpq(start_address, scratch);
__ j(greater, &loop_header, Label::kNear);
__ j(above, &loop_header, Label::kNear);
}
// static
......
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