PPC: Load parameter_slots into a register before comparing

After https://crrev.com/c/2807609 a test has started
failing as parameter_slots was more than 16 bits, hence
we need to load it instead of using it as an immediate value.

Change-Id: I738472634b3e30cbf277959965e72b028f9fb969
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2826231
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73956}
This commit is contained in:
Milad Fa 2021-04-14 09:49:18 -04:00 committed by Commit Bot
parent ad973c025f
commit 9dbce9abc2

View File

@ -4327,7 +4327,7 @@ void CodeGenerator::AssembleReturn(InstructionOperand* additional_pop_count) {
__ addi(argc_reg, argc_reg, Operand(1)); // Also pop the receiver.
if (parameter_slots > 1) {
Label skip;
__ cmpi(argc_reg, Operand(parameter_slots));
__ Cmpi(argc_reg, Operand(parameter_slots), r0);
__ bgt(&skip);
__ mov(argc_reg, Operand(parameter_slots));
__ bind(&skip);