• 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
..
arm Loading commit data...
arm64 Loading commit data...
ia32 Loading commit data...
mips Loading commit data...
mips64 Loading commit data...
ppc Loading commit data...
riscv64 Loading commit data...
s390 Loading commit data...
x64 Loading commit data...
DIR_METADATA Loading commit data...
OWNERS Loading commit data...
code-generator-impl.h Loading commit data...
code-generator.cc Loading commit data...
code-generator.h Loading commit data...
frame-elider.cc Loading commit data...
frame-elider.h Loading commit data...
gap-resolver.cc Loading commit data...
gap-resolver.h Loading commit data...
instruction-codes.h Loading commit data...
instruction-scheduler.cc Loading commit data...
instruction-scheduler.h Loading commit data...
instruction-selector-impl.h Loading commit data...
instruction-selector.cc Loading commit data...
instruction-selector.h Loading commit data...
instruction.cc Loading commit data...
instruction.h Loading commit data...
jump-threading.cc Loading commit data...
jump-threading.h Loading commit data...
mid-tier-register-allocator.cc Loading commit data...
mid-tier-register-allocator.h Loading commit data...
move-optimizer.cc Loading commit data...
move-optimizer.h Loading commit data...
register-allocation.h Loading commit data...
register-allocator-verifier.cc Loading commit data...
register-allocator-verifier.h Loading commit data...
register-allocator.cc Loading commit data...
register-allocator.h Loading commit data...
spill-placer.cc Loading commit data...
spill-placer.h Loading commit data...
unwinding-info-writer.h Loading commit data...