• 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
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.flake8 Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
COMMON_OWNERS Loading commit data...
DEPS Loading commit data...
ENG_REVIEW_OWNERS Loading commit data...
INFRA_OWNERS Loading commit data...
INTL_OWNERS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
MIPS_OWNERS Loading commit data...
OWNERS Loading commit data...
PPC_OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
S390_OWNERS Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...