• Ng Zhi An's avatar
    Reland "[liftoff] Use stack slot offsets instead of indices" · d3cd2702
    Ng Zhi An authored
    This is a reland of 20727725
    
    The fix is in liftoff-assembler-arm64.h in FillStackSlotsWithZero,
    in the else case for bigger counts to fill, the argument passed to Sub
    was incorrect. We were passing offset relative to first slot, but it
    should be offset relative to instance, so there is an off by 1 slot error
    when zeroing, and ended up zeroing the stack slot holding instance.
    
    Original change's description:
    > [liftoff] Use stack slot offsets instead of indices
    >
    > Spill/fill now take offsets instead of indices. We provide a
    > helper, GetStackOffsetFromIndex, for callers. This is currently only
    > useful while slot sizes are still fixed to 8 bytes.
    >
    > StackTransferRecipe's RegisterLoad now works in terms of offset.
    >
    > LiftoffStackSlots work in terms of offset as well.
    >
    > TransferStackSlot currently still works in terms of indicies, but can be
    > converted to use offsets in a subsequent change.
    >
    > Bug: v8:9909
    > Change-Id: If54fb844309bdfd641720d063135dd59551813e0
    > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1922489
    > Reviewed-by: Clemens Backes <clemensb@chromium.org>
    > Commit-Queue: Zhi An Ng <zhin@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#65049}
    
    Bug: v8:9909
    Change-Id: I311da9d3bb1db8faf8693079177c77a7b3754243
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1925131Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
    Commit-Queue: Zhi An Ng <zhin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#65107}
    d3cd2702
liftoff-assembler-arm.h 59.5 KB