Commit 06a1a689 authored by Milad Fa's avatar Milad Fa Committed by Commit Bot

s390:[wasm-simd] fix unpack low/high on the simulator

Change-Id: I1c7715d5133bc9fb0711c8d9922e2ca31ed37042
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2426947Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#70100}
parent 4263f8a5
......@@ -3407,7 +3407,7 @@ template <class S, class D>
void VectorUnpackHigh(void* dst, void* src) {
D value = 0;
for (size_t i = 0; i < kSimd128Size / sizeof(D); i++) {
value = *(reinterpret_cast<S*>(src) + i + (sizeof(S) / 2));
value = *(reinterpret_cast<S*>(src) + i);
memcpy(reinterpret_cast<D*>(dst) + i, &value, sizeof(D));
}
}
......@@ -3463,9 +3463,10 @@ EVALUATE(VUPLH) {
template <class S, class D>
void VectorUnpackLow(void* dst, void* src) {
D value = 0;
for (size_t i = kSimd128Size / sizeof(D); i > 0; i--) {
value = *(reinterpret_cast<S*>(src) + i - 1);
memcpy(reinterpret_cast<D*>(dst) + i - 1, &value, sizeof(D));
size_t count = kSimd128Size / sizeof(D);
for (size_t i = 0; i < count; i++) {
value = *(reinterpret_cast<S*>(src) + i + count);
memcpy(reinterpret_cast<D*>(dst) + i, &value, sizeof(D));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment