• Ng Zhi An's avatar
    [wasm-simd] New macro to build using vector of bytes · 1e40c682
    Ng Zhi An authored
    Introduces a new macro BUILD_V (v is for vector) that pushes bytes into
    a vector (instead of directly in an array initializer, see BUILD). This
    has the positive effect of being able to handle opcodes of multiple
    bytes (e.g. SIMD opcodes bigger that 0xfd80). Because of this "API"
    change, our helper macros in test-run-wasm-simd.cc and wasm-run-utils.h
    need to change too. So, we introduce new macros (suffixed by _V), that
    will call the appropriate lambdas defined in BUILD_V, that knows how to
    push bytes into the vector, and also can handle multi-byte opcodes.
    
    This design has a bit of duplication and ugliness, but was chosen to
    reduce the impact of existing tests. No restructuring of test code is
    required, we only need to add suffix _V.
    
    Note that we do not have multi-byte opcodes yet (in wasm-opcodes.h),
    this change will be breaking, and requires all the tests to be updated
    to use _V macros first.
    
    Bug: v8:10258
    Change-Id: I86638a548fe2f9714c1cfb3bd691fb7b49bfd652
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2107650
    Commit-Queue: Zhi An Ng <zhin@chromium.org>
    Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#66812}
    1e40c682
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
debugging Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-api-tests Loading commit data...
wasm-js Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
OWNERS Loading commit data...