• Ng Zhi An's avatar
    [wasm-simd][liftoff] Add S128 case for stack movements · 5cfe053e
    Ng Zhi An authored
    The two cases we are fixing here are Construct and
    LoadCallerFrameSlot, which are closely related.
    
    Construct is called during PrepareCall, where we build up
    LiftoffStackSlots when we need to move an arg from caller's stack frame
    into callee's stack frame. LoadCallerFrameSlot is the parallel to
    this, called in ProcessParameter during decoding of the callee's
    function body.
    
    In most cases, Construct needs a new case to handle kWasmS128, and calls
    the relevant assembler to push a s128 onto the stack.
    
    ARM64 requires 16-byte alignment of sp, so we need to Claim the right
    number of kXRegSize slots first, which requires
    us traversing the list of slots to figure out how many s128 values there
    are. This is a straightforward way to fix this, if efficiency is a
    problem, we can change LiftOffStackSlots::Add to sum up the slot sizes.
    
    On IA32, pushing s128 values will require 4 calls to push. Instead, we
    use a sub and two movdqu, which will generate less code in most cases.
    
    On x64, there is no 128-bit push, so we call push twice.
    
    Bug: v8:9909
    Change-Id: I3af35b8462ea9c3b9b2d90800c37d11b5e95be59
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2015945
    Commit-Queue: Zhi An Ng <zhin@chromium.org>
    Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#65956}
    5cfe053e
Name
Last commit
Last update
..
baseline Loading commit data...
DEPS Loading commit data...
OWNERS Loading commit data...
c-api.cc Loading commit data...
c-api.h Loading commit data...
compilation-environment.h Loading commit data...
decoder.h Loading commit data...
function-body-decoder-impl.h Loading commit data...
function-body-decoder.cc Loading commit data...
function-body-decoder.h Loading commit data...
function-compiler.cc Loading commit data...
function-compiler.h Loading commit data...
graph-builder-interface.cc Loading commit data...
graph-builder-interface.h Loading commit data...
jump-table-assembler.cc Loading commit data...
jump-table-assembler.h Loading commit data...
leb-helper.h Loading commit data...
local-decl-encoder.cc Loading commit data...
local-decl-encoder.h Loading commit data...
memory-tracing.cc Loading commit data...
memory-tracing.h Loading commit data...
module-compiler.cc Loading commit data...
module-compiler.h Loading commit data...
module-decoder.cc Loading commit data...
module-decoder.h Loading commit data...
module-instantiate.cc Loading commit data...
module-instantiate.h Loading commit data...
object-access.h Loading commit data...
signature-map.cc Loading commit data...
signature-map.h Loading commit data...
streaming-decoder.cc Loading commit data...
streaming-decoder.h Loading commit data...
value-type.h Loading commit data...
wasm-arguments.h Loading commit data...
wasm-code-manager.cc Loading commit data...
wasm-code-manager.h Loading commit data...
wasm-constants.h Loading commit data...
wasm-debug.cc Loading commit data...
wasm-debug.h Loading commit data...
wasm-engine.cc Loading commit data...
wasm-engine.h Loading commit data...
wasm-external-refs.cc Loading commit data...
wasm-external-refs.h Loading commit data...
wasm-feature-flags.h Loading commit data...
wasm-features.cc Loading commit data...
wasm-features.h Loading commit data...
wasm-import-wrapper-cache.cc Loading commit data...
wasm-import-wrapper-cache.h Loading commit data...
wasm-interpreter.cc Loading commit data...
wasm-interpreter.h Loading commit data...
wasm-js.cc Loading commit data...
wasm-js.h Loading commit data...
wasm-limits.h Loading commit data...
wasm-linkage.h Loading commit data...
wasm-memory.cc Loading commit data...
wasm-module-builder.cc Loading commit data...
wasm-module-builder.h Loading commit data...
wasm-module-sourcemap.cc Loading commit data...
wasm-module-sourcemap.h Loading commit data...
wasm-module.cc Loading commit data...
wasm-module.h Loading commit data...
wasm-objects-inl.h Loading commit data...
wasm-objects.cc Loading commit data...
wasm-objects.h Loading commit data...
wasm-objects.tq Loading commit data...
wasm-opcodes.cc Loading commit data...
wasm-opcodes.h Loading commit data...
wasm-result.cc Loading commit data...
wasm-result.h Loading commit data...
wasm-serialization.cc Loading commit data...
wasm-serialization.h Loading commit data...
wasm-tier.h Loading commit data...
wasm-value.h Loading commit data...