Commit d007fe9b authored by Predrag Rudic's avatar Predrag Rudic Committed by Commit Bot

MIPS[64]R6 Fix test-run-wasm-simd/RunWasm_S32x4Dup_compiled

Bug: 
Change-Id: If922715b071276613fd27b6cc7f5326fdc9a37db
Reviewed-on: https://chromium-review.googlesource.com/753091
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Reviewed-by: 's avatarIvica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Cr-Commit-Position: refs/heads/master@{#49108}
parent a39e7973
......@@ -2573,9 +2573,26 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
if (src0 == src1) {
// Unary S32x4 shuffles are handled with shf.w instruction
unsigned lane = shuffle & 0xff;
if (FLAG_debug_code) {
// range of all four lanes, for unary instruction,
// should belong to the same range, which can be one of these:
// [0, 3] or [4, 7]
if (lane >= 4) {
int32_t shuffle_helper = shuffle;
for (int i = 0; i < 4; ++i) {
lane = shuffle_helper & 0xff;
CHECK_GE(lane, 4);
shuffle_helper >>= 8;
}
}
}
uint32_t i8 = 0;
for (int i = 0; i < 4; i++) {
int lane = shuffle & 0xff;
lane = shuffle & 0xff;
if (lane >= 4) {
lane -= 4;
}
DCHECK_GT(4, lane);
i8 |= lane << (2 * i);
shuffle >>= 8;
......
......@@ -2862,9 +2862,26 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
if (src0 == src1) {
// Unary S32x4 shuffles are handled with shf.w instruction
unsigned lane = shuffle & 0xff;
if (FLAG_debug_code) {
// range of all four lanes, for unary instruction,
// should belong to the same range, which can be one of these:
// [0, 3] or [4, 7]
if (lane >= 4) {
int32_t shuffle_helper = shuffle;
for (int i = 0; i < 4; ++i) {
lane = shuffle_helper & 0xff;
CHECK_GE(lane, 4);
shuffle_helper >>= 8;
}
}
}
uint32_t i8 = 0;
for (int i = 0; i < 4; i++) {
int lane = shuffle & 0xff;
lane = shuffle & 0xff;
if (lane >= 4) {
lane -= 4;
}
DCHECK_GT(4, lane);
i8 |= lane << (2 * i);
shuffle >>= 8;
......
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