Commit 17ad3bce authored by Milad Fa's avatar Milad Fa Committed by V8 LUCI CQ

PPC/S390: Use bit_cast instead of reinterpret_cast on S128Const

Change-Id: Idb38b9f97b5a507abd6f65f0d6c126255069f979
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2917914Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74765}
parent 9e4c05a8
......@@ -2510,13 +2510,13 @@ void InstructionSelector::VisitS128Const(Node* node) {
// 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)));
wasm::SimdShuffle::Pack4Lanes(bit_cast<uint8_t*>(&val[0]))),
g.UseImmediate(
wasm::SimdShuffle::Pack4Lanes(bit_cast<uint8_t*>(&val[0]) + 4)),
g.UseImmediate(
wasm::SimdShuffle::Pack4Lanes(bit_cast<uint8_t*>(&val[0]) + 8)),
g.UseImmediate(
wasm::SimdShuffle::Pack4Lanes(bit_cast<uint8_t*>(&val[0]) + 12)));
}
}
......
......@@ -2766,13 +2766,13 @@ void InstructionSelector::VisitS128Const(Node* node) {
// Which in this case is ineffective on LE.
Emit(kS390_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)));
wasm::SimdShuffle::Pack4Lanes(bit_cast<uint8_t*>(&val[0]))),
g.UseImmediate(
wasm::SimdShuffle::Pack4Lanes(bit_cast<uint8_t*>(&val[0]) + 4)),
g.UseImmediate(
wasm::SimdShuffle::Pack4Lanes(bit_cast<uint8_t*>(&val[0]) + 8)),
g.UseImmediate(
wasm::SimdShuffle::Pack4Lanes(bit_cast<uint8_t*>(&val[0]) + 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