• Milad Fa's avatar
    S390: [wasm-simd] Fix the simulator to correctly represent Simd lanes · efed4036
    Milad Fa authored
    Vector register lane numbers on IBM machines are reversed
    compared to x64. For example, doing an I32x4 extract_lane with
    lane number 0 on x64 will be equal to lane number 3 on IBM machines.
    Vector registers are only used for compiling Wasm code at the moment.
    Wasm is also little endian enforced. On s390 native, we manually do
    a reverse byte whenever values are loaded/stored from memory to
    a Simd register. On the simulator however, we do not reverse the bytes
    and data is just copied as is from one memory location to another
    location which represents a register. To keep the Wasm simulation
    accurate, we need to make sure accessing a lane is correctly simulated
    and as such we reverse the lane number on the getters and setters.
    We need to be careful when getting/setting values on the Low
    or High side of a simulated register. In the simulation, "Low" is
    equal to the MSB and "High" is equal to the LSB on memory.
    
    As a result, many of the "#ifdef V8_TARGET_BIG_ENDIAN" blocks on
    Simd opcodes are not needed anymore as we are now simulating
    native behaviour.
    
    Change-Id: Idfa80cdef7382febb4311c75eb6d3e1d110141fa
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2687756
    Commit-Queue: Milad Fa <mfarazma@redhat.com>
    Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
    Reviewed-by: 's avatarJoran Siu <joransiu@ca.ibm.com>
    Reviewed-by: 's avatarMilad Fa <mfarazma@redhat.com>
    Cr-Commit-Position: refs/heads/master@{#72642}
    efed4036
Name
Last commit
Last update
.github Loading commit data...
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...
DIR_METADATA 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...
MIPS_OWNERS Loading commit data...
OWNERS Loading commit data...
PPC_OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
RISCV_OWNERS Loading commit data...
S390_OWNERS Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...