From 882490b37209cd5aa3348f9053f25d6be5348308 Mon Sep 17 00:00:00 2001 From: Merry Date: Sun, 7 Aug 2022 13:30:10 +0100 Subject: [PATCH] frontend: Fix MSVC narrowing conversion warning for VectorSignedSaturatedShiftLeftUnsigned argument --- .../frontend/A32/translate/impl/asimd_two_regs_shift.cpp | 2 +- .../A64/translate/impl/simd_scalar_shift_by_immediate.cpp | 2 +- .../frontend/A64/translate/impl/simd_shift_by_immediate.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dynarmic/frontend/A32/translate/impl/asimd_two_regs_shift.cpp b/src/dynarmic/frontend/A32/translate/impl/asimd_two_regs_shift.cpp index 96c18b4b..b7300f91 100644 --- a/src/dynarmic/frontend/A32/translate/impl/asimd_two_regs_shift.cpp +++ b/src/dynarmic/frontend/A32/translate/impl/asimd_two_regs_shift.cpp @@ -236,7 +236,7 @@ bool TranslatorVisitor::asimd_VQSHL(bool U, bool D, size_t imm6, size_t Vd, bool return ir.VectorUnsignedSaturatedShiftLeft(esize, reg_m, shift_vec); } - return ir.VectorSignedSaturatedShiftLeftUnsigned(esize, reg_m, shift_amount); + return ir.VectorSignedSaturatedShiftLeftUnsigned(esize, reg_m, static_cast(shift_amount)); } if (op) { return ir.VectorSignedSaturatedShiftLeft(esize, reg_m, shift_vec); diff --git a/src/dynarmic/frontend/A64/translate/impl/simd_scalar_shift_by_immediate.cpp b/src/dynarmic/frontend/A64/translate/impl/simd_scalar_shift_by_immediate.cpp index 00f5e993..a0570edc 100644 --- a/src/dynarmic/frontend/A64/translate/impl/simd_scalar_shift_by_immediate.cpp +++ b/src/dynarmic/frontend/A64/translate/impl/simd_scalar_shift_by_immediate.cpp @@ -56,7 +56,7 @@ bool SaturatingShiftLeft(TranslatorVisitor& v, Imm<4> immh, Imm<3> immb, Vec Vn, return v.ir.VectorUnsignedSaturatedShiftLeft(esize, operand, shift); } - return v.ir.VectorSignedSaturatedShiftLeftUnsigned(esize, operand, shift_amount); + return v.ir.VectorSignedSaturatedShiftLeftUnsigned(esize, operand, static_cast(shift_amount)); }(); v.ir.SetQ(Vd, result); diff --git a/src/dynarmic/frontend/A64/translate/impl/simd_shift_by_immediate.cpp b/src/dynarmic/frontend/A64/translate/impl/simd_shift_by_immediate.cpp index b1c2593a..41b09522 100644 --- a/src/dynarmic/frontend/A64/translate/impl/simd_shift_by_immediate.cpp +++ b/src/dynarmic/frontend/A64/translate/impl/simd_shift_by_immediate.cpp @@ -182,7 +182,7 @@ bool SaturatingShiftLeft(TranslatorVisitor& v, bool Q, Imm<4> immh, Imm<3> immb, return v.ir.VectorUnsignedSaturatedShiftLeft(esize, operand, shift_vec); } - return v.ir.VectorSignedSaturatedShiftLeftUnsigned(esize, operand, shift); + return v.ir.VectorSignedSaturatedShiftLeftUnsigned(esize, operand, static_cast(shift)); }(); v.V(datasize, Vd, result);