• 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
..
api Loading commit data...
asmjs Loading commit data...
ast Loading commit data...
base Loading commit data...
builtins Loading commit data...
codegen Loading commit data...
common Loading commit data...
compiler Loading commit data...
compiler-dispatcher Loading commit data...
d8 Loading commit data...
date Loading commit data...
debug Loading commit data...
deoptimizer Loading commit data...
diagnostics Loading commit data...
execution Loading commit data...
extensions Loading commit data...
flags Loading commit data...
handles Loading commit data...
heap Loading commit data...
ic Loading commit data...
init Loading commit data...
inspector Loading commit data...
interpreter Loading commit data...
json Loading commit data...
libplatform Loading commit data...
libsampler Loading commit data...
logging Loading commit data...
numbers Loading commit data...
objects Loading commit data...
parsing Loading commit data...
profiler Loading commit data...
protobuf Loading commit data...
regexp Loading commit data...
roots Loading commit data...
runtime Loading commit data...
sanitizer Loading commit data...
snapshot Loading commit data...
strings Loading commit data...
tasks Loading commit data...
third_party Loading commit data...
torque Loading commit data...
tracing Loading commit data...
trap-handler Loading commit data...
utils Loading commit data...
wasm Loading commit data...
zone Loading commit data...
DEPS Loading commit data...
DIR_METADATA Loading commit data...
OWNERS Loading commit data...