• Andreas Haas's avatar
    Reland "[wasm][liftoff] Emit safepoints for externref values on the stack" · 7c4b9302
    Andreas Haas authored
    The emitted safepoint entries had the wrong size, because it did not
    contain StandardFrameConstants::kFixedFrameSizeAboveFp. The code still
    worked because the indices of encoded in the entries where too low by
    StandardFrameConstants::kFixedFrameSizeAboveFp and thereby corrected
    the invalid size. It worked as follows:
    
    First the stack_slots_size gets calculated from the safepoint entry.
    Then the position of a stack slot was
    "frame_header_base + stack_slots_size - index * pointer_size", where
    "index" is what is encoded in the safepoint map. Because of the incorrect
    encoding, both stack_slot_size and index were too low by
    StandardFrameConstants::kFixedFrameSizeAboveFp. Therefore the errors in
    both values eliminated each other, making the end result correct.
    
    With --print-code, the safepoint entry size was also read, and it
    crashed because the encoded value was too low.
    
    The reland fixes the indices.
    
    Original message:
    
    With this CL we emit safepoint maps for externref values on the Liftoff
    value stack. With that there is support for externref parameters and
    locals in Liftoff, as well as for intermediate values of type
    externref.
    
    R=thibaudm@chromium.org
    
    Bug: v8:7581
    Change-Id: I88444e57745d7b9fe8f1630e904d49736fa9d720
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2398531
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#69786}
    7c4b9302
Name
Last commit
Last update
..
arm Loading commit data...
arm64 Loading commit data...
ia32 Loading commit data...
mips Loading commit data...
mips64 Loading commit data...
ppc Loading commit data...
s390 Loading commit data...
x64 Loading commit data...
DEPS Loading commit data...
liftoff-assembler-defs.h Loading commit data...
liftoff-assembler.cc Loading commit data...
liftoff-assembler.h Loading commit data...
liftoff-compiler.cc Loading commit data...
liftoff-compiler.h Loading commit data...
liftoff-register.h Loading commit data...