Commit 599f4ae1 authored by Milad Fa's avatar Milad Fa Committed by Commit Bot

PPC [simd]: fix s128Const inputs on big endian (AIX)

Change-Id: If3bcdafa9be33065b96bb5737b69a095ccdba559
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2799932Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73776}
parent 8809cb11
......@@ -2488,8 +2488,17 @@ void InstructionSelector::VisitS128Const(Node* node) {
} else if (all_ones) {
Emit(kPPC_S128AllOnes, dst);
} else {
Emit(kPPC_S128Const, dst, g.UseImmediate(val[0]), g.UseImmediate(val[1]),
g.UseImmediate(val[2]), g.UseImmediate(val[3]));
// We have to use Pack4Lanes to reverse the bytes (lanes) on BE,
// Which in this case is ineffective on LE.
Emit(kPPC_S128Const, g.DefineAsRegister(node),
g.UseImmediate(
wasm::SimdShuffle::Pack4Lanes(reinterpret_cast<uint8_t*>(val))),
g.UseImmediate(wasm::SimdShuffle::Pack4Lanes(
reinterpret_cast<uint8_t*>(val) + 4)),
g.UseImmediate(wasm::SimdShuffle::Pack4Lanes(
reinterpret_cast<uint8_t*>(val) + 8)),
g.UseImmediate(wasm::SimdShuffle::Pack4Lanes(
reinterpret_cast<uint8_t*>(val) + 12)));
}
}
......
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