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

PPC/s390: [builtins] Remove extra move in ResumeGeneratorTrampoline

Port dc7906c9

R=victorgomes@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: Ic6643492969efcf4113a25a886792038b291cacf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2876987Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74411}
parent 51fe5571
...@@ -403,19 +403,16 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { ...@@ -403,19 +403,16 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
FieldMemOperand(r4, JSGeneratorObject::kParametersAndRegistersOffset)); FieldMemOperand(r4, JSGeneratorObject::kParametersAndRegistersOffset));
{ {
Label done_loop, loop; Label done_loop, loop;
__ mr(r9, r6);
__ bind(&loop); __ bind(&loop);
__ subi(r9, r9, Operand(1)); __ subi(r6, r6, Operand(1));
__ cmpi(r9, Operand::Zero()); __ cmpi(r6, Operand::Zero());
__ blt(&done_loop); __ blt(&done_loop);
__ ShiftLeftImm(r10, r9, Operand(kTaggedSizeLog2)); __ ShiftLeftImm(r10, r6, Operand(kTaggedSizeLog2));
__ add(scratch, r5, r10); __ add(scratch, r5, r10);
__ LoadAnyTaggedField(scratch, __ LoadAnyTaggedField(scratch,
FieldMemOperand(scratch, FixedArray::kHeaderSize)); FieldMemOperand(scratch, FixedArray::kHeaderSize));
__ Push(scratch); __ Push(scratch);
__ b(&loop); __ b(&loop);
__ bind(&done_loop); __ bind(&done_loop);
// Push receiver. // Push receiver.
......
...@@ -396,18 +396,15 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { ...@@ -396,18 +396,15 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
FieldMemOperand(r3, JSGeneratorObject::kParametersAndRegistersOffset)); FieldMemOperand(r3, JSGeneratorObject::kParametersAndRegistersOffset));
{ {
Label done_loop, loop; Label done_loop, loop;
__ mov(r8, r5);
__ bind(&loop); __ bind(&loop);
__ SubS64(r8, r8, Operand(1)); __ SubS64(r5, r5, Operand(1));
__ blt(&done_loop); __ blt(&done_loop);
__ ShiftLeftU64(r1, r8, Operand(kTaggedSizeLog2)); __ ShiftLeftU64(r1, r5, Operand(kTaggedSizeLog2));
__ la(scratch, MemOperand(r4, r1)); __ la(scratch, MemOperand(r4, r1));
__ LoadAnyTaggedField(scratch, __ LoadAnyTaggedField(scratch,
FieldMemOperand(scratch, FixedArray::kHeaderSize)); FieldMemOperand(scratch, FixedArray::kHeaderSize));
__ Push(scratch); __ Push(scratch);
__ b(&loop); __ b(&loop);
__ bind(&done_loop); __ bind(&done_loop);
// Push receiver. // Push receiver.
......
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