Commit 43bf727b authored by Mu Tao's avatar Mu Tao Committed by Commit Bot

[mips][Liftoff] Fix stack slot initialization on mips

Port 7d09b270

Original Commit Message:

    It turns out that because we are *subtracting* from fp, we need to
    *subtract less* to get a higher address. Who knew.

R=xwafish@gmail.com, clemensb@chromium.org

Change-Id: I1ddb5e15ef7fab2f198aebf07a5ce607add4c3c4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1868559
Auto-Submit: Mu Tao <pamilty@gmail.com>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64406}
parent 71526bb0
......@@ -624,8 +624,7 @@ void LiftoffAssembler::FillStackSlotsWithZero(uint32_t index, uint32_t count) {
// Use a0 for start address (inclusive), a1 for end address (exclusive).
Push(a1, a0);
Addu(a0, fp, Operand(-liftoff::GetStackSlotOffset(last_stack_slot)));
Addu(a1, fp,
Operand(-(liftoff::GetStackSlotOffset(index) + kStackSlotSize)));
Addu(a1, fp, Operand(-liftoff::GetStackSlotOffset(index) + kStackSlotSize));
Label loop;
bind(&loop);
......
......@@ -544,7 +544,7 @@ void LiftoffAssembler::FillStackSlotsWithZero(uint32_t index, uint32_t count) {
Push(a1, a0);
Daddu(a0, fp, Operand(-liftoff::GetStackSlotOffset(last_stack_slot)));
Daddu(a1, fp,
Operand(-(liftoff::GetStackSlotOffset(index) + kStackSlotSize)));
Operand(-liftoff::GetStackSlotOffset(index) + kStackSlotSize));
Label loop;
bind(&loop);
......
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